Question: how is TLEN calculated in bowtie2
0
3.2 years ago by
shim10
shim10 wrote:

Hi all, I want to know how TLEN is calculated in bowtie2. Below is the alignment (ran on paired-end) using the CIGAR fields. The alignment is presented as R1,reference, and R2 aligned one below the other (I put R for the NTs of the reads R1, reverse complemented R2, and F for the NTs of the reference)*:

``````RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR r1 86S64M POS=1 TLEN=236
|1                                                             |64
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF refseq
|                                                                    |70
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR r2(RC) 70M78S POS=14 TLEN=-236
``````

According to the SAM definition TLEN: signed observed Template LENgth. If all segments are mapped to the same reference, the unsigned observed template length equals the number of bases from the leftmost mapped base to the rightmost mapped base. The leftmost segment has a plus sign and the rightmost has a minus sign.

Can anyone please explain to me for the above example how exactly bowtie2 came up with 236?

bowtie tlen sam alignment bowtie2 • 1.5k views
modified 3.2 years ago by Biostar ♦♦ 20 • written 3.2 years ago by shim10
1

You should report the SAM entries that we can troubleshoot.

There is little reason to look for SAM spec defined fields in a file that is not in SAM format.

Another way to say this, we know how to read SAM but not a weird tabular format that may not actually contain the same entries as a SAM file.

Your example can be clarified using code formatting, using the `101010` button. When you compose or edit a post that button is in your toolbar, see image below:

I have no idea how it should look like.