vrmarcelino / CCMetagen

Microbiome classification pipeline
GNU General Public License v3.0
63 stars 19 forks source link

error in taxdump.tar.gz #61

Closed igsbma closed 1 month ago

igsbma commented 7 months ago

Hi there, when I run this command, "CCMetagen.py -i out.res -o results" it gaves message below and then went to error state

NCBI database not present yet (first time used?) Downloading taxdump.tar.gz from NCBI FTP site (via HTTP)...

I then tried to give the database using -r, "CCMetagen.py -i out.res -r taxdump.tar.gz -o results", but it gaves the same error message. still could not find the database.

How should I supply the database? thanks!

vrmarcelino commented 7 months ago

Hi!

The 'NCBI database not present yet' is not an error - it is just to let you know that it needs to download the taxdump file (this only happens the first time you use CCMetagen. It downloads it in your current directory and takes a while. Did the file download completed?

After the download is complete CCMetagen should run without problems. You don't have to specify where it is. And you can delete the taxdump.tar.gz file.

Let me know if it works.

igsbma commented 7 months ago

Thanks for your response. No it does not finish. error message below. That's why I was trying to download it myself and saved it in the same directory with .res file to run the program, still not working.

NCBI database not present yet (first time used?) Downloading taxdump.tar.gz from NCBI FTP site (via HTTP)... Traceback (most recent call last): File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 1319, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/usr/local/packages/python-3.8.2/lib/python3.8/http/client.py", line 1230, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/packages/python-3.8.2/lib/python3.8/http/client.py", line 1276, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/packages/python-3.8.2/lib/python3.8/http/client.py", line 1225, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/packages/python-3.8.2/lib/python3.8/http/client.py", line 1004, in _send_output self.send(msg) File "/usr/local/packages/python-3.8.2/lib/python3.8/http/client.py", line 944, in send self.connect() File "/usr/local/packages/python-3.8.2/lib/python3.8/http/client.py", line 1399, in connect self.sock = self._context.wrap_socket(self.sock, File "/usr/local/packages/python-3.8.2/lib/python3.8/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/usr/local/packages/python-3.8.2/lib/python3.8/ssl.py", line 1040, in _create self.do_handshake() File "/usr/local/packages/python-3.8.2/lib/python3.8/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/packages/python-3.8.2/bin/CCMetagen.py", line 190, in NCBITaxa() File "/usr/local/packages/python-3.8.2/lib/python3.8/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 110, in init self.update_taxonomy_database(taxdump_file) File "/usr/local/packages/python-3.8.2/lib/python3.8/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 129, in update_taxonomy_database update_db(self.dbfile) File "/usr/local/packages/python-3.8.2/lib/python3.8/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 740, in update_db urlretrieve("http://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz", "taxdump.tar.gz") File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 247, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(args) File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(args) File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 1362, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/usr/local/packages/python-3.8.2/lib/python3.8/urllib/request.py", line 1322, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)>

vinisalazar commented 7 months ago

Hi @igsbma,

Looks like an SSL certificate problem. These can happen sometimes with NCBI data. Could you try following the instructions listed here: https://ncbi-taxonomist.readthedocs.io/en/latest/faq.html#i-m-getting-an-ssl-certificate-verify-failed-error and then update the database with the instructions listed here: http://etetoolkit.org/docs/latest/tutorial/tutorial_ncbitaxonomy.html#upgrading-the-local-database

Let us know how you go.

Thank you, Vini

vrmarcelino commented 1 month ago

Closing due to inactivity. If the issue persists feel free to open this again.