saketkc / pysradb

Package for fetching metadata and downloading data from SRA/ENA/GEO
https://saketkc.github.io/pysradb
BSD 3-Clause "New" or "Revised" License
307 stars 50 forks source link

Question: When is ena_url reported? #56

Closed Maarten-vd-Sande closed 4 years ago

Maarten-vd-Sande commented 4 years ago

Description

import pysradb
print(pysradb.__version__)
print(SRAweb().sra_metadata("SRP016501", detailed=True).columns)
print(SRAweb().sra_metadata("GSM3141725", detailed=True).columns)
0.11.0
Index(['study_accession', 'experiment_accession', 'experiment_title',
       'experiment_desc', 'organism_taxid ', 'organism_name',
       'library_strategy', 'library_source', 'library_selection',
       'sample_accession', 'sample_title', 'instrument', 'total_spots',
       'total_size', 'run_accession', 'run_total_spots', 'run_total_bases',
       'run_alias', 'sra_url_alt1', 'sra_url_alt2', 'sra_url',
       'experiment_alias', 'source_name', 'tissue', 'sra_url_alt3', 'strain',
       'ena_fastq_http_1', 'ena_fastq_http_2', 'ena_fastq_ftp_1',
       'ena_fastq_ftp_2'],
      dtype='object')
Index(['study_accession', 'experiment_accession', 'experiment_title',
       'experiment_desc', 'organism_taxid ', 'organism_name',
       'library_strategy', 'library_source', 'library_selection',
       'sample_accession', 'sample_title', 'instrument', 'total_spots',
       'total_size', 'run_accession', 'run_total_spots', 'run_total_bases',
       'run_alias', 'sra_url_alt1', 'sra_url_alt2', 'sra_url',
       'experiment_alias', 'source_name', 'age', 'strain'],
      dtype='object')

When can I expect an ena_url column and when not? I understand that not everything is hosted on ena.

saketkc commented 4 years ago

Thanks @Maarten-vd-Sande, I can confirm this is currently lacking. I will try to have a fix soon, but if you use the corresponding SRX id you will get a ENA url (as long as it exists):

$ pysradb gsm-to-srx GSM3141725

experiment_alias experiment_accession
GSM3141725       SRX4082387         

Then,

$ pysradb metadata --detailed SRX4082387
saketkc commented 4 years ago

This is fixed in master. Thanks for reporting!

Maarten-vd-Sande commented 4 years ago

Awesome! Thanks for the lightning fast replies and fixes on al issues!! You are a life saver :+1: