From 759f2cc0da2fda96610a5d4bd0b8f65dd96a3566 Mon Sep 17 00:00:00 2001 From: vladsaveliev Date: Fri, 3 May 2024 21:39:38 +0200 Subject: [PATCH 1/5] Fixes for MultiQC version 1.22 --- multiqc_ngi/__init__.py | 2 +- multiqc_ngi/multiqc_ngi.py | 3 ++- multiqc_ngi/templates/ngi/header.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) 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..3d9c079 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') 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 @@

JavaScript Disabled

  (6:06) -{% if report.num_hc_plots > 0 and report.general_stats_html['rows'] | length > config.num_datasets_plot_limit %} +{% if report.plot_data | length > 0 and report.general_stats_html['rows'] | length > config.num_datasets_plot_limit %}
From a192584be217a47174e3e8a83f0811306956b5f9 Mon Sep 17 00:00:00 2001 From: vladsaveliev Date: Fri, 3 May 2024 21:42:09 +0200 Subject: [PATCH 2/5] Pin MultiQC --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 26461c8..2aa9862 100755 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ 'simplejson', 'pyyaml', 'requests', - 'multiqc' + 'multiqc>=1.22.dev0' ], entry_points = { 'multiqc.templates.v1': [ From 1ace4a135f313c9ed7f338da91f0a09a3d889323 Mon Sep 17 00:00:00 2001 From: vladsaveliev Date: Mon, 6 May 2024 15:56:34 +0200 Subject: [PATCH 3/5] write_data_file is a method of report --- multiqc_ngi/multiqc_ngi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiqc_ngi/multiqc_ngi.py b/multiqc_ngi/multiqc_ngi.py index 3d9c079..2b0315e 100644 --- a/multiqc_ngi/multiqc_ngi.py +++ b/multiqc_ngi/multiqc_ngi.py @@ -322,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() From 1147bc0d73ccb019c9209287f28567cbaf9161e6 Mon Sep 17 00:00:00 2001 From: vladsaveliev Date: Mon, 13 May 2024 10:24:03 +0200 Subject: [PATCH 4/5] modules_ouptut -> modules --- multiqc_ngi/multiqc_ngi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiqc_ngi/multiqc_ngi.py b/multiqc_ngi/multiqc_ngi.py index 2b0315e..a5e2cee 100644 --- a/multiqc_ngi/multiqc_ngi.py +++ b/multiqc_ngi/multiqc_ngi.py @@ -296,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 = { From 07d0f4a046cbc14f1cfaeea0c0f655529e099231 Mon Sep 17 00:00:00 2001 From: vladsaveliev Date: Fri, 17 May 2024 06:54:12 -0400 Subject: [PATCH 5/5] Fix for analysis_dir as Path --- multiqc_ngi/multiqc_ngi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiqc_ngi/multiqc_ngi.py b/multiqc_ngi/multiqc_ngi.py index a5e2cee..efd3a56 100644 --- a/multiqc_ngi/multiqc_ngi.py +++ b/multiqc_ngi/multiqc_ngi.py @@ -234,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'