Hello,
I have forked the MultiQC and now I am developing our in-house report modules. We are planning to send out the analysis reports generated by MultiQC and we would also like to have a section where there are links to certain results (bam, vcf etc.) files. It would be nice if we can fill up a table with labels which also carry html tags so that clicking on the links given in the table would allow the user to download the linked file. I am guessing that this might already be possible with some web/html hacking but I could not find a way to do it. We would be glad if you can support such a feature.
Cheers,
Bekir
Hi @berguner,
Whilst you are of course welcome to fork MultiQC, I'd strongly suggest that you instead develop a plugin for this kind of usage. That way you can stay up to date with new MultiQC releases and maintain your custom code in parallel. You can achieve basically all functionality through a plugin, see https://multiqc.info/docs/#multiqc-plugins for docs and https://github.com/MultiQC/example-plugin for an example.
For the case you describe, it sounds like you'll want a custom module to run. You can then build a table using the core MultiQC features for doing so - see https://multiqc.info/docs/#creating-a-table for documentation. You shouldn't need to do any web/html hacking.
If it really is just a table like this, the simplest way would be to use the Custom Content feature (docs). Then you don't need to do any coding with MultiQC at all, you just produce a file according to those docs and MultiQC will parse it and include it automatically. You can see some example files here.
Phil
I had a very quick play to double check that the custom content approach would work and popped an example file up for you here: https://github.com/ewels/MultiQC_TestData/blob/master/data/custom_content/embedded_config/download_links_mqc.yaml
It produces a section in the MultiQC report that looks like this:

No change in MultiQC code or how you run MultiQC is needed - it just finds the file from its filename and parses the content automatically.
Dear Phil,
Thank you for the quick response. I think this solution will work for us. I was not aware that we could use html tags directly which is quite nice.
Although using custom content feature is quite convenient, coding our own plugins will be necessary in the end. I forked the repo in case I would need to modify other plugins but I think it will not be necessary. Probably I will stick with the original branch and focus on our plugins.
Best,
Bekir
Ok great! The only gotcha with using URLs in tables is to set scale: false in the table config. Without this MultiQC tries to draw empty scale bars behind the table cell which can make the clickability of the link a bit weird.
Let me know if you run in to any issues with your custom plugin, especially modifying behaviour of existing modules. I've been vaguely thinking about certain scenarios here in the back of my mind for a while (such as somehow dynamically adding plugin hooks inside module code), but haven't had any use cases for it yet.
I'll close this issue now, but feel free to open new ones as you need :) Good luck!
Phil
Thanks for the tip Phil.
I did not have any major issues so far. I will keep you posted :)
Best,
Bekir