This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Reading Bam Files With Rsamtools: Understanding Results For Negative Strand

Hello everyone,

I'm sort of an "advanced beginner" when it comes to R, so this might seem like a trivial question. Suppose I'm using RsamTools to query through a Bam File. If I say I want everything between bp 3000000 and 3000500 in a certain chromosome I'll get results both on the negative and positive strand.

Suppose I get 3000010 on the negative strand with DNA string "CTCTTTTTT" ( the string is bigger but for the purpose of this questions I think it's ok ) . What does this mean from the following:

  1. Is that DNA string returned actually the positive strand complement of the matched sequence on the negative strand? or
  2. Is CTC the 5' end of the read on the negative strand? or
  3. Is CTC the 3'end of the read on the negative strand? or
  4. Did it actually match it from bp 3000010 on the negative strand? or
  5. Something else?
bam r strand

1 answer

This isn't actually specific to Rsamtools, but is, rather, a function of the SAM spec. Regardless of the strand, the sequence in SAM files is always 5'->3' starting at the indicated position. So, CTCTTTTTT... is the sequence of the + strand. The original read, then, would have ended in AAAAAAGAG (i.e., the reverse complement). It's often easiest to get a handle on this sort of thing by loading the sorted and indexed BAM file in IGV or another viewer.

Log in to answer this question.