Skip to content

Error in code for UndeterminedPercentageHandler #98

Description

@maleasy

When running checkQC on a MiSeq run, i get the following error:

Traceback (most recent call last):
  File "/home/maleasy/miniconda3/envs/checkqc/bin/checkqc", line 8, in <module>
    sys.exit(start())
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/checkQC/app.py", line 41, in start
    app.run()
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/checkQC/app.py", line 104, in run
    reports = self.configure_and_run()
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/checkQC/app.py", line 87, in configure_and_run
    reports = qc_engine.run()
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/checkQC/qc_engine.py", line 61, in run
    reports = self._compile_reports()
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/checkQC/qc_engine.py", line 103, in _compile_reports
    handler_report = handler.report()
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/checkQC/handlers/qc_handler.py", line 240, in report
    sorted_errors_and_warnings = sorted(errors_and_warnings, key=lambda x: x.ordering)
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/checkQC/handlers/undetermined_percentage_handler.py", line 75, in check_qc
    if self.error() != self.UNKNOWN and percentage_undetermined > compute_threshold(self.error()):
  File "/home/maleasy/miniconda3/envs/checkqc/lib/python3.9/site-packages/checkQC/handlers/undetermined_percentage_handler.py", line 66, in compute_threshold
    return value + mean_phix_per_lane[lane_nbr]
KeyError: 1

When commenting out the handler in the config file it works:

...
default_handlers:
#  - name: UndeterminedPercentageHandler
#    warning: unknown
#    error: 9 # <% Phix on lane> + < value as %>
...

Possibly related: I tried to install checkqc 3.6.5 with conda, which seemed to work, but running checkQC lead to an error

ModuleNotFoundError: No module named 'interop'

conda however says that illumina-interop is installed.
I then installed checkQC with pip in a new, clean conda env, which worked, but shows the error described above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions