How do I download CRAM/BAM data from EGA using HTSGET
1
2
Entering edit mode
5.1 years ago
e.benn ▴ 110

I would like to use htsget to download portions of bam files on EGA. I have access to the data, and can download whole files:

pyega3 -d -cf ~/.ega2 fetch EGAF0000xxxxxxxxx

However when I try to use htsget, the system fails:

pyega3 -d -cf ~/.ega2 fetch EGAF0000xxxxxxxxx --reference-name 1 --start 100000 --end 200000

The error code is:

500 Server Error:  for url: https://ega.ebi.ac.uk:8051/elixir/data/files/byid/file?accession=EGAF0000xxxxxxxx&format=BAM&start=100000&end=200000&chr=1

I have been emailing the EGA helpdesk for 4 months (!) on this issue without resolution. Is anyone else able to use htsget with this service?

There is no documentation for the EGA htsget implementation (thought the pyega3 code is open source), is there a way I can use samtools view to access the EGA data instead?

ega htsget • 1.7k views
ADD COMMENT
0
Entering edit mode
3.4 years ago
DareDevil ★ 4.3k

Use argument --format

pyega3 fetch -cf </Path/To/CREDENTIALS_FILE> --start 0 --end 1000000 --reference-name 1 --format BAM --saveto </Path/To/Output> EGAF<NUM>
ADD COMMENT

Login before adding your answer.

Traffic: 2053 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6