diff --git a/multiqc_ngi/__init__.py b/multiqc_ngi/__init__.py index 5a6366f..18d4afa 100644 --- a/multiqc_ngi/__init__.py +++ b/multiqc_ngi/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from importlib.metadata import version -from multiqc.utils import config +from multiqc import config __version__ = version("multiqc_ngi") config.multiqc_ngi_version = __version__ diff --git a/multiqc_ngi/multiqc_ngi.py b/multiqc_ngi/multiqc_ngi.py index 1ddf522..efd3a56 100644 --- a/multiqc_ngi/multiqc_ngi.py +++ b/multiqc_ngi/multiqc_ngi.py @@ -18,7 +18,8 @@ __version__ = version("multiqc_ngi") -from multiqc.utils import report, util_functions, config +from multiqc import report, config +from multiqc.utils import util_functions log = logging.getLogger('multiqc') @@ -233,7 +234,7 @@ def get_ngi_project_metadata(self, pid): config.title = '{}: {}'.format(pid, p_summary['project_name']) config.project_name = p_summary['project_name'] - if config.analysis_dir and ('qc_ngi' in config.analysis_dir[0] or 'qc_ngi' in os.listdir()): + if config.analysis_dir and ('qc_ngi' in str(config.analysis_dir[0]) or 'qc_ngi' in os.listdir()): infix = 'qc' else: infix = 'pipeline' @@ -295,7 +296,7 @@ def get_ngi_samples_metadata(self, pid, s_names=None): def fastqscreen_genome(self): """Add the Refrence genome from statusdb to fastq_screen html""" if report.ngi.get('reference_genome') is not None: - for m in report.modules_output: + for m in report.modules: if m.anchor == 'fastq_screen': genome=report.ngi['reference_genome'] nice_names = { @@ -321,7 +322,7 @@ def general_stats_sample_meta(self): log.info('Found {} samples in StatusDB'.format(len(meta))) # Write to file - util_functions.write_data_file(meta, 'ngi_meta') + report.write_data_file(meta, 'ngi_meta') # Add to General Stats table gsdata = dict() diff --git a/multiqc_ngi/templates/ngi/header.html b/multiqc_ngi/templates/ngi/header.html index 0291e7d..6bef2b4 100644 --- a/multiqc_ngi/templates/ngi/header.html +++ b/multiqc_ngi/templates/ngi/header.html @@ -118,7 +118,7 @@