Hello,
I want to count reads starting at a specific position e.g position 10000 in chromosome 1, output 50 reads start at position 10000
Here is the command that I run and gave me the correct output that I need:
samtools view -F 16 file.bam | grep chromosome_1 | awk '{print $4}' | grep -w 10000 | wc -l
I have a list of positions in a file.txt and for every position I would like to count how many reads start at that position and save the output in new file in this way: position 10000 counts 50
How can I do this in automatic way without entering the command for each position?
Thanks!