This is a test version of Biostars. For the public version, visit https://www.biostars.org.
MultiQC extra_fn_clean_exts for specific module

In MultiQC, I am wanting to use a custom sample name clean option for just the Kallisto module.

I have run Kallisto with multiple fastq pairs, and want to truncate to just the sample name. I still want to keep the FastQC module results separate to each pair. In the following example, I want the sample name to be just "A2" for Kallisto, but "A2_CATCAT_L002_R1_001", "A2_CATCAT_L002_R2_001", "A2_CATCAT_L007_R1_001" etc for FastQC.

My multiqc_config.yaml performs what I want for the Kallisto module (sample name "A2"), with:

# MultiQC config file

module_order:
    - kallisto:
        name: 'Kallisto test'

extra_fn_clean_exts:
    - type: regex
      pattern: '(_\w+){4}'

My example_kallisto.log file contains:

[quant] fragment length distribution will be estimated from the data
[index] k-mer length: 31
[index] number of targets: 187,626
[index] number of k-mers: 108,619,921
[index] number of equivalence classes: 752,021
[quant] running in paired-end mode
[quant] will process pair 1: rawdata/RNAseq/A2_CATCAT_L002_R1_001.fastq.gz
                             rawdata/RNAseq/A2_CATCAT_L002_R2_001.fastq.gz
[quant] will process pair 2: rawdata/RNAseq/A2_CATCAT_L007_R1_001.fastq.gz
                             rawdata/RNAseq/A2_CATCAT_L007_R2_001.fastq.gz
[quant] will process pair 3: rawdata/RNAseq/A2_CATCAT_L005_R1_001.fastq.gz
                             rawdata/RNAseq/A2_CATCAT_L005_R2_001.fastq.gz
[quant] finding pseudoalignments for the reads ... done
[quant] processed 7,000,000 reads, 6,000,000 reads pseudoaligned
[quant] estimated average fragment length: 175.123
[   em] quantifying the abundances ... done
[   em] the Expectation-Maximization algorithm ran for 1,001 rounds
[bstrp] number of EM bootstraps complete: 100

I have tried to set the sample name truncation to just Kallisto with the following multiqc_config.yaml file, but without success (the option is ignored).

# MultiQC config file

module_order:
    - kallisto:
        name: 'Kallisto test'

kallisto:
    extra_fn_clean_exts:
        - type: regex
          pattern: '(_\w+){4}'

Thanks for your help in advance!

multiqc

1 answer

Hi Rick,

That's a great question and interesting use case. I don't think that it's possible to do this in MultiQC currently, but it would be a nice idea and I don't think it would be too difficult to implement.

I've made an issue here to remind me to add it the next time I get a chance to work on MultiQC: https://github.com/ewels/MultiQC/issues/905

Cheers,

Phil

Thanks. It's good to know that it's not currently possible.

Log in to answer this question.