tools icon indicating copy to clipboard operation
tools copied to clipboard

WIP: MultiQC table of all parameters

Open ewels opened this issue 3 years ago β€’ 7 comments

Following on from a discussion with @jfy133 about his PR: https://github.com/nf-core/modules/pull/1161

I thought that it should be possible / cleaner to create a MultiQC file with a table of all parameters in the pipeline lib code that already handles pipeline paramters. I whipped up this quick proof of concept around that for discusssion.

Only after writing the code did I realise that we already have a very very similar YAML output showing parameters that vary from the defaults 🀦🏻 This was held in another file and I only saw the output when I ran the full test pipeline. We probably want to merge these two sections I guess. Or at least have a think about whether we want both.

Example MultiQC report: multiqc_report.html.zip

Example JSON output: pipeline_params7314521067081776068_mqc.json.zip

JSON file contents
{
  "parent_name": "nf-core/test Run Details",
  "headers": {
    "default": {
      "format": "{}",
      "description": "Default value in the pipeline",
      "scale": false,
      "title": "Default"
    },
    "value": {
      "format": "{}",
      "description": "Defined value in the pipeline run",
      "scale": false,
      "title": "Value"
    }
  },
  "data": {
    "custom_config_base": {
      "default": "<code>https://raw.githubusercontent.com/nf-core/configs/master</code>",
      "value": "<code>https://raw.githubusercontent.com/nf-core/configs/master</code>"
    },
    "multiqc_title": {
      "default": "<code>null</code>",
      "value": "<code>null</code>"
    },
    "plaintext_email": {
      "default": "<code>null</code>",
      "value": "<code>false</code>"
    },
    "monochrome_logs": {
      "default": "<code>null</code>",
      "value": "<code>false</code>"
    },
    "max_cpus": {
      "default": "<code>16</code>",
      "value": "<code>2</code>"
    },
    "multiqc_config": {
      "default": "<code>null</code>",
      "value": "<code>null</code>"
    },
    "fasta": {
      "default": "<code>null</code>",
      "value": "<code>s3://ngi-igenomes/igenomes/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/WholeGenomeFasta/genome.fa</code>"
    },
    "custom_config_version": {
      "default": "<code>master</code>",
      "value": "<code>master</code>"
    },
    "max_memory": {
      "default": "<code>128.GB</code>",
      "value": "<code>6.GB</code>"
    },
    "max_multiqc_email_size": {
      "default": "<code>25.MB</code>",
      "value": "<code>25.MB</code>"
    },
    "max_time": {
      "default": "<code>240.h</code>",
      "value": "<code>6.h</code>"
    },
    "email": {
      "default": "<code>null</code>",
      "value": "<code>null</code>"
    },
    "tracedir": {
      "default": "<code>./results/pipeline_info</code>",
      "value": "<code>./results/pipeline_info</code>"
    },
    "config_profile_description": {
      "default": "<code>null</code>",
      "value": "<code>Minimal test dataset to check pipeline function</code>"
    },
    "config_profile_contact": {
      "default": "<code>null</code>",
      "value": "<code>null</code>"
    },
    "validate_params": {
      "default": "<code>true</code>",
      "value": "<code>true</code>"
    },
    "email_on_fail": {
      "default": "<code>null</code>",
      "value": "<code>null</code>"
    },
    "igenomes_ignore": {
      "default": "<code>null</code>",
      "value": "<code>false</code>"
    },
    "outdir": {
      "default": "<code>./results</code>",
      "value": "<code>./results</code>"
    },
    "input": {
      "default": "<code>null</code>",
      "value": "<code>https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv</code>"
    },
    "genome": {
      "default": "<code>null</code>",
      "value": "<code>R64-1-1</code>"
    },
    "help": {
      "default": "<code>null</code>",
      "value": "<code>false</code>"
    },
    "igenomes_base": {
      "default": "<code>s3://ngi-igenomes/igenomes</code>",
      "value": "<code>s3://ngi-igenomes/igenomes</code>"
    },
    "config_profile_name": {
      "default": "<code>null</code>",
      "value": "<code>Test profile</code>"
    },
    "show_hidden_params": {
      "default": "<code>null</code>",
      "value": "<code>false</code>"
    },
    "enable_conda": {
      "default": "<code>null</code>",
      "value": "<code>false</code>"
    },
    "config_profile_url": {
      "default": "<code>null</code>",
      "value": "<code>null</code>"
    }
  },
  "parent_id": "nf-core-test_run_details",
  "section_name": "Pipeline Parameters",
  "description": "Lists all pipeline parameters used to control how the pipeline was run, including those not modified from the defaults.",
  "id": "nextflow_params",
  "pconfig": {
    "namespace": "Nextflow Pipeline",
    "id": "nextflow_params_table",
    "title": "Nextflow Pipeline Parameters"
  },
  "plot_type": "table"
}

I've been testing with the following:

nf-core create -n test -d testing -a tester && nextflow run nf-core-test/ -profile test,docker -resume

I'd appreciate feedback on:

  • Concept and location of code
  • Whether to keep as-is, or merge with the existing summary
  • Improvements for the table

NB: There is also some small improvements to the existing MultiQC sections that we can keep either way - grouping multiple subsections into a single report section. This is a relatively new feature for MultiQC Custom Content.

PR checklist

  • [x] This comment contains a description of changes (with reason)
  • [ ] CHANGELOG.md is updated
  • [ ] If you've fixed a bug or added code that should be tested, add tests!
  • [ ] Documentation in docs is updated

ewels avatar Jan 31 '22 15:01 ewels

Codecov Report

Merging #1389 (163078d) into dev (0af108f) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #1389   +/-   ##
=======================================
  Coverage   65.74%   65.74%           
=======================================
  Files          50       50           
  Lines        5841     5841           
=======================================
  Hits         3840     3840           
  Misses       2001     2001           

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 0af108f...163078d. Read the comment docs.

codecov[bot] avatar Jan 31 '22 15:01 codecov[bot]

Is it possible to have it by default only show deviations from the default value, but a button to show all parameters? Alternatively, highlighting the non-default parameters by color, would help parsing it.

mashehu avatar Jan 31 '22 16:01 mashehu

Show / hide, not really. Could do either background colours (I think πŸ€”) or labels though. I did add a column called "Different to default" at first with a yes / no label but it looked a bit messy. Could try that again.

ewels avatar Jan 31 '22 20:01 ewels

ps. Could do custom HTML stuff maybe. And for more control could stick all of this into the pipeline report instead of MultiQC.

My personal preference is to keep all of this (including software versions etc too) in the pipeline report instead of MultiQC. But I seem to be in the minority for that opinion πŸ˜…

ewels avatar Jan 31 '22 20:01 ewels

Just catching up with all this - honeslty I think merging with the existing Workflow summary would be completely fine (even if it's not so much a summary anymore). But I do like the table formatting of the parameters a lot.

I think background colours would be nice - it makes it a bit nicer to look at ;).

I know what you mean about the pipeline report, but I actually wonder how an everyday user looks at that (I rarely do so) - and it's not so useful if you're presenting the MultiQC report and need to quickly check a parameter.

jfy133 avatar Feb 01 '22 07:02 jfy133

but I actually wonder how an everyday user looks at that (I rarely do so)

Maybe that's because it doesn't contain much useful information..? πŸ˜‰

ewels avatar Feb 01 '22 12:02 ewels

Maybe that's because it doesn't contain much useful information..? wink

Fair point :P, but my second case still applies ;)

jfy133 avatar Feb 01 '22 12:02 jfy133