-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error occurred while ETE3 updating NCBI taxonomy database #2
Comments
Hello SamLMG, If you need a fix, I would suggest you to do as follow:
This maybe caused by a change of NCBI's taxonomy data, which unexpectedly generated same entries, and broke the code. |
Or, you can use the already downloaded taxdump.tar.gz. If so, please do as follow:
from ete3 import NCBITaxa
from os import path
ncbi = NCBITaxa(taxdump_file=path.abspath('taxdump.tar.gz') This method reused the old |
reference to #2, this enabled a choice to directly use already downloaded file in the repo, without downloading it.
Hi, |
To prevent problems from #2 since ete3 is likely to be inactive in future days.
Fixed by hacking into ETE3 module in The main part of MitoFlex did not have a patch like this to prevent instability occurring from inside, so running |
Hi all, |
Hello,
I'm having the following issue with ete3 when running the ./ncbi.py script
Do you have any ideas what the issue here might be?
Thanks in advance
Sam
(mitoflex) [leeming@l33 test1]$ ../ncbi.py
Filesystem status:
Total: 109.00 GB
Free: 98.00 GB
If the free disk space is too low (<1G), database updating can be failed!
Downloading taxdump.tar.gz from NCBI FTP site (via HTTP)...
Done. Parsing...
Loading node names...
2269854 names loaded.
226194 synonyms loaded.
Loading nodes...
2269854 nodes loaded.
Linking nodes...
Tree is loaded.
Updating database: /home/lv71312/leeming/.etetoolkit/taxa.sqlite ...
2269000 generating entries...
Uploading to /home/lv71312/leeming/.etetoolkit/taxa.sqlite
Inserting synonyms: 60000 Errors occured when fetching data from NCBI database, falling back to the last fetched database.
Loading node names...
2269574 names loaded.
225837 synonyms loaded.
Loading nodes...
2269574 nodes loaded.
Linking nodes...
Tree is loaded.
Updating database: /home/lv71312/leeming/.etetoolkit/taxa.sqlite ...
2269000 generating entries...
Uploading to /home/lv71312/leeming/.etetoolkit/taxa.sqlite
Traceback (most recent call last):
File "../ncbi.py", line 65, in
ncbi.update_taxonomy_database()
File "/home/lv71312/leeming/miniconda3/envs/mitoflex/lib/python3.6/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 129, in update_taxonomy_database
update_db(self.dbfile)
File "/home/lv71312/leeming/miniconda3/envs/mitoflex/lib/python3.6/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 760, in update_db
upload_data(dbfile)
File "/home/lv71312/leeming/miniconda3/envs/mitoflex/lib/python3.6/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 802, in upload_data
db.execute("INSERT INTO synonym (taxid, spname) VALUES (?, ?);", (taxid, spname))
sqlite3.IntegrityError: UNIQUE constraint failed: synonym.spname, synonym.taxid
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "../ncbi.py", line 80, in
ncbi = NCBITaxa(taxdump_file=os.path.abspath(dump_file))
File "/home/lv71312/leeming/miniconda3/envs/mitoflex/lib/python3.6/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 106, in init
self.update_taxonomy_database(taxdump_file)
File "/home/lv71312/leeming/miniconda3/envs/mitoflex/lib/python3.6/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 131, in update_taxonomy_database
update_db(self.dbfile, taxdump_file)
File "/home/lv71312/leeming/miniconda3/envs/mitoflex/lib/python3.6/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 760, in update_db
upload_data(dbfile)
File "/home/lv71312/leeming/miniconda3/envs/mitoflex/lib/python3.6/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 791, in upload_data
db.execute(cmd)
sqlite3.OperationalError: database is locked
The text was updated successfully, but these errors were encountered: