Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- path=$1
- threshold=$2
- if [ ! $path ];then
- path='.'
- fi
- if [ ! $threshold ];then
- threshold=10
- fi
- echo Threshold: $threshold
- if [ -f sample.lt.$threshold ];then
- rm -f sample.lt.$threshold
- fi
- for sample in `ls $path | grep -v sample`;do
- total=`cat $path/$sample/*stat | grep total_reads | awk 'BEGIN{sum=0} {sum+=$NF} END{print sum*150/1e9}'`
- if [ ${total%.*} -lt $threshold ];then
- echo -e "\e[0;35m$sample\t$total\e[0m"
- echo -e "$sample\t$total" >> sample.lt.$threshold
- else
- echo -e "$sample\t$total"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement