Using MultiQC from Python to add to an existing report

The MultiQC Grouped Samples blog post has a section titled MultiQC as a Library demonstrating how to use Python code to generate flexible custom content, and an example of creating a stand-alone report.

The following link in the post is broken:

See the new Using MultiQC in interactive environments page to learn more about MultiQC Python functions.

I would like to add a section to an existing MultiQC report using Python. Could anyone give me an example for how to do so, or point me to documentation on this? Thanks in advance!

Hi Tim,

You can load the previous report from a parquet file: multiqc.parse_logs('multiqc_data/BETA-multiqc.parquet'), and then add a new section with e.g. multiqc.parse_logs('more_data/'). Following by multiqc.write_report().

Let me know if that helps!

Vlad