raw-lab / MetaCerberus

Python code for versatile Functional Ontology Assignments for Metagenomes searching via Hidden Markov Model (HMM) with environmental focus of shotgun metaomics data
BSD 3-Clause "New" or "Revised" License
46 stars 7 forks source link

download error while setting up dbs... #15

Closed telatin closed 4 months ago

telatin commented 5 months ago

Hi there, thanks for this tool! I tried downloading the dbs with metacerberus.py --setup and got:

Downloading Database files to /usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/site-packages/meta_cerberus/DB
This will take a few minutes...
Downloading CAZy
Downloading COG
Downloading PHROG
Downloading VOG
Downloading KOFam
Traceback (most recent call last):
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/bin/metacerberus.py", line 857, in <module>
    sys.exit(main())
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/bin/metacerberus.py", line 192, in main
    metacerberus_setup.Download(pathDB)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/site-packages/meta_cerberus/metacerberus_setup.py", line 79, in Download
    url.urlretrieve("https://osf.io/gk7vx/download", os.path.join(pathDB, "KOFam_eukaryote.hmm.gz"))
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 241, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/users/QIB_fr009/telatina/micromamba/envs/metacerberus/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error

I assume the error is with the last db (KOFam), I just report this in case it could make sense to download the available dbs and just report those who couldn't be downloaded, or just report errors in a different way

decrevi commented 5 months ago

Hello, thank you for your feedback.

I am working on fixing this up with the next release. The next version will also be able to download individual databases, so if one fails it doesn't force a download of all of them again.

It seems to me that this error was caused by a network issue not related to MetaCerberus, since the link it failed on is working (https://osf.io/gk7vx/download)

I will make sure that error messages here are more informative.

telatin commented 5 months ago

Yes I just re-run it and worked. I meant exactly what you said about exception handling and of course allowing for individual db download is also nice. Thanks

On Thu, 4 Apr 2024 at 17:34, Jose Figueroa @.***> wrote:

Hello, thank you for your feedback.

I am working on fixing this up with the next release. The next version will also be able to download individual databases, so if one fails it doesn't force a download of all of them again.

It seems to me that this error was caused by a network issue not related to MetaCerberus, since the link it failed on is working ( https://osf.io/gk7vx/download)

I will make sure that error messages here are more informative.

— Reply to this email directly, view it on GitHub https://github.com/raw-lab/MetaCerberus/issues/15#issuecomment-2037679968, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXWYXGSUWBEPU5R7OXBASDY3V6J5AVCNFSM6AAAAABFXHMX52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZXGY3TSOJWHA . You are receiving this because you authored the thread.Message ID: @.***>

raw-lab commented 4 months ago

Thank you for using MetaCerberus. We will add the individual db download in version 1.3. If there are other databases or custom databases we can add for your needs please let us know? We are going to close this for now.