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

MultiQC crashes when run more than once as a Library #1141

Closed
bnbowman opened this issue Mar 30, 2020 · 0 comments · Fixed by #1518
Closed

MultiQC crashes when run more than once as a Library #1141

bnbowman opened this issue Mar 30, 2020 · 0 comments · Fixed by #1518
Assignees

Comments

@bnbowman
Copy link
Contributor

bnbowman commented Mar 30, 2020

Description of bug:
I am attempting to write a script to execute MultiQC independently on a series of inputs for different lanes / samples, so that I can automate the generation of separate reports for each sample that was multiplexed together in a run. This is to support a Genomics Core that wants to have automatically generated HTML reports to give to their customers, but doesn't want give Customer A a report that includes Customer B's data, for obvious reasons.

Unfortunately, all of my attempts to do so end in a crash on the second invocation of MultiQC, from what appears to be a missing temp directory.

MultiQC Error log:

Traceback (most recent call last):
  File "./multimultiqc", line 12, in <module>
    multiqc.run(fn, outdir=fn + "_qc2")
  File "/Users/bbowman/git/MultiQC_2/multiqc/multiqc.py", line 304, in run
    config.mqc_load_userconfig(config_file)
  File "/Users/bbowman/git/MultiQC_2/multiqc/utils/config.py", line 99, in mqc_load_userconfig
    mqc_load_config(os.path.join( os.path.dirname(MULTIQC_DIR), 'multiqc_config.yaml'))
  File "/Users/bbowman/git/MultiQC_2/multiqc/utils/config.py", line 130, in mqc_load_config
    logger.debug("No MultiQC config found: {}".format(yaml_config))
  File "/Users/bbowman/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 1273, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/Users/bbowman/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 1421, in _log
    self.handle(record)
  File "/Users/bbowman/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 1431, in handle
    self.callHandlers(record)
  File "/Users/bbowman/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 1493, in callHandlers
    hdlr.handle(record)
  File "/Users/bbowman/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 861, in handle
    self.emit(record)
  File "/Users/bbowman/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 1053, in emit
    self.stream = self._open()
  File "/Users/bbowman/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 1043, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/9r/3nv2jdjs16qbgg95b5fqwncj70fqc_/T/tmpu07m84bx/multiqc.log'

File that triggers the error:
Any valid input file or directory appears to be able to trigger this crash, but "multiqc.run()" must be called more than once in the same Python execution.

MultiQC run details (please complete the following):

Error was triggered by feeding >1 valid input files/directories to the following script:

import sys
import multiqc

for fn in sys.argv[1:]:
    if fn.endswith("/"):
        fn = fn[:-1]
    multiqc.run(fn, outdir=fn + "_multiqc")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants