Skip to content

Commit

Permalink
Merge pull request #10 from vladsavelyev/multiqc_v1_22
Browse files Browse the repository at this point in the history
Fixes for MultiQC v1.22
  • Loading branch information
aanil authored Jun 14, 2024
2 parents 8b2121d + 07d0f4a commit 3f9b9a6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion multiqc_ngi/__init__.py
Original file line number Diff line number Diff line change
@@ -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__
9 changes: 5 additions & 4 deletions multiqc_ngi/multiqc_ngi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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 = {
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion multiqc_ngi/templates/ngi/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h4>JavaScript Disabled</h4>
&nbsp; <small><em>(6:06)</em></small>
</div>

{% 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 %}
<div id="mqc-warning-many-samples" class="alert alert-warning alert-dismissible hidden-print">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
'simplejson',
'pyyaml',
'requests',
'multiqc'
'multiqc>=1.22.dev0'
],
entry_points = {
'multiqc.templates.v1': [
Expand Down

0 comments on commit 3f9b9a6

Please sign in to comment.