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

feat: request, make synced_bcf_reader::bcf_sr_add_reader equivalent that accepts htsFile #1862

Closed
brentp opened this issue Dec 3, 2024 · 1 comment · Fixed by #1868
Closed
Assignees

Comments

@brentp
Copy link

brentp commented Dec 3, 2024

The header has int bcf_sr_add_reader(bcf_srs_t *files, const char *fname)

It would be nice to have something like: int bcf_sr_add_hreader(bcf_srs_t *files, htsFile *file_ptr)

My used case is code that is detecting the file type (BAM/CRAM/BCF/etc) using an htsFile and then I want to still use bcf_synced_reader if it is a BCF/VCF.

@daviesrob
Copy link
Member

I think this should be possible. We'll look into it.

jkbonfield pushed a commit to vasudeva8/htslib that referenced this issue Jan 16, 2025
This is like bcf_sr_add_reader but the caller supplies an existing
open htsFile instead of a filename.

Fixes samtools#1862
jkbonfield pushed a commit that referenced this issue Jan 16, 2025
This is like bcf_sr_add_reader but the caller supplies an existing
open htsFile instead of a filename.

Fixes #1862
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 a pull request may close this issue.

3 participants