-
Notifications
You must be signed in to change notification settings - Fork 828
Fix duplicate flagstat files in MultiQC report #1655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+17
−12
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When mark duplicates is enabled (skip_markduplicates=false) and UMI deduplication is disabled (with_umi=false), both the aligner's flagstat files (showing 0 duplicates) and the markduplicates flagstat files (showing actual duplicate counts) were being passed to MultiQC. This caused MultiQC to randomly select one of the flagstat files per sample, sometimes showing incorrect zero duplicate counts. The fix ensures that when markduplicates will run, only its stats are passed to MultiQC. The aligner stats are only added when both with_umi is false AND skip_markduplicates is true. Co-authored-by: GitHub Copilot <copilot@github.com>
|
maxulysse
approved these changes
Dec 11, 2025
Member
Author
|
Thanks @maxulysse ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #1653
When mark duplicates is enabled (
skip_markduplicates=false) and UMI deduplication is disabled (with_umi=false), both the aligner's flagstat files (showing 0 duplicates) and the markduplicates flagstat files (showing actual duplicate counts) were being passed to MultiQC.This caused MultiQC to randomly select one of the flagstat files per sample, sometimes showing incorrect zero duplicate counts in the samtools/flagstat table.
Changes
Modified the logic in
workflows/rnaseq/main.nfso that:with_umi=true): UMI dedup stats are used (unchanged behavior)skip_markduplicates=true): Aligner stats are usedskip_markduplicates=false): Aligner stats are NOT added here - theBAM_MARKDUPLICATES_PICARDsubworkflow adds its stats laterThis ensures only one set of flagstat files (the correct ones with actual duplicate counts) is passed to MultiQC.
Testing
Ran the test profile with
--skip_pseudo_alignmentand verified:.markdup.sorted.bam.flagstatfiles are present in the MultiQC work directory.sorted.bam.flagstatfiles from the aligner are presentCo-authored-by: GitHub Copilot copilot@github.com