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 cannot handle dashes in the strategy argument #142

Closed siebrenf closed 2 years ago

siebrenf commented 2 years ago

Describe the bug when using pysradb search -d ena with the --strategty flag, a value containing a dash fails to produce a result.

--strategy must be one of the following: 
AMPLICON, ATAC-seq, Bisulfite-Seq, CLONE, CLONEEND, CTS, ChIA-PET, ChIP-Seq, 
DNase-Hypersensitivity, EST, FAIRE-seq, FINISHING, FL-cDNA, Hi-C, MBD-Seq, MNase-Seq,
MRE-Seq, MeDIP-Seq, OTHER, POOLCLONE, RAD-Seq, RIP-Seq, RNA-Seq, SELEX, 
Synthetic-Long-Read, Targeted-Capture, Tethered Chromatin Conformation Capture, 
Tn-Seq, VALIDATION, WCS, WGA, WGS, WXS, miRNA-Seq, ncRNA-Seq, ssRNA-seq, GBS

To Reproduce

# these work
pysradb search -d sra -m 1 --strategy RNA-seq
pysradb search -d geo -m 1 --strategy ATAC-seq
pysradb search -d ena -m 1 --strategy WGS

# these don't work
pysradb search -d ena -m 1 --strategy RNA-seq
pysradb search -d ena -m 1 --strategy ChIP-seq
pysradb search -d ena -m 1 --strategy ATAC-seq

Desktop (please complete the following information):

Additional context My guess would be its related to your strategy matcher.

saketkc commented 2 years ago

Thanks for reporting. I can confirm this is a bug. I will take a deeper look soon. @bscrow

saketkc commented 2 years ago

@bscrow fixed this in #144, let us know if you encounter any issues.