Skip to content
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

cram: interpretation of "unmapped" flag in a pseudocode seems incorrect #749

Closed
athos opened this issue Jan 15, 2024 · 2 comments · Fixed by #788
Closed

cram: interpretation of "unmapped" flag in a pseudocode seems incorrect #749

athos opened this issue Jan 15, 2024 · 2 comments · Fixed by #788
Labels

Comments

@athos
Copy link

athos commented Jan 15, 2024

In the CRAM specification, Section 10.6 has the following pseudocode:

procedure DecodeRecord
  ...
  if (BF AND 4) != 0 then
    DecodeMappedRead
  else
    DecodeUnmappedRead
  end if
end procedure

I think (BF AND 4) != 0 in the code should be (BF AND 4) = 0, as the 0x04 bit of the BF flag means "unmapped". Or am I misunderstanding something?

@jkbonfield
Copy link
Contributor

I think you're correct. The pseudocode was added later and while I tried to get it correct obviously, this is a mistake as BF is "BAM flags" and adheres to the same bit-fields used in SAM/BAM. Thanks for reporting it.

@jkbonfield
Copy link
Contributor

On reviewing outstanding issues I noticed I'd completely forgotten about this one. My apologies.

Thanks for reporting it. There's now a PR to fix this problem which I'll merge once I've verified the build works (a formality I'm sure).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants