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 ?
[Edit] - Box plots are now available as a core plot type in MultiQC v1.21, Feb 2024. See release notes and docs.
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..
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 !
Yes the documentation for Custom Content is the worst out of all MultiQC docs. I've been intending to rewrite it for a while now. Best bet is usually to poke around in the MultiQC test data repo: https://github.com/ewels/MultiQC_TestData/tree/master/data/custom_content (this is what I usually do myself to answer questions!)
update 2024: https://github.com/MultiQC/MultiQC/releases/tag/v1.21
Thanks Pierre Lindenbaum - super speedy! ;) I also updated my answer below..