MultiQC finds only one PNG in Custom Content despite multiple matching the pattern

Problem

I have a pipeline that runs multiple similar tools for the same sample and I want to be able to group plots by type into sections via custom content. One such plot type is the block length distribution. I am trying to select them via a glob expression but when I do, the report only features one plot instead of the three that should match the glob expression. MultiQC also says it only finds 1 sample for my custom content section.

Example Data:

with_sp.tar.gz (328.4 KB)
Contents of example data:

multiqc_config.yaml
dupRadar_plot_mqc.png
block_length_distribution_longphase_sample1_mqc.png
block_length_distribution_longphase_sv_sample1_mqc.png
block_length_distribution_sample1_mqc.png

Configuration:

multiqc_config.yaml

custom_data:
  my_custom_content_image:
    section_name: "My nice PNG image"
sp:
  my_custom_content_image:
    fn: "block_length_distribution_*.png"
ignore_images: false

Invocation

tar -xzf with_sp.tar.gz
multiqc -c with_sp/multiqc_config.yaml --force .

Relevant line from output:

    custom_content | my_custom_content_image: Found 1 sample (image)

Unfortunately, the only way to plot multiple images is to specify a separate search pattern of each of them:

run_modules:
  - custom_content
custom_data:
  block_length_distribution_longphase_sample1:
    section_name: "Image 1"
  block_length_distribution_longphase_sv_sample1:
    section_name: "Image 2"
  block_length_distribution_sample1:
    section_name: "Image 3"
sp:
  block_length_distribution_longphase_sample1:
    fn: "block_length_distribution_longphase_sample1_mqc.png"
  block_length_distribution_longphase_sv_sample1:
    fn: "block_length_distribution_longphase_sv_sample1_mqc.png"
  block_length_distribution_sample1:
    fn: "block_length_distribution_sample1_mqc.png"
ignore_images: false

You can also group them under a single section using parent_id:

run_modules:
  - custom_content
custom_data:
  block_length_distribution_longphase_sample1:
    parent_id: "images"
    parent_name: "PNG images"
  block_length_distribution_longphase_sv_sample1:
    parent_id: "images"
  block_length_distribution_sample1:
    parent_id: "images"
sp:
  block_length_distribution_longphase_sample1:
    fn: "block_length_distribution_longphase_sample1_mqc.png"
  block_length_distribution_longphase_sv_sample1:
    fn: "block_length_distribution_longphase_sv_sample1_mqc.png"
  block_length_distribution_sample1:
    fn: "block_length_distribution_sample1_mqc.png"
ignore_images: false

Thank you Vlad, that makes sense!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.