Biostar Beta. Not for public use.
How to find all the region where one read is mapped in a bam file
0
Entering edit mode
15 months ago

I have a bam file and I want to get all the positions where a single read is mapped. I tired searching for the solution everywhere but what I am getting is the no of reads in a particular region (coverage). But I need just the opposite. I need the count of the number of regions where a single read is mapped.

For ex

SRR003467.28691 is mapped at 3 locations respective positions are 19000156 , 19000228, 19000878

ADD COMMENTlink
0
Entering edit mode

I want to get all the positions where a single read is mapped

This is not what you shew in your example

I suggest you to take look at bamCoverage and filter your result to select only location with one read of coverage. Then with those locations, you can extract the read name using samtools view

ADD REPLYlink
0
Entering edit mode
13 months ago
Belgium

I'm not sure I understand entirely, but I think the following should work:

samtools view youralignment.bam | grep SRR003467.28691
ADD COMMENTlink
0
Entering edit mode

Of course, the poster should have told the aligner to output multimappers to multiple positions, not just one.

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1