Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Phytozome fetch invalid #627

Closed
alpapan opened this issue Feb 14, 2024 · 4 comments
Closed

[Bug] Phytozome fetch invalid #627

alpapan opened this issue Feb 14, 2024 · 4 comments
Assignees

Comments

@alpapan
Copy link

alpapan commented Feb 14, 2024

$ python -m jcvi.apps.fetch
Usage:
    python -m jcvi.apps.fetch ACTION


Available ACTIONs:
        bisect | Determine the version of the accession by querying entrez
       ensembl | Retrieve genomes and annotations from ensembl
        entrez | Fetch records from entrez using a list of GenBank accessions
     phytozome | Retrieve genomes and annotations from phytozome
    phytozome9 | Retrieve genomes and annotations from phytozome version 9.0 (legacy)
           sra | Retrieve files from SRA via the sra-instant FTP

JCVI utility libraries v1.1.17 [Copyright (c) 2010-2024, Haibao Tang]
$ python -m jcvi.apps.fetch phytozome
Phytozome Login: myusername
Phytozome Password:
--2024-02-15 01:12:29--  http://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=PhytozomeV12
Resolving genome.jgi.doe.gov (genome.jgi.doe.gov)... 104.18.38.140, 172.64.149.116, 2606:4700:4400::6812:268c, ...
Connecting to genome.jgi.doe.gov (genome.jgi.doe.gov)|104.18.38.140|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=PhytozomeV12 [following]
--2024-02-15 01:12:29--  https://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=PhytozomeV12
Connecting to genome.jgi.doe.gov (genome.jgi.doe.gov)|104.18.38.140|:443... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: https://genome.jgi.doe.gov/portal/ext-api/downloads/get-directory?organism=PhytozomeV12 [following]
--2024-02-15 01:12:30--  https://genome.jgi.doe.gov/portal/ext-api/downloads/get-directory?organism=PhytozomeV12
Reusing existing connection to genome.jgi.doe.gov:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/xml]
Saving to: '.phytozome_directory_V12.xml'

.phytozome_directory_V12.xml                                [   <=>                                                                                                                          ] 480.05K   548KB/s    in 0.9s

2024-02-15 01:12:33 (548 KB/s) - '.phytozome_directory_V12.xml' saved [491576]

Traceback (most recent call last):
  File "/apps/packages/miniconda/3.1/envs/jcvi/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/apps/packages/miniconda/3.1/envs/jcvi/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/apps/packages/miniconda/3.1/envs/jcvi/lib/python3.9/site-packages/jcvi/apps/fetch.py", line 726, in <module>
    main()
  File "/apps/packages/miniconda/3.1/envs/jcvi/lib/python3.9/site-packages/jcvi/apps/fetch.py", line 136, in main
    p.dispatch(globals())
  File "/apps/packages/miniconda/3.1/envs/jcvi/lib/python3.9/site-packages/jcvi/apps/base.py", line 110, in dispatch
    globals[action](sys.argv[2:])
  File "/apps/packages/miniconda/3.1/envs/jcvi/lib/python3.9/site-packages/jcvi/apps/fetch.py", line 278, in phytozome
    genomes = g.get_genomes()
  File "/apps/packages/miniconda/3.1/envs/jcvi/lib/python3.9/site-packages/jcvi/apps/biomart.py", line 34, in get_genomes
    root = PhytozomePath(next(self.iter(tag="organismDownloads")))
  File "/apps/packages/miniconda/3.1/envs/jcvi/lib/python3.9/site-packages/jcvi/apps/biomart.py", line 69, in __init__
    for child in element.getchildren():
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'
@tanghaibao tanghaibao self-assigned this Feb 14, 2024
@tanghaibao
Copy link
Owner

@alpapan

Thank you for the bug report. I'll take a look when I get back (traveling this week).

Haibao

@tanghaibao
Copy link
Owner

tanghaibao commented Feb 18, 2024

@alpapan

This is due to older version that you use. Would you please try upgrade jcvi by pip install -U jcvi?
This should fix the issue.

I also found an additional issue that was reported in #619 that Vvinifera (grape) is no longer available for download in Phytozome. Since many people are trying out first from the wiki tutorial (which uses grape as an example; peach is fine though), I'll have to use a different example. But this is a data issue, not code issue.

Haibao

@tanghaibao
Copy link
Owner

The wiki is temporarily upgraded to reflect the unavailability of grape via direct download. Please use the portal for a manual download of grape.

@alpapan
Copy link
Author

alpapan commented Feb 19, 2024

Thanks. I used the latest bioconda. Easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants