Import custom table with hyperlinks and bypass unique first column data requirement

I’m trying to generate a table that contains hyperlinks.

I’ve found that the best solution is to embed both the table data and the raw HTML directly in the YAML file. (I got this idea from your test data.) For example:

custom_data:
  read_placement_section:
    section_name: Read Placement
    description: Trimmed reads.
    plot_type: table
    data:
        Sample:
            - Gene: gene1
            - Heat Tree: <a href='../analysis/heat_tree.svg' target='_blank'>heat_tree.svg</a>
    pconfig:
      scale: false

Originally, I tried placing the table data in a CSV/TSV file and importing it using the sp: key in the YAML. Although the HTML text is visually rendered correctly in the report, the hyperlink is not active or clickable (black not blue), and MultiQC does not render heat_tree.svg as a hyperlink.

Here’s an example tsv file that I would use.

Sample	FastQC Report	BAM	VCF
sample_1	<a href="http://example.com/download/data/sample_1/sample_1_fastqc.zip">sample_1_fastqc.zip</a>	<a href="http://example.com/download/data/sample_1/sample_1.bam">sample_1.bam</a>	<a href="http://example.com/download/data/sample_1/sample_1.vcf">sample_1.vcf</a>

Also, I’ve noticed that MultiQC requires the first column of a table to contain unique values. Is there a way to bypass this? I’m trying to generate a table where the same sample ID appears in the first column, but with different values in the subsequent columns. For example:

Sample Gene Heat Tree
sample1 matk heat_tree.svg
sample1 its2 heat_tree.svg
sample2 matk heat_tree.svg
sample2 its2 heat_tree.svg

I know that I could combine the Sample and Gene columns as a unique id to resolve this issue; however, I would like to avoid that as it can make the table data messy and lose the ability to sort by Gene. Is there a way to handle this when we customize our YAML file?

Thanks!

Another interesting observation is that, in order for hyperlinks to render correctly, I must include the following in the customized section:

pconfig:
      scale: false

I have a few tables where I really like how MultiQC displays colored bars behind the numbers. To enable this feature, I need to set scale to true; however, doing so disables the hyperlinks. Is there a way to apply the scaling to certain columns only, rather than the entire table?