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

[BUG] ENA search ignores organism when query is specified #143

Closed siebrenf closed 2 years ago

siebrenf commented 2 years ago

Describe the bug pysradb search -d ena ignores --organism when --query is specified.

To Reproduce Organism is used when searching SRA:

pysradb search -d sra -m 1 -O xenopus tropicalis -q development

study_accession experiment_accession    experiment_title        sample_taxon_id sample_scientific_name  experiment_library_strategy     experiment_library_source       experiment_library_selection    sample_accession        sample_alias    experiment_instrument_model     pool_member_spots       run_1_size      run_1_accession    run_1_total_spots       run_1_total_bases
SRP249483 SRX9352396 RPB1 ChIP-seq of X.tropicalis: s11 8364 Xenopus tropicalis ChIP-Seq GENOMIC ChIP SRS6146540 stage11 HiSeq X Ten 44679487 5928734005 SRR12886651 44679487 13403846100

Organism is ignored when searching ENA:

pysradb search -d ena -m 1 -O xenopus tropicalis -q development

study_accession experiment_accession    experiment_title        description     tax_id  scientific_name library_strategy        library_source  library_selection       sample_accession        sample_title    instrument_model        run_accession   read_count      base_count
PRJDB2600 DRX005926 Illumina Genome Analyzer IIx sequencing; RNA-Seq analysis of Oryza sativa cv. Nipponbare root control sample for Developmental Time 0 hour after - replicate 1 Illumina Genome Analyzer IIx sequencing; RNA-Seq analysis of Oryza sativa cv. Nipponbare root control sample for Developmental Time 0 hour after - replicate 1 39947 Oryza sativa Japonica Group RNA-Seq TRANSCRIPTOMIC RANDOM SAMD00012946 Root of rice (Oryza sativa ssp. Japonica cv. Nipponbare) seedling 14 days after germination Illumina Genome Analyzer IIx DRR006601 7518132 571378032

Desktop (please complete the following information):

saketkc commented 2 years ago

Thanks, I will take a look. Also paging @bscrow if he has the bandwidth to debug.

saketkc commented 2 years ago

This should be fixed by #144, thanks once again for reporting!

siebrenf commented 2 years ago

I can confirm both fixes are working for my test set!

Thank you @bscrow for the fixes, and thank you both for the tool! 🚀