interpreting minus strand reads in BAM?
1
0
Entering edit mode
9.4 years ago
user ▴ 940

I have a 50bp long BAM read that aligns at start position 24621401 and it matches GFF interval "chr1:24621346-24621401:-". Does it mean the read starts at 24621401 and overlaps one base with the region? or is it within interval? do you subtract 50 or add 50 to the start position in this example?

next-gen alignment samtools bam RNA-Seq • 2.5k views
ADD COMMENT
0
Entering edit mode
9.4 years ago

It all depends of what you computed. In the most generic interpretation of intersect any amount of overlap between the two intervals will cause them to be reported as "intersecting"

The best is to think of both data entries as intervals.

Your alignment starts at POS and ends at POS + alignment length (matches + insertions - deletions) that may be longer or shorter than 50bp. While for short reads the alignment length is typically close to read length since the aligners don't really look to hard for other type of matches (check the CIGAR string) still could be both shorter or longer.

ADD COMMENT
0
Entering edit mode

I just ran bedtools intersect on my BAM and the reads. the question is simply if a read aligns fully to minus strand annotation like chr1:24621346-24621401:-, do you ADD or SUBTRACT 50? assume read matches fully so no insertions/deletions. It sounds like you are saying you ADD 50, right?

ADD REPLY
0
Entering edit mode

POS is always the leftmost coordinate of the alignment for both strands.

Just to make sure to use terms correctly - full alignment may as well contain insertions and deletions. What you probably mean is an alignment that only contains matches or mismatches.

The proper way to turn alignments into intervals is to run bam2bed of bedtools since you already have that installed. Then you don't need to add numbers and your results will be correct for all cases not just one in particular.

ADD REPLY
0
Entering edit mode

This says that it's the leftmost not rightmost: "POS 1-based leftmost mapping POSition" https://www.projet-plume.org/files/sam1_v14.pdf

ADD REPLY
0
Entering edit mode

yes, I caught and corrected that within a few seconds of posting (see above) - though the email you got still had the first version

ADD REPLY

Login before adding your answer.

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