This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Is it possible to run MultiQC on different batches of files?

Dear all,

Is it possible to run MultiQC for a few files in a folder and not all of them?

For example:

file1_fastqc.html
file1_fastqc.zip

file2_fastqc.html
file2_fastqc.zip

file3_fastqc.html
file3_fastqc.zip

file4_fastqc.html
file4_fastqc.zip

I want to run MultiQC only for 1 and 2 and then only for 3 and 4 without moving them from the folder

Any help is highly appreciated

fastqc multiqc

I don't think you can do this looking at the in-line help for MultiQC (which you may have already seen). You can add more than one directory but not exclude files from one directory.

You can use --ignore and --ignore-samples but yeah, I don't think that you can exclude from one search path but not another in the same run. I don't think anyone has ever asked to do this 😅

I missed --ignore-samples. Thanks!

Why not put the files you want to run it on in a separate (new) folder en run multiQC on that folder?

Or if you don't want to move them, you can softlink them to a new directory (ln -s file1* ../run_1)

1 answer

You should be able to do this by just altering the search paths with the appropriate glob patterns:

multiqc file{1,2}*
multiqc file{3,4}*

Or you can ignore the samples that you don't want with --ignore for filenames or --ignore-samples for parsed sample names. For example:

multiqc . --ignore-samples "file{3,4}"
multiqc . --ignore-samples "file{1,2}"

See the docs for more information.

So, just to clarify:

There is no option, that MultiQC takes explicit file inputs?

For snakemake, there exists a MultiQC wrapper, which is supposed to support the input of separate files (i.e. do not inlcude all files placed in a folder, but only integrate the specified ones). However, I tried this function, and it did not work.

Also trying it manually did not work:

multiqc --force -o test -n test.html some_input_file

Output:

/// MultiQC | v1.14 (6b549fb)

| multiqc | MultiQC Version v1.16 now available! | multiqc | Search path : .... | searching | 100% 1/1
| multiqc | No analysis results found. Cleaning up.. | multiqc | MultiQC complete

So I guess, this is really not supported, or am I wrong?

MultiQC can take any number of positional arguments - directories or files. It will search recursively through any directories that it's given.

If you want to specify the exact file path of many thousands of filenames and the bash command gets too long, you can use --file-list (see docs).

If MultiQC isn't finding any results and you think it should, check the troubleshooting docs.

Ah yes, I see. Anyways, my mistake was giving FASTQC-HTML-reports as inputs instead of the required zipped files...

But huge thx for the quick response :)

Log in to answer this question.