Skip to content

yacht convert crashes when genome-to-taxid file is empty, should exit more gracefully #134

@mahmudhera

Description

@mahmudhera

Current implementation, when invoked on an empty genome-to-taxid file, produces the following output:

Traceback (most recent call last):
  File "/home/grads/sjw6257/mambaforge/envs/yacht_env/bin/yacht", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/grads/sjw6257/mambaforge/envs/yacht_env/lib/python3.11/site-packages/yacht/__init__.py", line 134, in main
    args.func(args)
  File "/home/grads/sjw6257/mambaforge/envs/yacht_env/lib/python3.11/site-packages/yacht/standardize_yacht_output.py", line 134, in main
    standardize_yacht_output.run(
  File "/home/grads/sjw6257/mambaforge/envs/yacht_env/lib/python3.11/site-packages/yacht/standardize_yacht_output.py", line 481, in run
    result = self.__to_cami(sample_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/grads/sjw6257/mambaforge/envs/yacht_env/lib/python3.11/site-packages/yacht/standardize_yacht_output.py", line 217, in __to_cami
    result[
TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    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