Multiqc: Module order if -e or -m is set

Created on 14 Dec 2016  路  7Comments  路  Source: ewels/MultiQC

Hi Phil,

If either module or exclude is set, config.module_order seems to be ignored: https://github.com/ewels/MultiQC/blob/7c405357a3f900c31f3538e8f79a6714321a0b0c/scripts/multiqc#L299
I wonder if that's intended?

And a related question. There is a scenario when a user is mostly interested in several modules, but still willing to keep all the other QC in the report. Looks like overriding config.module_order with a smaller list of preferred modules is a proper way to do that. But unfortunately MultiQC will put the modules from config.module_order below all other modules that are not specified in the list. I wonder if it would be better to put the modules from 'config.module_order' in the very top, in order specified. What do you think?

back end bug

Most helpful comment

Awesome! I tried top_modules in my pipeline and it works exactly as I expect. Thanks for that and for fixing the bug.

(and I gave a 10 minute delay before replying hoping you will introduce 10 more features)

All 7 comments

Hi @vladsaveliev,

If either module or exclude is set, config.module_order seems to be ignored

Are you sure it is? I haven't looked very hard at the code, but I have a terminal window open where I happened to just run with --exclude and the module order appears to be normal.. If you have a log demonstrating this I'd be interested..

Related module order question

In your use case I can see the value of this. However, the scenario that happens for us (and anyone else with custom modules) is that the custom modules end up at the top of the report. This is usually desired, as these will typically be very specific for this data type. I think I prefer this behaviour to what you're suggesting, which would put them at the bottom by default.

The simplest way around this would be for you to copy the entire config.module_order list to your config and put the stuff at the top that you want - that way, nothing is missing from the list. I appreciate that this is a bit of a pain though, as any new MultiQC modules will then float to the top when you update MultiQC.

Not sure that I can think of another way around this without changing the default behaviour. I could add an extra config variable to change the default behaviour I guess, though I'm not sure how many people want to do what you're suggesting. Perhaps a new config.top_modules or something?

Phil

..having re-read the code in a little more detail, I agree that the module order _should_ be lost with -m or -e. Sure enough, when running on the test dataset with all modules it is the case. So I think I was just being lucky with the random dictionary that was being used in my run just now.

Thanks so much for looking at it!

Regarding the second question, I see you point and agree that this behaviour is more preferable to my scenario, and I'm going to be fine with setting the entire config.module_order

Too late, I've just written the new feature for you 馃槈

New feature documented here: http://multiqc.info/docs/#order-of-modules

Let me know how you get on with it!

Side note - I'm amazed that I've never noticed this bug before! (hence I was suspicious at first!) Thanks for reporting!

Awesome! I tried top_modules in my pipeline and it works exactly as I expect. Thanks for that and for fixing the bug.

(and I gave a 10 minute delay before replying hoping you will introduce 10 more features)

Was this page helpful?
0 / 5 - 0 ratings