Skip to content

Karmaflu fails to execute in directory with only genome and metadata files #2

Description

@fanninpm

Describe the bug
The karmaflu shell script does not know that it is being executed from a different place that where it is being stored, so Snakemake gets passed incorrect parameters.

Impact
Not applicable, since this is just a test.

To Reproduce
Steps to reproduce the behavior:

  1. mkdir my_karmaflu_run
  2. cp DAIS_ribosome.gen metadata.csv my_karmaflu_run
  3. cd my_karmaflu_run
  4. apptainer run --bind "${PWD}":/opt/karmaflu docker://cdcgov/karmaflu:v0.0.0 classify --genome DAIS_ribosome.gen --metadata metadata.csv (I expect that IT will never allow us to use Docker under any circumstances!)
  5. See error

Expected behavior
The workflow should run to completion without errors.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs

Traceback (most recent call last):

  File "/opt/conda/envs/Snakemake/lib/python3.12/site-packages/snakemake/cli.py", line 2173, in args_to_api
    config_settings=ConfigSettings(
                    ^^^^^^^^^^^^^^^

  File "<string>", line 7, in __init__

  File "/opt/conda/envs/Snakemake/lib/python3.12/site-packages/snakemake/settings/types.py", line 408, in __post_init__
    self.overwrite_config = self._get_overwrite_config()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/conda/envs/Snakemake/lib/python3.12/site-packages/snakemake/settings/types.py", line 416, in _get_overwrite_config
    update_config(overwrite_config, load_configfile(f))
                                    ^^^^^^^^^^^^^^^^^^

  File "/opt/conda/envs/Snakemake/lib/python3.12/site-packages/snakemake/common/configfile.py", line 38, in load_configfile
    config = _load_configfile(configpath)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/conda/envs/Snakemake/lib/python3.12/site-packages/snakemake/common/configfile.py", line 12, in _load_configfile
    obj = open(configpath_or_obj, encoding="utf-8")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

FileNotFoundError: [Errno 2] No such file or directory: 'workflows/classify_config.yaml'

Desktop (please complete the following information):

  • OS: [e.g. iOS] SLES
  • Browser [e.g. chrome, safari] N/A
  • Version [e.g. 22] 15.7

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] N/A
  • OS: [e.g. iOS8.1] N/A
  • Browser [e.g. stock browser, safari] N/A
  • Version [e.g. 22] N/A

Additional context
cc @nbx0 @friesac

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions