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

Inconsistency in parsing @SQ headers with multiple LN: and SN: tags #1866

Open
daviesrob opened this issue Dec 12, 2024 · 0 comments
Open

Inconsistency in parsing @SQ headers with multiple LN: and SN: tags #1866

daviesrob opened this issue Dec 12, 2024 · 0 comments

Comments

@daviesrob
Copy link
Member

As noted in #1863, when reading @SQ headers sam_hdr_create() records the value for the last LN: and SN: tags, while refs_from_header() uses the result from sam_hrecs_find_key() which is the first one. This leads to a possible discrepancy in how such lines are interpreted by the SAM- and CRAM- reading code.

As such lines are invalid according to the specification ("Within each (non-@CO) header line, no field tag may appear more than once...") it might be best to reject such inputs by enforcing the one-tag rule. Hopefully the number of files that would be rejected as a result will be very small, if any, and it will prevent any possibility of inconsistent interpretation.

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

No branches or pull requests

1 participant