Dear all,
Initially, I had 4 .fastq file, L001-L004, obtained from NGS of a mixture of RNAs. After several processes, I got 4 corresponding sorted bam files. Now, I want to obtain a text file that show the starting position of reads in reference sequences. However, by using
for i in *.sorted.bam; do bedtools genomecov -d -5 -ibam $i > $i.txt; done
I was only able to obtain 4 seperate txt file. Moreover, starting positions that have no reads were also included. Here is your reference when position 2, 4, 7, 10 were included:
Pri-let-7e 1 3
Pri-let-7e 2 0
Pri-let-7e 3 1
Pri-let-7e 4 0
Pri-let-7e 5 1
Pri-let-7e 6 2
Pri-let-7e 7 0
Pri-let-7e 8 1
Pri-let-7e 9 1
Pri-let-7e 10 0
Pri-let-7e 11 1
Pri-let-7e 12 3
So, is there any way that I can take to get ONE txt file reporting the starting positions with read counts from 4 sorted bam files and obmitting that with 0 count? Thank you all!