How extract read ID from a bam file per mapped feature (gene)
0
0
Entering edit mode
3.5 years ago
valopes ▴ 30

Hi everybody,

I have a bam file, from a mapping done with minimap2, and I need to extract the read IDs based on the genome features (gff3). Let's say: read A was mapped on the features (genes) 1 and 2 (if multiple mapped); read B was mapped on the feature (gene) 3

Actually, I am trying to figure out the best way to extract more info from Liftoff analysis, where outputs do not clearly show the correlation between features.

Does anyone have any ideas?

Thank you in advance!

alignment • 1.3k views
ADD COMMENT
0
Entering edit mode

Looks like you are looking for secondary alignments. You could look at the SA tags in the alignments.

ADD REPLY
0
Entering edit mode

It is not secondary alignments.

I want to know which read (read ID) mapped in a determined gene. So, it would be something like

  • read 1 - gene B
  • read 2 - gene A ....so on
ADD REPLY
0
Entering edit mode

It may be best to do this the other way. Get a BED file with gene co-ordinate intervals from a GTF file. Find out which reads are aligned to those intervals using samtools view region.

ADD REPLY
0
Entering edit mode

Thank you! I will try it and let you know how it goes...

ADD REPLY

Login before adding your answer.

Traffic: 2523 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