MSstatsFile: Condition written unquoted, so conditions containing commas produce malformed MSstats CSV
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
Start with MSstatsLine::toString() in src/openms/include/OpenMS/FORMAT/MSstatsFile.h, which joins the fields with commas, and with the csv_out.addLine(...) calls in MSstatsFile.cpp, where only Reference is quoted today. Add a case with a condition containing a comma, then check that every row has 11 fields when parsed as CSV. Done when Condition, BioReplicate and accession are quoted and escaped and the output parses as valid CSV.
Written by the indexing model from the issue text.
Description
MSstatsFile writes the MSstats input CSV with the Condition field unquoted, so a condition that contains a comma splits into extra columns and the file is no longer valid CSV.
Where: MSstatsLine::toString() in src/openms/include/OpenMS/FORMAT/MSstatsFile.h joins accession_ … condition_, bioreplicate_, run_ with "," and no quoting. Only the trailing Reference gets quote_ (MSstatsFile.cpp, the csv_out.addLine(...) calls). Same on develop b5b0b4b7d8.
How we hit it: quantms 1.10.0, ProteomicsLFQ -out_msstats (container openms-tools-thirdparty:2026.07.02). The condition comes from the SDRF factor value. Free-text factors with commas are common in public SDRFs, for example Chronic Kidney Disease, Stage 4 or SDS + ultrasonication, urea. In 7 of 42 label-free metaproteomics datasets the *_msstats_in.csv has ragged rows, with up to 17 fields instead of 11:
P06703,.(Acetyl)AC(Carbamidomethyl)PLDQAIGLLVAIFHK,2,NA,0,L,SDS + ultrasonication, urea,19,19,4.054027e07,"Xu_20161229_MetaproE_2_1.mzML"
Affected datasets: PXD005969, PXD012724, PXD016787, PXD024845, PXD025659, PXD032387, PXD048778. Strict CSV readers then misparse the file. DuckDB's sniffer, for example, finds no ProteinName column, and anything that splits on commas shifts BioReplicate, Run and Intensity.
Suggested fix: quote (and escape) the text fields of MSstatsLine, at least Condition, the way Reference already is. This also matters for BioReplicate, which can be free text, and for accessions.
Workaround downstream: the 6 fields before Condition and the 4 after it never contain commas, so the middle can be rejoined.
- Dominant language
- C++
- Stars
- 623
- Forks
- 441
- Avg merge
- 18h 39m
- Merged PRs (30d)
- 252
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenMS/OpenMS
-
pepXML reader requires the optional 'no_cut' attribute, so OpenMS cannot read back its own pepXML for unknown enzymesPossibly taken @kg290 claimed this 12 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
OpenMS/OpenMS#10321 · 1 comment ·
Maintainers usually reply within 1 day
-
[FEATUREFINDER] Biosaur2Algorithm::centroidProfileSpectra_: dead drift-time guard would drop every FAIMS CVMay be free again @kavyansh-1 claimed this 30 days ago, and no pull request is open. Opendefect
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenMS/OpenMS#10005 · 3 comments ·
Maintainers usually reply within 1 day
-
Implement peptide-level double competition for FDR controlPossibly taken @kg290 claimed this 1 day ago. Openenhancement
OpenMS/OpenMS#10490 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Performance
Difficulty 5/5 Over a week Newbie friendliness 8/100
OpenMS/OpenMS#10488 · 1 comment ·
Maintainers usually reply within 1 day
-
Benchmark ModifiedSincSmoother against Savitzky–Golay on chromatogramsPossibly taken @AdityasagarR123 claimed this 6 days ago. OpenGSoC/OpenMS Fellowship
OpenMS/OpenMS#10425 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
c++ good first issue M2: audio plumbing no hardware needed tests
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
GageLawton/noise-cancellation#23 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/eo-graphs#85 ·
-
bug derived types format I/O medium priority semantics
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
facebookresearch/habitat-sim#2645 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day