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.
See #34
The value of
_Bam::m_cram_reference
is never meaningfully propagated to the underlying htslib bam constructs.If
BamReader::SetCramReference
is called before any crams are opened,BamReader::m_cram_reference
is never passed to new bams inBamReader::Open
, so the new_Bam
never callshtslib::cram_load_reference
.This PR adds a single line so that
m_cram_reference
is passed into new bams when opened.This PR does not fix the case where bams have already opened via
BamReader::Open
before setting a reference. It will probably involve copying this code segment intoBamReader::SetCramReference
, but I didn't want to just start duplicating code blocks in case you wanted to move that into it's own function.