From 763ac90a39a7092c08785a0444e01b573db36641 Mon Sep 17 00:00:00 2001 From: Venkat Malladi <venkat.malladi@utsouthwestern.edu> Date: Mon, 15 Apr 2019 11:23:22 -0500 Subject: [PATCH] Fix config for references. --- workflow/conf/multiqc_config.yaml | 36 +++++++++++++++++++++++++ workflow/main.nf | 4 +-- workflow/scripts/generate_references.py | 13 ++++----- 3 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 workflow/conf/multiqc_config.yaml diff --git a/workflow/conf/multiqc_config.yaml b/workflow/conf/multiqc_config.yaml new file mode 100644 index 0000000..708ab12 --- /dev/null +++ b/workflow/conf/multiqc_config.yaml @@ -0,0 +1,36 @@ +# Title to use for the report. +title: BICF ChIP-seq Analysis Report + +report_comment: > + This report has been generated by the <a href="https://git.biohpc.swmed.edu/BICF/Astrocyte/chipseq_analysis/" target="_blank">BICF/chipseq_analysis</a> + pipeline. + +report_section_order: + software_versions: + order: -1000 + +report_section_order: + software_references: + order: -1000 + +extra_fn_clean_exts: + - '_R1' + - '_R2' + - 'pbc.qc' + +fn_ignore_files: + - '*dedup.flagstat.qc' + +custom_data: + library_complexity: + file_format: 'tsv' + id: 'library_complexity' + contents: 'TotalReadPairs DistinctReadPairs OneReadPair TwoReadPairs NRF PBC1 PBC2' + section_name: 'Library complexity' + plot_type: 'generalstats' + +sp: + phantompeakqualtools/out: + fn: '*cc.qc' + library_complexity: + fn: '*pbc.qc' diff --git a/workflow/main.nf b/workflow/main.nf index 7a1bed5..2526efc 100644 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -505,8 +505,8 @@ process softwareReport { output: - file('*_mqc.yaml') into softwareVersions - file('*_mqc.txt') into softwareReferences + file('software_versions_mqc.yaml') into softwareVersions + file('software_references_mqc.yaml') into softwareReferences script: """ diff --git a/workflow/scripts/generate_references.py b/workflow/scripts/generate_references.py index 0b7582f..51be186 100644 --- a/workflow/scripts/generate_references.py +++ b/workflow/scripts/generate_references.py @@ -44,20 +44,21 @@ def main(): reference = args.reference output = args.output - out_filename = output + '_mqc.txt' + out_filename = output + '_mqc.yaml' # Header for HTML print(''' - # id: 'References' - # section_name: 'References' - # description: 'This section describes references for the tools used.' - # plot_type: 'html' + id: 'Software References' + section_name: 'Software References' + description: 'This section describes references for the tools used.' + plot_type: 'html' + data: | ''' , file = open(out_filename, "w") ) # Turn Markdown into HTML - references_html = 'bash -c "pandoc {} >> {}"' + references_html = 'bash -c "pandoc -p {} | sed \'s/^/ /\' >> {}"' references_html = references_html.format(reference, out_filename) subprocess.check_call(shlex.split(references_html)) -- GitLab