Entering edit mode
10.6 years ago
filipzembol
▴
180
Dear all, I create some pipe to get the information from the text file.
#!/bin/bash
for i in {0..249480000..60000}
do
u=$i
let "u +=60000"
echo $i "-" $u
samtools view /home/filip/Desktop/54321Odfiltrovany.bam chrY:$i-$u | awk '{ n=length($10); print gsub(/[GCCgcs]/,"",$10)/n;}' | awk '{s+=$1}END{print NR,s/NR}'
done
OUTPUT what I want:
$i $u $NR $s/NR
for example:
0 60000 2 0.345
60000 120000 3 0.45
Could you help me. Because I do not know how could I join echo with print. Thank you.