Add AlignedSegment.query_qualities_str and fix sequence and qualities caching #1341
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On PR #1324 @nh13 requested being able to set
AlignedSegment.query_qualities
via a SAM/FASTQ-style base quality string. This expands that to be able to retrieve QUAL as a string too.Add a
query_qualities_str
property implemented directly against the underlyingbam1_t
data structure rather than translating to an array first viaqualitystring_to_array()
/array_to_qualitystring()
. Recodequery_qualities
to work more obviously directly against thebam1_t
too, and fix several bugs in its caching layer. (See #121 for why this caching is important.) Enable settingquery_qualities
to use a string too, by delegating to the new property.Fix some similar caching bugs in
query_sequence
too.