How to use MultiQC's API

Hi! I have a few questions on using MultiQC’s API.

  1. In the write_report module is it possible to add a new line in the report_comment variable?
  2. Can you output versions of softwares in one of the modules?
  3. How can you turn off or add to the text that contains “Report generated on date, time, based on data in:”?
  4. How can you adjust the width of columns in a table using table.plot?
  5. How can you Right/Left justify columns?

Hi @danejo3,

Some good questions! First, can I ask for the context here? Is this for writing a new module, or using MultiQC in a script, or running MultiQC with configs etc? That’ll help me give good answers.

The questions vary a lot in their difficulty. Briefly:

  1. If you’re setting it, yes. I think it takes markdown and HTML so you can just add in the newline.
  2. Yes, MultiQC already has built-in functionality for this. See docs for writing modules and setting at runtime.
  3. Set config option show_analysis_time and show_analysis_paths to False. See docs.
  4. Short answer: you can’t
  5. Short answer: you can’t

For the last two: MultiQC tables are very complex custom HTML. Styling and alignment is intentional and it’s intentionally not possible to customise this.

Hope that helps! Happy to provide more detail if you can give a little more context.

Phil

This is for using MultiQC in a script. I am using this as a guide Using MultiQC in scripts | Seqera Docs.

  1. In the Adding custom content example provided above where do I use show_analysis_time=False to turn it off?
  2. Can you output versions of softwares when running MultiQC in a script?

Thank you for your help

Ok nice! Curious to hear more if you can share, I never get to hear much from people using MultiQC in scripts.

  1. It’s part of the MultiQC config. I haven’t tried it, but I guess you can do the following:
    multiqc.config.show_analysis_time = false
    
    If this doesn’t work let me know and I can have a play.
  2. Yes, both methods I linked to the docs for should work. Depends a bit on your script which is easiest, but probably the second one. That’s just MultiQC config so the same approach as above.

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