cat MANU_CHK.sh
echo "input Chr"
read C
echo "input Start"
read S
echo "input End"
read E
cat $C.bed|awk -v s=$S -v e=$E '{if($2>=s && $3<=e)print}'|cut -f5,6|sort|uniq -c|awk -v OFS="\t" '{if($1>1)print $2,$3,$1}'|awk 'BEGIN{S=0;G=0}{S=S+$3;G=G+1}END{print "total GEM count = "G" total fragment count = "S}'
sh MANU_CHK.sh
input Chr
chr3R
input Start
3711265
input End
3953741
total GEM count = 1028 total fragment count = 2361