Skip to content

fix: Edge Case Handling#118

Merged
evolvedmicrobe merged 1 commit intomasterfrom
nd/no_ambiguity
Mar 27, 2025
Merged

fix: Edge Case Handling#118
evolvedmicrobe merged 1 commit intomasterfrom
nd/no_ambiguity

Conversation

@evolvedmicrobe
Copy link
Copy Markdown
Contributor

For single bp reads, there is an ambiguity in the SAM format

read001	0	ref	1	255	1M	*	0	0	A	*

The read above could have a QV value of *, or no QV values at all. Since htslib sets a sentinel value of 255 in this case, it can lead to overflow in downstream operations. Since we pass in a qual array for alignment, we can know it's not ambiguous and set the value back to it's correct value.

For single bp reads, there is an ambiguity in the SAM format

```
read001	0	ref	1	255	1M	*	0	0	A	*
```

The read above could have a QV value of `*`, or no QV values at all.  Since htslib [sets a sentinel value of 255](https://github.com/samtools/htslib/blob/b14fffb4b5689696723634a20b85219be92f9d06/sam.c#L3029-L3030) in this case, it can lead to overflow in downstream operations.
@evolvedmicrobe evolvedmicrobe merged commit 325fd66 into master Mar 27, 2025
1 check passed
@evolvedmicrobe evolvedmicrobe deleted the nd/no_ambiguity branch March 27, 2025 16:35
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

Successfully merging this pull request may close these issues.

1 participant