-
Notifications
You must be signed in to change notification settings - Fork 80
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
Reading bam from s3 #404
Comments
To add to this: wget and samtools view work for the https link, but not through Rust with the code above. |
I'm not a rust-htslib developer, but I had a very similar problem. I was trying to read a BAM file in Google Cloud Storage, and while samtools worked properly, both pysam and rust-htslib failed with libcurl error 77 and 60, respectively. Notably, all three work on my laptop; the failure only manifests in a Jupyter notebook running in a cloud environment (https://app.terra.bio/). The fix for me was setting the CURL_CA_BUNDLE environment variable that allows htslib to override cURL's certificate bundle path (samtools/htslib#599):
This solved both my pysam and rust-htslib errors simultaneously. I don't quite understand why samtools's htslib doesn't need this to be specified but pysam's and rust-htslib do, but at least it works now. Hopefully my issue is the same as yours, @wdecoster . |
Oh damn, that worked! That is great! Thank you so much! I have changed my code to include the following before if env::var("CURL_CA_BUNDLE").is_err() {
env::set_var("CURL_CA_BUNDLE", "/etc/ssl/certs/ca-certificates.crt");
} |
Hi,
Based on the documentation I have the impression it should be possible to read bam files from s3, but I cannot figure out how to do it. My cargo.toml contains as dependency
rust-htslib = { version = "0.44.1", features = ["s3"] }
I am trying to read the publicly available bam file here, with two variations of the url, but in both cases I get the same error (see below)What am I doing wrong?
The text was updated successfully, but these errors were encountered: