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

Tabix failed on FTP file #1684

Closed
stunme opened this issue Oct 4, 2023 · 1 comment
Closed

Tabix failed on FTP file #1684

stunme opened this issue Oct 4, 2023 · 1 comment

Comments

@stunme
Copy link

stunme commented Oct 4, 2023

Environment:
windows 11
wsl2 + ubuntu 22.04
samtools, htslib 1.18

Running
tabix -fh ftp://ngs.sanger.ac.uk/production/ag1000g/phase1/preview/ag1000g.AC.phase1.AR1.vcf.gz 3L:1-200000 |bgzip -c > centro.vcf.gz

get a error:
[E::hts_open_format] Failed to open file "ftp://ngs.sanger.ac.uk/production/ag1000g/phase1/preview/ag1000g.AC.phase1.AR1.vcf.gz" : Protocol not supported
Could not open "ftp://ngs.sanger.ac.uk/production/ag1000g/phase1/preview/ag1000g.AC.phase1.AR1.vcf.gz": Protocol not supported

But, wget the file and tbi file
wget ftp://ngs.sanger.ac.uk/production/ag1000g/phase1/preview/ag1000g.AC.phase1.AR1.vcf.gz
wget ftp://ngs.sanger.ac.uk/production/ag1000g/phase1/preview/ag1000g.AC.phase1.AR1.vcf.gz.tbi

and then
​tabix -fh ag1000g.AC.phase1.AR1.vcf.gz 2:39967768-39967768

it works normal.

What's wrong i have made to tabix with the remote file?

@jkbonfield
Copy link
Contributor

jkbonfield commented Oct 4, 2023

"Protocol not supported" ususally means htslib was built without libcurl. While this is possible to do, it generally causes more confusion downstream such as this, so it's best to get it building complete.

If you built it yourself, install (or get installed) the necessary dependencies before running ./configure. See the INSTALL notes for details. If you're using a prebuilt binary from someone else, try another source of prebuilt binaries (eg conda) or build from source instead.

Also, as you said you have samtools as well as htslib built, you can do samtools --version which should report how the package was built.

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

No branches or pull requests

3 participants