Avoid using private HTSlib headers and functions#53
Merged
walaj merged 1 commit intowalaj:masterfrom Dec 10, 2020
jmarshall:no-htslib-privates
Merged
Avoid using private HTSlib headers and functions#53walaj merged 1 commit intowalaj:masterfrom jmarshall:no-htslib-privates
walaj merged 1 commit intowalaj:masterfrom
jmarshall:no-htslib-privates
Conversation
This was referenced Dec 17, 2019
Only headers in htslib/*.h are part of HTSlib's public API; cram/*.h in particular are not. Fortunately SeqLib only uses one function from cram/cram_io.h, and that is easily replaced with a public equivalent. Instead use `hts_set_fai_filename()`, which strdups the string given to it itself; `cram_set_option(fp->fp.cram, CRAM_OPT_REFERENCE, ...)` would also be an option, but it's better to avoid `fp->fp.cram` as poking into an htsFile's insides is also not supported by HTSlib.
Contributor
Author
|
I see there has been some recent activity in SeqLib. @walaj It would be greatly appreciated if you would consider and merge this one too. |
|
Great 👍 |
Owner
|
This is completely on me for missing this for so long, saw the comment on Twitter. Thank you for this fix. |
|
Thanks a lot for fixing. Would you mind tagging a new release? |
Contributor
Author
|
Thanks for merging it. As @tillea suggests, it would be ideal if this appeared in a new release in due course. But certainly having this commit on master does the trick for projects that have SeqLib as a git submodule. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Use a public HTSlib API function to set the CRAM reference file rather than an internal CRAM-only function that is private to HTSlib.
Happily there is only one instance of a private HTSlib function being used. Fixes #21.