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
313 stars 51 forks source link

Stats not saved in output file #178

Open trinidadmartin opened 1 year ago

trinidadmartin commented 1 year ago

Hello! I am having some issues saving the stats generated after a search.

To Reproduce: In Nextflow process

pysradb search -q ${sra_query} -s -g --saveto ${sra_query_out_file}.sra

In my output file I get the results of the search, the plots are perfectly generated but the stats are nowhere Am I doing something wrong?

Desktop (please complete the following information): OS: macOS Big Sur Version 11.1 python: Python 3.9.1

Thanks a lot for the help!! Trini

saketkc commented 1 year ago

The stats are not outputted, but you can use the API to access them as in this notebook: https://colab.research.google.com/drive/1EIXwL31aqnIjfSZXKbm3SdE7K1ULQQ54?usp=sharing

trinidadmartin commented 1 year ago

Thanks for replying so fast! I checked the notebook and yes, it is possible within a python script but, would it be possible to do the same via command line, I mean, to separate pysradb search -q "query" , save the results to a file and then launch the -s option without doing the search again to save the stats in a different file?

Thanks a lot again??

saketkc commented 1 year ago

It is possible, but I currently do not have the bandwidth to do it. I think working through the API would be the best approach for now.