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

pysradb download not working #14

Closed fgypas closed 4 years ago

fgypas commented 4 years ago

Description

I tried to download an SRP project.

What I Did

pysradb download SRP083135

It returns the help message

When I try:

pysradb metadata SRP083135

I get a table with the study_accession, experiment_accession, sample_accession and run_accession.

saketkc commented 4 years ago

Hi @fgypas,

The correct usage is:

pysradb download -p SRP083135

Can you post the error message you get when you run the above command?

Thanks!

fgypas commented 4 years ago

Hi @saketkc

Thank you for the response.

I get the following error message:

File "miniconda3/envs/pysradb/bin/pysradb", line 10, in sys.exit(parse_args()) File "miniconda3/envs/pysradb/lib/python3.8/site-packages/pysradb/cli.py", line 1044, in parse_args download(args.out_dir, args.db, args.srx, args.srp, args.skip_confirmation) File "miniconda3/envs/pysradb/lib/python3.8/site-packages/pysradb/cli.py", line 139, in download sradb.download( File "miniconda3/envs/pysradb/lib/python3.8/site-packages/pysradb/sradb.py", line 1249, in download srapaths = self._srapath_url(df.study_accession.unique()[0]) File "miniconda3/envs/pysradb/lib/python3.8/site-packages/pysradb/sradb.py", line 1174, in _srapath_url raise Exception("Unable to run srapath.") Exception: Unable to run srapath.

Foivos

saketkc commented 4 years ago

Thanks @fgypas. I confirm this is a bug and is arising because of pysradb relying on srapath to get the new URLs. I will have a temporary fix soon.

Thanks once again and sorry that pysradb is not completely useful for your use case at the moment.

deepthi888 commented 4 years ago

Hi @saketkc, could you please provide me some information on how to store the result which we get from "pysradb metadata SRP063732 --desc --expand" into pandas dataframe

Thanks in advance

saketkc commented 4 years ago

Hi @deepthi888, You can save the output to a tab separated file by doing:

pysradb metadata SRP063732 --desc --expand --saveto SRP063732.tsv
deepthi888 commented 4 years ago

Hi @saketkc, could you please provide me information on how to fetch the name of the organism by giving project id and also how to get the count of runs and experiments of each project I tried with this "pysradb metadata SRP063732 --desc --expand --detailed" but it fetched all the attributes information except name of the organism.

Thanks in advance

saketkc commented 4 years ago

@deepthi888 Can you please open a separate issue for your question? Thanks!

saketkc commented 4 years ago

Hi @fgypas,

I can confirm that v0.9.9 of pysradb fixes this. Please let me know if you run into any issues and thanks a lot for your patience!