franciscozorrilla / metaGEM

:gem: An easy-to-use workflow for generating context specific genome-scale metabolic models and predicting metabolic interactions within microbial communities directly from metagenomic data
https://franciscozorrilla.github.io/metaGEM/
MIT License
203 stars 42 forks source link

Getting the following error while running the bash metaGEM.sh -t check #142

Closed microbial-cookie closed 11 months ago

microbial-cookie commented 11 months ago

Hi developers,

I'm getting the following error while running the bash metaGEM.sh -t check

Sorry, I don't know how to solve this problem, please help me, thanks a lot!!!!

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/conda/exceptions.py", line 1003, in call return func(*args, **kwargs) File "/usr/lib/python3.6/site-packages/conda/cli/main.py", line 84, in _main exit_code = do_call(args, p) File "/usr/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 82, in do_call exit_code = getattr(module, func_name)(args, parser) File "/usr/lib/python3.6/site-packages/conda/cli/main_list.py", line 142, in execute show_channel_urls=context.show_channel_urls) File "/usr/lib/python3.6/site-packages/conda/cli/main_list.py", line 80, in print_packages show_channel_urls=show_channel_urls) File "/usr/lib/python3.6/site-packages/conda/cli/main_list.py", line 45, in list_packages installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(), File "/usr/lib/python3.6/site-packages/conda/core/prefix_data.py", line 117, in iter_records return itervalues(self._prefix_records) File "/usr/lib/python3.6/site-packages/conda/core/prefix_data.py", line 146, in _prefix_records return self.__prefix_records or self.load() or self.__prefix_records File "/usr/lib/python3.6/site-packages/conda/core/prefix_data.py", line 70, in load self._load_site_packages() File "/usr/lib/python3.6/site-packages/conda/core/prefix_data.py", line 261, in _load_site_packages python_record = read_python_record(self.prefix_path, af, python_pkg_record.version) File "/usr/lib/python3.6/site-packages/conda/gateways/disk/read.py", line 253, in read_python_record paths_tups = pydist.get_paths() File "/usr/lib/python3.6/site-packages/conda/common/pkg_formats/python.py", line 268, in get_paths records = sorted(concatv(records, ((pf, None, None) for pf in missing_pyc_files))) TypeError: '<' not supported between instances of 'str' and 'NoneType'

$ /usr/bin/conda list

environment variables: CIO_TEST= CONDA_DEFAULT_ENV=metagem CONDA_EXE=/usr2/people/ruiwenhu/miniconda3/bin/conda CONDA_PREFIX=/usr2/people/ruiwenhu/miniconda3/envs/metagem CONDA_PREFIX_1=/usr2/people/ruiwenhu/miniconda3 CONDA_PREFIX_2=/usr2/people/ruiwenhu/miniconda3/envs/metagem CONDA_PREFIX_3=/usr2/people/ruiwenhu/miniconda3 CONDA_PROMPT_MODIFIER=(metagem) CONDA_PYTHON_EXE=/usr2/people/ruiwenhu/miniconda3/bin/python CONDA_ROOT=/usr/share/conda CONDA_SHLVL=4 GTDBTK_DATA_PATH=/usr2/people/ruiwenhu/miniconda3/envs/metagem/share/gtdbtk-1.7.0/db/ MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles PATH=/usr2/people/ruiwenhu/miniconda3/envs/metagem/bin:/usr/lib64/qt-3.3/bi n:/usr/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr 2/people/ruiwenhu/cplex/cplex/bin/x86-64_linux:/usr2/people/ruiwenhu/c plex/cpoptimizer/bin/x86-64_linux QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins REQUESTS_CA_BUNDLE= SSL_CERT_FILE=

 active environment : /usr2/people/ruiwenhu/miniconda3/envs/metagem
active env location : /usr2/people/ruiwenhu/miniconda3/envs/metagem
        shell level : 4
   user config file : /usr2/people/ruiwenhu/.condarc

populated config files : /usr/share/conda/condarc.d/defaults.yaml /usr2/people/ruiwenhu/.condarc conda version : 4.6.14 conda-build version : not installed python version : 3.6.8.final.0 base environment : /usr (read only) channel URLs : https://conda.anaconda.org/ursky/linux-64 https://conda.anaconda.org/ursky/noarch https://conda.anaconda.org/bioconda/linux-64 https://conda.anaconda.org/bioconda/noarch https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/linux-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /var/cache/conda/pkgs /usr2/people/ruiwenhu/.conda/pkgs envs directories : /usr2/people/ruiwenhu/.conda/envs /usr/envs platform : linux-64 user-agent : conda/4.6.14 requests/2.14.2 CPython/3.6.8 Linux/3.10.0-1160.15.2.el7.x86_64 centos/7.9.2009 glibc/2.17 UID:GID : 19524:100 netrc file : None offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve future releases of conda. Would you like conda to send this report to the core maintainers?

no

No report sent. To permanently opt-out, use

$ conda config --set report_errors false

WARNING: Conda is not available! Please load your cluster's conda module or install locally.

franciscozorrilla commented 11 months ago

Hey Ruiwen, hmm those are some strange error messages. Could you provide more information as to how you installed metagem?

WARNING: Conda is not available! Please load your cluster's conda module or install locally.

Is it possible that you forgot to load the conda module, and/or forgot to load the metagem env before running that command?

Best, Francisco

microbial-cookie commented 11 months ago

Hi Francisco,

I used this command (mamba create -n metagem -c bioconda metagem) to install the metagem, and I used these commands (git clone https://github.com/franciscozorrilla/metaGEM.git && cd metaGEM/workflow and bash metaGEM.sh -t check) to test it whether working. I don't know where is wrong with my commands.

image

Best Ruiwen

franciscozorrilla commented 11 months ago

Thanks for clarifying the installation method and providing further info. Based on the error messages in your original post it seems like the error is related to conda, can you make sure that the conda module/package is loaded/installed?

microbial-cookie commented 11 months ago

Yes, I'm sure I have installed conda in my account, but I don't know how to check it whether or not load? I used the command (conda activate metagem) to use metagem. But when I run bash metaGEM.sh -t check, it indicated wrong. Maybe metaGEM.sh didn't have command to activate conda in my account? I just get and run your metaGEM.sh by using this command (git clone https://github.com/franciscozorrilla/metaGEM.git && cd metaGEM/workflow).

image

microbial-cookie commented 11 months ago

Hi,

Maybe I can remove the installed metagem tool, and based on another methods (see below) to install once again??

image

franciscozorrilla commented 11 months ago

Thanks for the follow up. Before trying to remove and install again, maybe just try running some small jobs using the Snakefile or the metaGEM.sh script. It is possible that everything is correctly installed, and simply the check command is bugging out for some reason on your system. You could also try using the conda list command to check if the packages have been installed in the metagem env, if so, you are good to go. Just FYI, the check command just looks to see if there is a conda env with the name metagem, so you should be passing the check based on your screen shot.

https://github.com/franciscozorrilla/metaGEM/blob/cb099b7a557af8bddbd3b257670d263be3ac5a1f/workflow/metaGEM.sh#L99-L120

microbial-cookie commented 11 months ago

Hi, I have check if the conda packages have been installed in the metagem env using conda list, but I didn't find it. I don't know how solve it? could you give suggestions? image image

franciscozorrilla commented 11 months ago

Hey Ruiwen,

Based on those screenshots it looks like you were able to succsessfully install many of the dependencies needed for metagenomics analysis with metaGEM. Happy to help with any follow up questions, good luck!

Best, Francisco