vinisalazar / metaphor

Metaphor: a general-purpose workflow for assembly and binning of metagenomes
https://metaphor-workflow.readthedocs.io/
Other
37 stars 3 forks source link

Error in No such file or directory: 'y' #44

Closed ganiatgithub closed 1 year ago

ganiatgithub commented 1 year ago

Hi Vini,

I've completed testing, and proceeded with version for data analysis when encountering the following error:

Config file /home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/default-config.yaml is extended by additional config specified via the command line.
FileNotFoundError in file /home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/workflow/rules/common.smk, line 33:
[Errno 2] No such file or directory: 'y'
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/workflow/Snakefile", line 24, in <module>
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/workflow/rules/common.smk", line 33, in <module>
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 912, in read_csv
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 577, in _read
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1407, in __init__
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1661, in _make_engine
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/pandas/io/common.py", line 859, in get_handle
Metaphor did not finish with exit code 1. Please see the error message below.
Traceback (most recent call last):
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/bin/metaphor", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/cli/cli.py", line 260, in main
    args.func(args)
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/cli/execute.py", line 109, in main
    retcode = run_cmd(cmd)
              ^^^^^^^^^^^^
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/utils.py", line 92, in run_cmd
    retcode = check_call(cmd.split())
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['snakemake', '--snakefile', '/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/workflow/Snakefile', '--configfile', 'metaphor_settings.yaml', '--cores', '20', '-p', '-r', '--use-conda', '--wrapper-prefix', 'https://github.com/snakemake/snakemake-wrappers/raw/', '--conda-prefix', '/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda', '--config', 'samples=samples.csv', '--config', 'max_mb=200000']' returned non-zero exit status 1.

I'm not sure what the error meanings, as there is no reference to y in the common.smkfile. Here is my code:

mamba activate metaphor

cd /home/gnii0001/rk81_scratch/gaofeng/projects/12_nutrition/script
metaphor execute \
-i /home/gnii0001/rk81_scratch/gaofeng/projects/12_nutrition/data/00_reads \
-f metaphor_settings.yaml \
-c 20

mamba deactivate

Could you help me troubleshoot?

vinisalazar commented 1 year ago

I suspect it's a problem in your config file. Could you please paste your metaphor_settings.yaml and your samples.csv files here?

If you already have a samples.csv and metaphor_settings.yaml files in the directory you are running Metaphor, there is no need to add the -i and -f flags to your command. Just run metaphor execute -c 20 and it will pick up both the metaphor_settings.yaml and the samples.csv file.

Thanks, V

ganiatgithub commented 1 year ago

Indeed, many thanks!