Repository navigation
Description
Description of bug
I'm trying to process multiple thousands of samples with about 10 modules' result files per sample. To process 2000 of my samples, it took MultiQC nearly 100GB of RAM to complete processing. With all that, MultiQC could have loaded every result file into memory and still had memory to spare. And I know that MultiQC isn't storing the entire contents of every log file in memory. There must be a leak somewhere.
I don't think this is the culprit, but I'm using the fork from this PR: #1931
Let me know if you'd like me to re-attempt with a different version installed.
Using this config file: https://github.com/stjudecloud/workflows/blob/main/workflows/qc/inputs/multiqc_config_hg38.yaml
File that triggers the error
MultiQC Error log
The log is too big/long to attach. Here's the `head` and `tail`.
$ head multiqc.log -n 50
[2023-07-26 13:18:42,093] multiqc [DEBUG ] This is MultiQC v1.15.dev0
[2023-07-26 13:18:42,099] multiqc [DEBUG ] Loading config settings from: ../multiqc_config_hg38.yaml
[2023-07-26 13:18:42,099] multiqc [DEBUG ] New config: {'log_filesize_limit': 1000000000, 'fastqc_config': {'fastqc_theoretical_gc': 'hg38_genome'}, 'top_modules': [{'mosdepth': {'name': 'mosdepth (whole_genome)', 'path_filters': ['*.whole_genome.mosdepth*'], 'path_filters_exclude': ['*.MarkDuplicates.whole_genome.mosdepth*']}}, {'mosdepth': {'name': 'mosdepth (exon)', 'path_filters': ['*.exon.mosdepth*'], 'path_filters_exclude': ['*.MarkDuplicates.exon.mosdepth*']}}, {'mosdepth': {'name': 'mosdepth (CDS)', 'path_filters': ['*.CDS.mosdepth.*'], 'path_filters_exclude': ['*.MarkDuplicates.CDS.mosdepth*']}}, {'mosdepth': {'name': 'mosdepth (whole_genome, markdups)', 'path_filters': ['*.MarkDuplicates.whole_genome.mosdepth*']}}, {'mosdepth': {'name': 'mosdepth (exon, markdups)', 'path_filters': ['*.MarkDuplicates.exon.mosdepth*']}}, {'mosdepth': {'name': 'mosdepth (CDS, markdups)', 'path_filters': ['*.MarkDuplicates.CDS.mosdepth.*']}}], 'custom_data': {'global_PHRED_scores': {'file_format': 'tsv', 'section_name': 'Global PHRED scores', 'plot_type': 'table'}, 'orig_read_counts': {'file_format': 'tsv', 'plot_type': 'generalstats'}}}
[2023-07-26 13:18:42,100] multiqc [DEBUG ] Added to filename patterns: [{'global_PHRED_scores': {'fn': '*.global_PHRED_scores.tsv'}, 'orig_read_counts': {'fn': '*.orig_read_count.tsv'}}]
[2023-07-26 13:18:42,100] multiqc [DEBUG ] Added to filename clean extensions: [['.ValidateSamFile', '.whole_genome', '.exon', '.CDS', '.MarkDuplicates']]
[2023-07-26 13:18:42,100] multiqc [DEBUG ] Command used: /home/afrantz/miniconda3/bin/multiqc --no-ansi -c ../multiqc_config_hg38.yaml -f --no-report -d ./
[2023-07-26 13:18:42,562] multiqc [DEBUG ] Latest MultiQC version is v1.14
[2023-07-26 13:18:42,562] multiqc [DEBUG ] Working dir : /research_jude/rgs01_jude/groups/zhanggrp/projects/SJCloud/common/qc_paper/all_transcriptome_results
[2023-07-26 13:18:42,562] multiqc [DEBUG ] Template : default
[2023-07-26 13:18:42,562] multiqc [DEBUG ] Running Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:20:04) [GCC 11.3.0]
[2023-07-26 13:18:42,562] multiqc [INFO ] Prepending directory to sample names
[2023-07-26 13:18:42,563] multiqc [DEBUG ] Analysing modules: mosdepth, mosdepth, mosdepth, mosdepth, mosdepth, mosdepth, custom_content, ccs, ngsderive, purple, conpair, lima, peddy, somalier, methylQA, phantompeakqualtools, qualimap, preseq, hifiasm, quast, qorts, rna_seqc, rockhopper, rsem, rseqc, busco, bustools, goleft_indexcov, gffcompare, disambiguate, supernova, deeptools, sargasso, verifybamid, mirtrace, happy, mirtop, sambamba, gopeaks, homer, hops, macs2, theta2, snpeff, gatk, htseq, bcftools, featureCounts, fgbio, dragen, dragen_fastqc, dedup, pbmarkdup, damageprofiler, biobambam2, jcvi, mtnucratio, picard, vep, sentieon, prokka, qc3C, nanostat, samblaster, samtools, sexdeterrmine, eigenstratdatabasetools, bamtools, jellyfish, vcftools, longranger, stacks, varscan2, snippy, umitools, bbmap, bismark, biscuit, diamond, hicexplorer, hicup, hicpro, salmon, kallisto, slamdunk, star, hisat2, tophat, bowtie2, bowtie1, cellranger, snpsplit, odgi, pangolin, nextclade, humid, kat, leehom, adapterRemoval, bbduk, clipandmerge, cutadapt, flexbar, kaiju, kraken, malt, motus, trimmomatic, sickle, skewer, sortmerna, biobloomtools, fastq_screen, afterqc, fastp, fastqc, filtlong, prinseqplusplus, pychopper, porechop, pycoqc, minionqc, anglerfish, multivcfanalyzer, clusterflow, checkqc, bcl2fastq, bclconvert, interop, ivar, flash, seqyclean, optitype, whatshap
[2023-07-26 13:18:42,565] multiqc [DEBUG ] Using temporary directory for creating report: /lsf_tmp/197763106.tmpdir/tmppv76_3f2
[2023-07-26 13:18:43,785] multiqc [INFO ] Search path : /research_jude/rgs01_jude/groups/zhanggrp/projects/SJCloud/common/qc_paper/all_transcriptome_results
[2023-07-26 15:04:26,433] multiqc [DEBUG ] Summary of files that were skipped by the search: [skipped_module_specific_max_filesize: 250557] // [skipped_no_match: 88668] // [skipped_ignore_pattern: 10310] // [skipped_directory_fn_ignore_dirs: 2062]
[2023-07-26 15:04:37,859] multiqc.plots.linegraph [DEBUG ] Using matplotlib version 3.7.1
[2023-07-26 15:04:37,873] multiqc.plots.bargraph [DEBUG ] Using matplotlib version 3.7.1
$ tail multiqc.log -n 50
[2023-07-26 15:32:24,672] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJNBL030002_D1.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,672] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJETV093_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,672] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJE2A007_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,672] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJMB067_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,672] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJBALL021900_D1.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJMLL001_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJRHB013_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJPHALL003_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJRHB010_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJNBL117_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJNBL030014_D1.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJMB002_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJBALL237_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJCBF041_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJHYPER011_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJOS013_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJHYPO120_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJAML001417_D1.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJMB002_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJLGG038_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJPHALL005_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,673] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJLGG026_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,674] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJSS030017_D1.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,674] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJEPD003_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,674] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJAML030004_D1.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,674] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJHYPER006_D.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,674] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJCBF041_D.RNA-Seq.MarkDuplicates.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,674] multiqc.modules.base_module [DEBUG ] mosdepth/global_dist - Skipping './ClinicalGenomics/GRCh38/ClinicalPilot/SJMB009_E.RNA-Seq.whole_genome.mosdepth.global.dist.txt' as it didn't match the path_filters for 'mosdepth (CDS, markdups)'
[2023-07-26 15:32:24,703] multiqc.modules.mosdepth.mosdepth [INFO ] Found 2062 reports
[2023-07-26 15:33:31,347] multiqc.modules.mosdepth.mosdepth [DEBUG ] Using default coverage thresholds: 1, 5, 10, 30, 50
[2023-07-26 15:33:34,638] multiqc.modules.custom_content.custom_content [DEBUG ] No samples found: custom content (orig_read_counts)
[2023-07-26 15:33:34,699] multiqc.plots.table [DEBUG ] Plotting beeswarm instead of table, 2046 samples
[2023-07-26 15:33:34,715] multiqc.modules.custom_content.custom_content [INFO ] global_PHRED_scores: Found 2046 samples (table)
[2023-07-26 15:33:44,129] multiqc.modules.ngsderive.ngsderive [INFO ] Found 2062 reports
[2023-07-26 15:33:56,873] multiqc.plots.table [DEBUG ] Plotting beeswarm instead of table, 2062 samples
[2023-07-26 15:35:59,851] multiqc.modules.qualimap.qualimap [INFO ] Found 2062 RNASeq reports
[2023-07-26 15:37:21,261] multiqc.modules.picard.picard [INFO ] Found 2062 AlignmentSummaryMetrics reports
[2023-07-26 15:37:56,519] multiqc.modules.picard.picard [INFO ] Found 2062 GcBiasMetrics reports
[2023-07-26 15:39:01,782] multiqc.modules.picard.picard [INFO ] Found 2062 InsertSizeMetrics reports
[2023-07-26 15:39:58,459] multiqc.modules.picard.picard [INFO ] Found 2062 MarkDuplicates reports
[2023-07-26 15:40:02,978] multiqc.modules.picard.picard [INFO ] Found 2062 QualityScoreDistributionMetrics reports
[2023-07-26 15:40:19,608] multiqc.modules.picard.picard [INFO ] Found 2062 ValidateSamFile reports
[2023-07-26 15:40:22,085] multiqc.modules.samtools.samtools [INFO ] Found 2062 flagstat reports
[2023-07-26 15:45:08,537] multiqc.modules.kraken.kraken [INFO ] Found 2062 reports
[2023-07-26 16:11:11,996] multiqc.modules.fastqc.fastqc [INFO ] Found 2062 reports
[2023-07-26 16:13:36,528] multiqc.plots.table [DEBUG ] Plotting beeswarm instead of table, 4124 samples
[2023-07-26 16:16:12,030] multiqc [INFO ] Report : None
[2023-07-26 16:16:12,030] multiqc [INFO ] Data : multiqc_data
[2023-07-26 16:16:12,030] multiqc [DEBUG ] Moving data file from '/lsf_tmp/197763106.tmpdir/tmppv76_3f2/multiqc_data' to '/research_jude/rgs01_jude/groups/zhanggrp/projects/SJCloud/common/qc_paper/all_transcriptome_results/multiqc_data'
[2023-07-26 16:16:21,538] multiqc [INFO ] MultiQC completeBefore submitting
- I have read the troubleshooting documentation.
- I am using the latest release of MultiQC.
- I have included a full MultiQC log, not truncated.
- I have attached an input file (.zip if necessary) that triggers the error.
Activity
ewels commentedon Jul 27, 2023
Ouch! That's not ideal.. MultiQC does hold everything it's parsed in memory. But as you say, 100GB seems excessive even for that. It's not an easy problem to replicate or debug though.
Note that when we refactor MultiQC as described in #1256, the memory footprint should be much reduced, as parsed data will be written to disk and release from the working memory (at least per-module, if not per-sample). This should hopefully solve this problem.. But it's not a satisfying answer.
Are you able to use a Python profiler (eg. see the docs, but there are others too) to show how memory usage builds, or get any other insight?
ewels commentedon Aug 5, 2023
@a-frantz - it's be great if you could try again with the v1.15 release. It includes the mosdepth PR changes and also a tweaked file search. I don't think it'll solve your problem but it would be interesting to check for any changes.
a-frantz commentedon Aug 7, 2023
@ewels Big change in runtime! No change in memory consumption.
It went from taking 3 hours to process ~2000 samples (total of ~239000 files to search through) down to only 70ish minutes. But still consuming nearly 100GB of RAM. (EDIT: I forgot to revert the config I was using so it has quite a few optimizations that weren't present in the initial run I reported on. I'm curious, so I'll rerun it without the optimizations and report back.)
Without optimizations still saw a hefty runtime gain. ~80 minutes. I'd call this new filesearch change a definite improvement on runtime, so good job!
And just an update on how I've decided to deal with this issue: I found this section of your docs and went and implemented as much as I could. Provided filename patterns to avoid reading file contents, only enabled the modules I was running, etc. I think the biggest optimization I made was change from using an analysis directory (with tons of extra files in it) to
--filelistthat had been filtered down to (almost) exclusively contain files that MultiQC parses.Unfortunately all this didn't make a dent in memory consumption. Since we're trying to increase the throughput of this pipeline, and it just needs to deal with bigger and bigger numbers of samples, we decided to arbitrarily split the samples into batches of 100. This keeps memory under 10gb and runtime is reasonable. Faster than running one instance of MultiQC with thousands of samples. Haven't started parallelizing, but I can also do that now.
Since MultiQC so wonderfully outputs TSVs, it's pretty trivial to concatenate the batches together as needed. In an ideal world, we'd run one instance of MultiQC on all our tens of thousands of samples, but batching into groups of 100 works just fine for our needs.
Thank you again for maintaining such a remarkable tool! We're big fans of yours.
ewels commentedon Aug 8, 2023
Ah great, very nice to hear about the run time at least!
If I could pester you to do one more benchmark, that would be very helpful. Could you do a set of runs where each launch runs a single MultiQC module please? I wonder if (hope that) there is one poorly optimised module which is causing this. If we can figure out which one it'll make it easier to investigate.
Note that one of the issues we have pegged for a major v2 release is to have a common intermediate file format. This will facilitate splitting the parsing stage up and then bringing the results together to generate a report, which should help for truly huge projects 😊 But obviously optimising the run time so that this isn't necessary is the best solution..
a-frantz commentedon Aug 8, 2023
Seems to me like there are two serious problem modules (in my set of 9 at least): mosdepth used 51gb memory* and kraken used 37gb. fastqc is also a potential problem module, using 12gb. The others (samtools, ngsderive, qualimap, custom_content, and picard) were all under 1gb each.
*potential excuse for mosdepth, we run mosdepth 6 times for our RNA-Seq samples (which represent this test cohort). We calculate "whole genome", "whole exome", and "whole CDS" coverage with and without duplicates marked. That could explain why it's using 51gb for ~2000 samples, but even if that's the case and we say it would typically run closer to 10gb, that's still a problem IMO.
ewels commentedon Aug 8, 2023
Perfect, thank you! I had a strong suspicion that mosdepth might be at play here, but this helps us to narrow things down a lot (and explains why this complaint doesn't come in very often, despite people often running with ~2k samples). You have 12k mosdepth samples in one MultiQC report, so maybe it's not a big surprise that it's starting to push limits a bit, but hopefully we can still improve matters.
Are you able to attach a log file or two from mosdepth and kraken for us to take a look at and use for benchmarking? If not, could you please take a look at the files we have already (mosdepth, kraken) and check how they compare in terms of things like number of lines etc. These tool outputs can vary a lot, depending on how the tool runs. So it's entirely possible that we have fairly sparse testing data which may not give realistic benchmarking results.
Thanks,
Phil
a-frantz commentedon Aug 15, 2023
First: mosdepth
SJWLM030704_X3.RNA-Seq.MarkDuplicates.CDS.mosdepth.summary.txt
SJWLM030704_X3.RNA-Seq.MarkDuplicates.CDS.mosdepth.region.dist.txt
SJWLM030043_D1.RNA-Seq.exon.mosdepth.summary.txt
SJWLM030043_D1.RNA-Seq.whole_genome.mosdepth.summary.txt
SJWLM030043_D1.RNA-Seq.exon.mosdepth.region.dist.txt
SJWLM030043_D1.RNA-Seq.whole_genome.mosdepth.global.dist.txt
Attached are the two largest
*dist.txtfiles (and accompanyingsummary.txt) and the smallest*dist.txtfile (and accompanyingsummary.txt) from our RNA-Seq cohort. I have spent very little time with the raw files here (I have MultiQC to parse them! Why would I dig through them manually 😄 ) so I don't know what causes this huge variation in file size. Hopefully these will help!a-frantz commentedon Aug 15, 2023
Second: kraken2
SJBALL013327_D1.RNA-Seq.kraken2.txt
All of our Kraken files are essentially the same size. So attached is just a random report from our RNA-Seq cohort. I assume they're the same size because we run with the
--report-zero-countsoption enabled. This option inflates the file size, but makes comparisons between the raw files easier. Because of how much memory the Kraken module is using, I wouldn't be surprised if it's doing something inefficient with all these "zero" entries. It should be safe to discard them as soon they're encountered.We also run with the
--use-namesoption, which I figure similarly inflates the file size by some degree.rhpvorderman commentedon Apr 29, 2024
@a-frantz , we do experience out of memory errors for MultiQC on our cluster regularly when run large numbers of samples. I am currently in the process of investigating whether some memory can be saved.
I found that in v1.21 using --no-data-dir saves a substantial amount of memory. That issue should be fixed with #2510. Would you like to be kept in the loop about any PRs I do, so you can test on your data to see if it matters?
vladsavelyev commentedon Aug 10, 2024
Finally got to look into this. Both
mosdepthandkrakenwere extremely suboptimal, waisting a lot of memory and cpu on the data that wasn't used in plots and tables. I rewrote both modules to use the resources only on what's actually needed. There is a chance I introduced some bug, but the output is the same for the test data that we have and that you shared here.One exception is the absolute coverage mosdepth plot - I want to remove it. Mosdepth doesn't actually provide absolute coverage values per threshold - the coverage data it outputs is cumulative only. And I don't see much value in re-calculating cumulative values in MultiQC into absolute values - the cumulative plot looks sufficient enough to me. Correct me if I'm wrong.
a-frantz commentedon Aug 12, 2024
We've started using the
remove-sectionsMultiQC config to streamline our reports (worried about users getting distracted/overwhelmed by data we want to collect but deem "less important" for summary purposes). So I don't think we actually include this "absolute coverage" figure anymore (suggesting it's fine to remove).Is the absolute figure named
mosdepth-coverage-dist-cov? That's one we remove and I can't remember what it looks like. Can you share an example as a sanity check for me? Just a screenshot should do to jog my memory.Thanks a lot for your work!
vladsavelyev commentedon Aug 13, 2024
Thanks for a quick feedback!
This is how the module looks like with both abs and cumulative coverage plots:
The cumulative one above labeled
mosdepth-cumcoverage-dist, the absolute one as you correctly said labeledmosdepth-coverage-dist-cov.So I'm proposing to get rid of the latter.