This is a test version of Biostars. For the public version, visit https://www.biostars.org.
multiqc: group samples by population + boxplot ?

Hi All,

is there a simple way to tell multiqc to group data by population ?

for example, say I've got the output of samtools flagstat for 50 cases and 50 controls, how can I get a boxplot that would display the duplicates for those two populations ?

enter image description here

multiqc

1 answer

[Edit] - Box plots are now available as a core plot type in MultiQC v1.21, Feb 2024. See release notes and docs.

MultiQC box plot

Previous answer kept below:


You can't group and make boxplots as you describe, probably your best bet is to use the highlight tool in the report (especially if you force the report to generate a beeswarm plot instead of a table, you should be able to get an idea of distributions).

Alternatively, check the multiqc_data directory to find the exported + sanitised data. It should be fairly easy to throw this into Excel / a custom script to generate the plot. If you _really_ want, you can generate a plot image or HTML and then run MultiQC a second time, including this output into the report using Custom Content. Another option is to write a plugin for MultiQC - then you can do things like adding your own command line flags, generating your own plots during run time and basically anything else that you can think of.

In the future I plan to make it much easier to run and use MultiQC in scripts, for exactly this kind of thing. Then you would be able to create a notebook where you import multiqc and run parsing, then are able to directly access the parsed data objects to easily create custom plots. Stay tuned for that..

Phil

It worked by parsing a first run of multiqc, extract the data from the sanitised data , create a SVG plot with R, include the SVG into a file custom_mqc.html, re-run multiqc ! thanks Phil !

nevertheless, it's not clear how to specify a "section" for the *mqc.html, all the examples I saw are about a custom plot.. (edit : ah non, https://github.com/nf-core/modules/blob/ea8bd14b947319f4ffa16817f9685fc42a240cbe/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py#L4 was useful to understand )

enter image description here

Log in to answer this question.