pirovc / multitax Goto Github PK
View Code? Open in Web Editor NEWPython package to obtain, parse and explore biological taxonomies (GTDB, NCBI, Silva, Greengenes, OTT)
Home Page: https://pirovc.github.io/multitax/
License: MIT License
Python package to obtain, parse and explore biological taxonomies (GTDB, NCBI, Silva, Greengenes, OTT)
Home Page: https://pirovc.github.io/multitax/
License: MIT License
Skip empty lines when parsing tax. files, as reported here (pirovc/ganon#282)
Hello, I have used the multitax package before to mainly translate taxon ids to the taxon name (e.g. 3702 -> Arabidopsis thaliana). When I run code that previously was working, now I get the following error:
>>> from multitax import NcbiTx
>>> ncbi_tx = NcbiTx()
Traceback (most recent call last):
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/urllib/request.py", line 1555, in ftp_open
host = socket.gethostbyname(host)
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/site-packages/multitax/ncbitx.py", line 15, in __init__
super().__init__(**kwargs)
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/site-packages/multitax/multitax.py", line 82, in __init__
fhs = download_files(urls=urls if urls else self._default_urls,
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/site-packages/multitax/utils.py", line 71, in download_files
fileobj=load_url_mem(url), mode='r:gz')
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/site-packages/multitax/utils.py", line 107, in load_url_mem
urlstream = urllib.request.urlopen(url)
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/zfs/omics/personal/asanche2/miniconda3/envs/aa/lib/python3.10/urllib/request.py", line 1557, in ftp_open
raise URLError(msg)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>
Hi, I just ran these three commands, and it raises an Exception:
xapple@local ~ $ python3 -m pip install --user multitax
xapple@local ~ $ ipython3
In [1]: from multitax import GtdbTx
In [2]: tax = GtdbTx()
HTTPError: HTTP Error 404: Not Found
Hi there,
The translation table says that from Silva to NCBI is fully implemented and from NCBI to Silva is partially implemented. And yet I get the following errors.
from multitax import SilvaTx, NcbiTx
silva_tax = SilvaTx()
ncbi_tax = NcbiTx()
ncbi_tax.build_translation(silva_tax)
# /path/to/multitax/ncbitx.py:86: UserWarning: Translation between taxonomies [NcbiTx,SilvaTx] not yet implemented.
silva_tax.build_translation(ncbi_tax)
# /path/to/multitax/silvatx.py:17: UserWarning: Translation between taxonomies [SilvaTx,NcbiTx] not yet implemented.
Is this because the linkage data isn't available in the default data? I'm new to microbiome taxonomy, and some clarity on what linkage data is would be greatly appreciated.
I was attempting to map from NCBI to GTDB taxonomy, when building translation multitax was unable to download GTDB metadata
from multitax import GtdbTx, NcbiTx
ncbi = NcbiTx()
gtdb = GtdbTx()
ncbi.build_translation(gtdb)
Exception: One or more files could not be downloaded: https://data.gtdb.ecogenomic.org/releases/latest/ar53_metadata.tar.gz, https://data.gtdb.ecogenomic.org/releases/latest/bac120_metadata.tar.gz
For r214.1, the metadata is no longer a tarball, appears to be a gzipped tsv: bac120_metadata.tsv.gz, ar53_metadta.tsv.gz. Looks like it would need some different handling in build_translation
as well as that extract tar members.
I'd be happy to put together a pull request to fix, if you're interested.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.