mdmparis / defense-finder

Systematic search of all known anti-phage systems.
GNU General Public License v3.0
76 stars 13 forks source link

error when using unordered db-type #46

Closed schmittel closed 8 months ago

schmittel commented 9 months ago

Hi,

Thanks for this great program.

I'm having an issue when running diefense-finder on a large number of genomes and using the unordered db-type (for my purposes I require this instead of gembase or ordered). Specifically the error I'm getting is:

command used: /code/conda_envs/defense/bin/macsyfinder --db-type unordered --sequence-db /multiple/v1_genomic.faa --models defense-finder-models/Cas all --out-dir /defense_finder/output/v1_genomic/defense-finder-tmp/Cas --accessory-weight 1 --exchangeable-weight 1 --coverage-profile 0.4 -w 50
Traceback (most recent call last):
  File "/code/conda_envs/defense/bin/macsyfinder", line 8, in <module>
    sys.exit(main())
  File "/code/conda_envs/defense/lib/python3.10/site-packages/macsypy/scripts/macsyfinder.py", line 1054, in main
    models_def_to_detect = get_def_to_detect(config.models(), model_registry)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/macsypy/utils.py", line 48, in get_def_to_detect
    def_to_detect = model_loc.get_all_definitions(root_def_name=root)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/macsypy/registries.py", line 309, in get_all_definitions
    root_def = self.get_definition(root_def_name)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/macsypy/registries.py", line 292, in get_definition
    raise ValueError(f"{level} does not match with any definitions")
ValueError: Cas does not match with any definitions
Traceback (most recent call last):
  File "/code/conda_envs/defense/bin/defense-finder", line 8, in <module>
    sys.exit(cli())
  File "/code/conda_envs/defense/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/code/conda_envs/defense/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/defense_finder_cli/main.py", line 76, in run
    defense_finder_posttreat.run(tmp_dir, outdir)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/defense_finder_posttreat/__init__.py", line 9, in run
    bs = best_solution.get(tmp_dir)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/defense_finder_posttreat/best_solution.py", line 10, in get
    acc = acc + parse_best_solution(family_path)
  File "/code/conda_envs/defense/lib/python3.10/site-packages/defense_finder_posttreat/best_solution.py", line 15, in parse_best_solution
    tsv_file = open(os.path.join(dir, 'best_solution.tsv'))
FileNotFoundError: [Errno 2] No such file or directory: '/defense_finder/output/v1_genomic/defense-finder-tmp/DF_1/best_solution.tsv'

Are you able to help with this?

Many thanks

decaturjimbo commented 9 months ago

I am also having this issue. Did you find a solution?

schmittel commented 8 months ago

No, not yet. The error still occurs with the latest version.

jeanrjc commented 8 months ago

Could you share your input genome with which it fails, and what is the command line you used ?

jeanrjc commented 8 months ago

Closing in favor of #40