-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flag for first line in example should be 99 not 163 #26
Comments
In the SAM/BAM format spec, it's confusing to describe "TLEN" as a "signed length", because lengths are non-negative quantities. TLEN could be described more clearly as an "offset". It is the observed offset from one end of the template to the other. For the leftmost segment, the offset is positive. For the rightmost, it is negative. In other cases it is undefined or 0. |
You are correct about the flags in the example, and I am in the process of fixing it. IMHO it's barely reasonable to describe something as a signed length, to mean a length (which is of course unsigned) together with a sign attached to it denoting something related. However in any case, we've been reworking the description of TLEN to hopefully make it clearer -- please have a look at #23 and comment there on whether you think it's an improvement. |
The same change to the flags needs to be made for the padded SAM version of the same example that is provided in section 3.2. That is, the flags 163 and 83 for the first and last reads of qname=r001 should be 99 and 147, respectively. Sorry for not mentioning this previously-- I hadn't finished working all the way through the spec. |
Apologies if I've got this wrong, but I think the SAM/BAM format spec has a mistake. The first alignment line in the example SAM file (first page of the spec) assigns 163 to the mapping that is labeled "r001/1" in the alignment shown above the example. The problem is that 163 is the code for the second member of a pair, but the "/1" implies that "r001/1" is the first member of the pair and "r001/2" is the second member. The code for a first-member, forward-strand, both-mapped paired read is 99. So I think the paired reads should be 99 (first r001 line) and 147 (last r001 line) rather than 163 and 83 as given.
The text was updated successfully, but these errors were encountered: