-
Notifications
You must be signed in to change notification settings - Fork 817
Update tximeta/tximport module to fix sample name mangling #1622
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
Conversation
Fixes #1445 Updates the tximeta/tximport module to include the fix from nf-core/modules PR #9407, which adds check.names=FALSE to data.frame() calls to prevent R from modifying sample names. This resolves an issue where sample names starting with numbers or containing special characters were being modified, causing downstream errors in the SUMMARIZEDEXPERIMENT process when trying to match sample IDs between count matrices and samplesheet metadata.
|
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.3.2. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
|
|
Closing this PR as it was created from the wrong branch (master instead of dev). Reopening as a new PR from the correct branch. |
PR checklist
nf-core lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).Description
Fixes #1445
This PR updates the
tximeta/tximportmodule to include the fix from nf-core/modules PR nf-core/modules#9407.The Problem
Users reported that the pipeline was failing with the error:
This occurred when sample names:
1A2,5B2)sample-1,D10-D)Root Cause
R's
data.frame()function automatically modifies column/row names whencheck.names=TRUE(the default):1A2→X1A2D10-D→D10.DWhile PR #1380 partially fixed this issue in v3.15.1 by adding
check.names = FALSEto some functions, it missed the critical line in thetximport.rscript wherecoldatais created. This directly affected sample names that became column names in output matrices, causing mismatches when the downstreamsummarizedexperimentprocess tried to match them against the original samplesheet metadata.Solution
Updated the
tximeta/tximportmodule to the latest version which addscheck.names = FALSEto three function calls:read.csv()when reading transcript info (line 76)data.frame()when creating extra transcript info rows (line 79)data.frame()when creating coldata (line 134) - the main fixTesting
Users can now safely use sample names with:
The fix preserves sample names exactly as provided in the input samplesheet.