Hello @glarue
I am launching the script to retrieve all the fungal assembly sequences in fasta format, but it is showing me this error:
python3 jgi-query.py fungi
Retrieving information from JGI for query 'fungi' using command 'curl 'https://genome.jgi.doe.gov/portal/ext-api/downloads/get-directory?
organism=fungi' -L -b cookies > fungi_jgi_index.xml'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 92 0 92 0 0 0 0 --:--:-- 0:10:00 --:--:-- 28
Traceback (most recent call last):
File /JGI-db/jgi-query-main/jgi-query.py", line 1151, in <module>
if not any(v["results"] for v in list(file_list.values())):
AttributeError: 'NoneType' object has no attribute 'values'
Do you have a solution?
Hi glarue,
I have read the script "jgi-query.py" from https://github.com/glarue/jgi-query, but I don't understand it yet.
I want to download metagenomes from JGI using API.
Does your script work for downloading metagenomes from JGI?
Best, Bing
Geez, sorry to have missed this for so long—my notification settings must not be set up correctly.
The answer to your question depends on what you mean by "metagenome", and the way in which JGI structures its databases, although I fear the answer may be "no". Basically, you have to provide a category to
jgi-query, and all of the files organized under that category will be listed. If you are interested in multiple fungal genomes, for example, you can use the queryfungito retrieve a (huge) list of all available files, and then download individual files from within that set (probably using the regex optionrat the prompt). If the species you are interested in are not in fungi, you will have to experiment to identify a sufficiently broad query that includes everything you're interested in.jgi-querywas originally designed for grabbing files on a per-species basis. It can download large file sets, however, but how well that will work depends on your specific needs. Hope that helps clarify things.