I am using Tophat to do anlysis RNA-seq from Solid machine.
I got the result accept_hits.bam.
I want to get the location information of all the reads 5'-end position.
So I choose the perfect-match aligmments from that file by grep all 'NM:i:0' from accept_hits.bam file, and then use the bamToBed to convert the result to Bed file.
I randomly picked a read to check the result, here is the thing confused me
> Samtools view accepted_hits.bam | grep '778_936_1229_F3'
778_936_1229_F3 272 chr1 435 1 17M * 0 0 TGAATGGTACGAGAATC \\!%##VV]]cbbNMbb NM:i:0 NH:i:4 CC:Z:= CP:i:1999858 HI:i:0
778_936_1229_F3 272 chr1 1999858 1 17M * 0 0 ACCTATTTACGAGAATC $$"_aa..]]cbbNMbb NM:i:0 NH:i:4 CC:Z:= CP:i:3166473 HI:i:1
778_936_1229_F3 16 chr1 3166473 1 17M * 0 0 CAGAATGTACGAGAATC \\Z!!!!V]]cbbNMbb NM:i:0 NH:i:4 CC:Z:chr3 CP:i:1026096 HI:i:2
778_936_1229_F3 256 chr3 1026096 1 17M * 0 0 AGAAGAGCATAATAGAC ""!Nbbc]]..aa_Z\\ NM:i:0 NH:i:4 HI:i:3
The read '778_936_1229_F3' shows up 4 times in the alignment, all with the NM:i:0. In that case, that read will have 4 positions in my resulting Bed file.
Anybody can help me clarify that? Thanks
I got the result accept_hits.bam.
I want to get the location information of all the reads 5'-end position.
So I choose the perfect-match aligmments from that file by grep all 'NM:i:0' from accept_hits.bam file, and then use the bamToBed to convert the result to Bed file.
I randomly picked a read to check the result, here is the thing confused me
> Samtools view accepted_hits.bam | grep '778_936_1229_F3'
778_936_1229_F3 272 chr1 435 1 17M * 0 0 TGAATGGTACGAGAATC \\!%##VV]]cbbNMbb NM:i:0 NH:i:4 CC:Z:= CP:i:1999858 HI:i:0
778_936_1229_F3 272 chr1 1999858 1 17M * 0 0 ACCTATTTACGAGAATC $$"_aa..]]cbbNMbb NM:i:0 NH:i:4 CC:Z:= CP:i:3166473 HI:i:1
778_936_1229_F3 16 chr1 3166473 1 17M * 0 0 CAGAATGTACGAGAATC \\Z!!!!V]]cbbNMbb NM:i:0 NH:i:4 CC:Z:chr3 CP:i:1026096 HI:i:2
778_936_1229_F3 256 chr3 1026096 1 17M * 0 0 AGAAGAGCATAATAGAC ""!Nbbc]]..aa_Z\\ NM:i:0 NH:i:4 HI:i:3
The read '778_936_1229_F3' shows up 4 times in the alignment, all with the NM:i:0. In that case, that read will have 4 positions in my resulting Bed file.
Anybody can help me clarify that? Thanks
Comment