Extract reads mapped within chosen intronic region from BAM file (no junctions)
Entering edit mode
5 weeks ago
gspirito ▴ 10

Hi everyone, here's my question:

I have some BAM files resulting from mapping RNA-seq reads. I would like to know whether there is a way to extract the reads mapping within defined intronic regions.

When simply doing "samtools view file.bam chr1:Start-End > result.bam", I get reads in the output file even if there are no actual reads mapped within the intronic region of interest, this is a result of the fact that samtools outputs also read fragments spanning from one exon to another, and not mapping inside the intron; while I would like to know which reads map within a given intronic region.

Does anyone know how I may do this?

Thank you in advance.

bedtools RNA-seq samtools • 192 views
Entering edit mode
5 weeks ago

I quickly wrote something: http://lindenb.github.io/jvarkit/Biostar9469733.html

this tool looks at the cigar string and check if there any block has an overlap with the bed file.

 java -jar dist/biostar9469733.jar --regions input.bed input.bam

Login before adding your answer.

Traffic: 941 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6