Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

MSstatsFile: Condition written unquoted, so conditions containing commas produce malformed MSstats CSV

Open Beginner friendly
#10,512 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
data

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

new contributor

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

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenMS/OpenMS

All issues in OpenMS/OpenMS

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.