Identify similarly mapped reads in BAM/SAM?
1
0
Entering edit mode
10 months ago
Eliveri ▴ 350

I have a BAM (or SAM) file of reads mapped to a reference genome.

I would like to identify which reads are mapped similarly/to approximately the same location, which reads might be "orthologs".

For example, when visualizing the BAM file in IGV, the two reads circled in the orange are similar.

enter image description here

How can I parse this information from a BAM or SAM file? Using Python or R?

bam igv sam python r • 541 views
ADD COMMENT
2
Entering edit mode
10 months ago
 bedtools bamtobed -i in.bam | datamash -g 1,2,3  collapse 4
ADD COMMENT
0
Entering edit mode

Thank you! This is a great and straightforward solution.

ADD REPLY

Login before adding your answer.

Traffic: 2387 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6