Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in code for UndeterminedPercentageHandler #98

Open
maleasy opened this issue Aug 19, 2021 · 2 comments
Open

Error in code for UndeterminedPercentageHandler #98

maleasy opened this issue Aug 19, 2021 · 2 comments
Labels

Comments

@maleasy
Copy link

maleasy commented Aug 19, 2021

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.

@matrulda matrulda added the bug label Aug 24, 2021
@matrulda
Copy link
Collaborator

Thanks for reporting, @maleasy ! I think this issue is caused by interop v1.1.10 not being supported in python 3.9. Support for that python version was added in this release https://github.com/Illumina/interop/releases/tag/v1.1.18. Until we solve this issue you should be able to run CheckQC in an environment with python 3.6 installed.

@maleasy
Copy link
Author

maleasy commented Sep 6, 2021

Thank you for your answer! I created a new conda env with python 3.6 and installed checkQC, which lead to the same ModuleNotFoundError for interop.
Installing with pip in a python 3.6 env works (but that already worked using python 3.9). The interop version is interop-1.1.23
CheckQC still throws the same KeyError exception as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants