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

region-based filtering not working in htsget #51

Closed
cmdoret opened this issue May 29, 2024 · 1 comment · Fixed by #71
Closed

region-based filtering not working in htsget #51

cmdoret opened this issue May 29, 2024 · 1 comment · Fixed by #71
Assignees
Labels
bug Something isn't working

Comments

@cmdoret
Copy link
Member

cmdoret commented May 29, 2024

htsget streaming seems to return the whole region. htsget-rs receives the region specification but seems to always return all records. Reported upstream: umccr/htsget-rs#248

@cmdoret cmdoret added the bug Something isn't working label May 29, 2024
@cmdoret
Copy link
Member Author

cmdoret commented Jun 3, 2024

This is expected behaviour, as htsget-rs cannot slice within bgzf blocks. Confirmed on a larger test file:

# client side
In [22]: len([variant for variant in m2.stream_genomics('modo-demo/ex/htsget.cram', region='11')])
[E::cram_index_load] Could not retrieve index file for '/tmp/tmpwbgmqln7'
[E::easy_errno] Libcurl reported error 77 (Problem with the SSL CA cert (path? access rights?))
[W::find_file_url] Failed to open reference "https://www.ebi.ac.uk/ena/cram/md5/98c59049a2df285c76ffb1c6db8f8b96": Input/output error
Out[22]: 12898


In [23]: len([variant for variant in m2.stream_genomics('modo-demo/ex/htsget.cram', region='11:5099230-5099889')])
[E::cram_index_load] Could not retrieve index file for '/tmp/tmp2wm27_cm'
[E::easy_errno] Libcurl reported error 77 (Problem with the SSL CA cert (path? access rights?))
[W::find_file_url] Failed to open reference "https://www.ebi.ac.uk/ena/cram/md5/98c59049a2df285c76ffb1c6db8f8b96": Input/output error
Out[23]: 2898

Solution

Filter records on the client-side to only return those matching the query region

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant