Skip to content

Update psi-ms.obo to version 4.2.2 - #8691

Merged
timosachsenberg merged 15 commits into
developfrom
copilot/update-psi-ms-obo-version
Sep 25, 2026
Merged

timosachsenberg merged 15 commits into
developfrom
copilot/update-psi-ms-obo-version

Conversation

Copilot AI commented Jan 24, 2026 •

Copy link
Copy Markdown
Contributor

Updates the bundled PSI-MS vocabulary from 4.1.155 to 4.2.2, matching the HUPO-PSI/psi-ms-CV v4.2.2 release (tagged 2026-09-18).

  • Update share/OpenMS/CV/psi-ms.obo to the upstream release file, verified byte-for-byte (blob 50153ad5de).
  • Update renamed CV terms in mzML/TraML writers, mappings, and affected test data:
    • MS:1000079: “fourier transform ion cyclotron resonance mass spectrometer” → “fourier transform ion cyclotron resonance”
    • MS:1001117: “theoretical mass” → “theoretical neutral mass”
    • MS:1001910: “LTQ Orbitrap Elite” → “Orbitrap Elite”
    • MS:1000280: “suface ionization” → “surface ionization”
  • Apply the MS:1000079 rename to the four indexed pyOpenMS user-guide files in doc/pyopenms/src/data/, which arrived with the docs merge after this PR was opened.
  • Synchronize PSI-MS version references (4.2.2) in mzQC output and mzTab-M/mzQC tests.
  • Preserve and verify the corrected byte offsets in all eight affected indexed mzML files.
  • Clean up TraML whitespace and add a changelog entry.
  • Merge current develop and resolve the CHANGELOG conflict.
  • Store the two value types added in 4.1.240 and 4.1.255 as strings in the vocabulary reader (finding 4).
  • Keep a PSM-level q-value over lower-is-better engine scores such as Comet:expectation value in the mzIdentML reader, and read those scores as lower-is-better (finding 1).
  • Write activation and analyzer terms that are valid with 4.2.2 in the mzML writer, and update the three shipped files that contain the invented cyclotron analyzer (findings 2 and 3).
  • Read the X!Tandem and OMSSA e-values and the OMSSA p-value as lower-is-better in the mzIdentML reader, and use the q-value once a lower-is-better engine score yields to it (follow-up to finding 1).

What changed from 4.1.260 to 4.2.2

This PR previously carried 4.1.260. The step to 4.2.2 only adds terms:

4.1.155 (develop) 4.1.260 4.2.2
Terms 3,569 4,116 6,061
  • 1,945 new terms:
    • 1,928 liquid chromatographic column models from RepoRT (new columns subset), rooted at the new MS:1004013 (chromatographic column model);
    • 11 mzQC metabolomics metrics (MS:4000216–MS:4000226);
    • Lutefisk (MS:1003871) and four Lutefisk PSM scores (MS:1003872–MS:1003875), each annotated higher-is-better.
  • No existing term changes. No term is renamed, reparented or obsoleted, and no relationship changes. The only edit is the definition text of the MS:1003384 semver regex.
  • Format: upstream now builds psi-ms.obo from psi-ms-core.obo and psi-ms-columns.obo-fragment. All terms except MS:1003871 now carry a subset: tag, and column models carry property_value: lines. ControlledVocabulary::loadFromOBO stores both as unparsed lines, so no parser change was needed.

The renames above and all findings below predate 4.2.2: they arise between 4.1.155 and 4.1.260.

Adversarial review: behavioral regressions

Changing the vocabulary can change OpenMS behavior even when the parser code is unchanged: score classification and semantic validation use the ontology's parent/child relationships at runtime. The following issues were reproduced with native OpenMS calls in the sandbox. All four are fixed in this PR.

Findings 1–3 reproduce with the initial PR vocabulary (4.1.232), with 4.1.260, and with 4.2.2 (re-run against a newer nightly), compared with the previous bundled version (4.1.155). Finding 4 appeared from 4.1.240.

  • P1: Correct Comet expectation score direction and score selection. Fixed in 4b3206d8cf, with a follow-up for X!Tandem and OMSSA in 5bcd806df4.
  • P2: Resolve semantic validation of EThcD/ETciD-only activation records. Fixed in aaef65dfad.
  • P2: Replace the invalid analyzer fallback and handle legacy SWIFT/cyclotron serialization, including three shipped files that already contain the fallback. Fixed in aaef65dfad.
  • P3: Handle two value types that make every PSI-MS load print unknown xsd type to stderr. Fixed in 5b66b3669d.

1. Comet mzIdentML import could select the wrong score and reverse hit ordering (fixed)

Mechanism. MS:1002257 (Comet:expectation value) gains MS:1001143 (PSM-level search engine specific statistic) as a parent. The mzIdentML DOM reader builds its set of recognized engine-specific scores from that ontology subtree. Its score-selection loop traverses CV parameters in accession order and stops at the first recognized score. Consequently, MS:1002257 can now be selected before the later MS:1002354 (PSM-level q-value), even though a q-value is present.

The newly reached engine-specific branch calls isHigherBetterScore(). This returns false only when the term has an explicit has_order MS:1002109 relationship; otherwise it defaults to true. The Comet expectation term lacks that relationship, even in 4.2.2. An expectation value, for which smaller is better, is therefore treated as higher-is-better.

Observed result. A two-hit mzIdentML fixture contains:

Peptide Comet expectation value PSM-level q-value
PEPTIDER 0.00001 0.0001
PEPTIDERR 1.0 0.1

With 4.1.155, MzIdentMLFile.load() selects q-value, sets higher-is-better to false, and places PEPTIDER first. With 4.1.232, 4.1.260 and 4.2.2, the same input selects Comet:expectation value, sets higher-is-better to true, and places the worse hit PEPTIDERR first. Reversing the XML order of the two parameters gives the same result. Calling PeptideIdentification.sort() preserves that incorrect ordering.

This can affect best-hit selection and downstream operations that rely on the imported score type or direction. It is conditional on the available scores: a Comet file with an earlier recognized accession, such as XCorr, may take a different branch. This is not a claim that every Comet file changes.

Fix (4b3206d8cf). Engine-specific scores without a has_order annotation now take their direction from OpenMS' score registry (Scores), which already lists Comet:expectation value as an e-value and percolator:Q value and percolator:PEP as q-value and PEP. All other unannotated scores stay higher-is-better, as before. A lower-is-better engine score yields to a PSM-level q-value, which is then used even if other scores lie between the two in accession order (5bcd806df4); otherwise the first recognized score in accession order is still used. With the fixture above, MzIdentMLFile.load() again selects the q-value in either XML order, and an expectation-only file imports both hits as lower-is-better with PEPTIDER first. MzIdentMLFile_test covers these cases, q-value only, and Comet output with xcorr, expectation value and q-value, where xcorr is still used.

Scope. The fix keeps the existing accession-order rule instead of a fully accession-independent precedence. No category ranking reproduces every current choice: a generic PSM-level e-value (MS:1002353) wins over a q-value (MS:1002354), and percolator:Q value over percolator:score, purely by accession number, and the vocabulary update did not change either. For the 32 mzIdentML files in the repository, the imported score types, directions, scores and hit order are unchanged.

X!Tandem and OMSSA (5bcd806df4). X!Tandem:expect (MS:1001330), OMSSA:evalue (MS:1001328) and OMSSA:pvalue (MS:1001329) had the same problem independently of the vocabulary update: no score order and no registry entry. X!Tandem:expect and OMSSA:evalue come first among their engines' scores in accession order, so X!Tandem and OMSSA mzIdentML imports used them as higher-is-better and ranked the worst hit first. The registry (Scores) now lists the three accessions as e-value scores, next to MS-GF:EValue and Comet:expectation value, so the reader takes them as lower-is-better. When such a score yields to a PSM-level q-value, the reader now goes on to the q-value; before, it took the next score in accession order, which is the hyperscore for X!Tandem and, in a TopPIC file with a q-value, the unannotated spectral FDR read as higher-is-better. With the new registry entries, IDScoreSwitcherAlgorithm also finds these scores as e-values, and QPX and Arrow exports list them as additional scores instead of plain meta values. MzIdentMLFile_test covers X!Tandem and OMSSA with and without a q-value, an OMSSA p-value alone and a hyperscore alone; Scores_test pins the new entries.

Other lower-is-better engine scores without score order or registry entry, such as Mascot:expectation value, MS-GF:PEP or TopPIC:spectral FDR, are still read as higher-is-better if selected. Each of these engines reports a score with a lower accession first (Mascot:score, MS-GF:RawScore, TopPIC:spectral E-value), so they are only selected when that score is missing.

2. EThcD/ETciD-only activation records failed the required activation rule (fixed)

Mechanism. MS:1003181 (combined dissociation method) moves from under MS:1000044 (dissociation method) to MS:1000510 (precursor activation attribute). Its children MS:1002631 (EThcD) and MS:1003182 (ETciD) therefore lose their dissociation-method ancestry, although their own parent references remain unchanged.

The existing precursor_activation_must mapping requires a dissociation method or descendant. Activation attributes are permitted by a separate optional rule, but do not satisfy that requirement. The mzML writer emitted a standalone combined term when the corresponding enum was present without supplemental metadata. It only supplied the generic dissociation-method term when the activation-method set was empty.

Observed result. With canonical CV names, an activation block containing only EThcD or only ETciD passes MzMLFile.isSemanticallyValid() with 4.1.155 and fails with 4.1.232, 4.1.260 and 4.2.2:

Violated mapping rule 'precursor_activation_must' ... 1 term(s) should be present, 0 found!

Native readback still returns the correct EThcD/ETciD enum. This finding is a semantic-validation regression; the tested reader did not silently convert these methods to HCD or CID. Ordinary HCD/CID/ETD and ETD with explicit supplemental HCD/CID metadata also retained their expected activation identities and passed validation.

Existing issue isolated during testing. The writer already emitted noncanonical names for EThcD, ETciD, and HCID. Raw writer output therefore has name-validation errors even with 4.1.155. The comparison above normalizes only those name attributes to isolate the additional ontology-hierarchy failure; it does not claim that raw combined-only output was previously fully valid.

Fix (aaef65dfad). The writer now adds the generic MS:1000044 (dissociation method) whenever every activation method it writes is a combined term, as it already did for an empty activation set. The combined term stays, and the reader ignores MS:1000044, so EThcD-only and ETciD-only precursors read back unchanged. Writing ETD plus HCD or CID instead would change the activation set that is read back, for example from EThcD to ETD, HCD and EThcD. ETD with a supplemental activation term, the form that ThermoRawFileParser writes and OpenMS' Thermo reader produces, already contains a dissociation method and is written as before. HCID, EThcD and ETciD are now written with their PSI-MS names. The mapping rule is unchanged. MzMLFile_test stores EThcD only, ETciD only, HCID, no method, and ETD with supplemental HCD, then checks semantic validity, the number of generic terms written, and the activation sets read back.

3. Analyzer serialization could produce newly invalid mzML, including an automatic fallback (fixed)

Mechanism. MS:1000288 (cyclotron) moves from the mass-analyzer hierarchy to ion optics, while MS:1000284 (stored waveform inverse fourier transform / SWIFT) moves to the acquisition-method hierarchy. The writer still emitted both under <analyzer>. The analyzer_must mapping requires MS:1000443 (mass analyzer type) or a descendant.

The impact extends beyond explicit legacy analyzer selections: for a partially populated instrument with fewer than three components and no analyzer, the writer inserted a cyclotron to satisfy the schema. A source-only instrument exercises this path. A completely empty instrument does not take the same branch.

Observed result. Source-only fallback, explicit CYCLOTRON, and explicit SWIFT writer outputs all pass semantic validation with 4.1.155 and fail with 4.1.232, 4.1.260 and 4.2.2. Each reports an invalid CV term under <analyzer> and a missing required analyzer_must term. An explicit generic analyzer using MS:1000443 remains valid.

Shipped files affected. Three tracked files contained the invented cyclotron analyzer. They validated with 4.1.155 and failed with the newer vocabularies for the same reason: doc/code_examples/data/Tutorial_GaussFilter.mzML, doc/code_examples/data/Tutorial_MorphologicalFilter.mzML and src/tests/class_tests/openms/data/Single_MS2_profileMode.mzML.

Fix (aaef65dfad). The analyzer invented for an instrument without one now uses the generic MS:1000443 (mass analyzer type), like ANALYZERNULL, and keeps its warning userParam. Analyzers of type SWIFT or CYCLOTRON are written with the generic term plus a legacy mass analyzer type userParam that holds the OpenMS type name, from which the reader restores the type. Writing cyclotron as an ion optics type or SWIFT as an acquisition method would need changes to OpenMS' instrument model; the userParam keeps the fix inside the mzML handler. IONSTORAGE, an mzData type without a PSI-MS term that was written without any analyzer type, is handled the same way. Files with the old MS:1000284 or MS:1000288 analyzer terms still read as SWIFT or CYCLOTRON. The three shipped files now contain the generic term, and the offsets of the two indexed tutorial files were recomputed. MzMLFile_test covers CYCLOTRON, SWIFT, IONSTORAGE and ANALYZERNULL analyzers, an unknown value in the userParam, which stays a meta value, and a source-only instrument.

4. Every PSI-MS load printed two unknown xsd type lines to stderr (fixed)

Mechanism. Two terms added after 4.1.155 declare value types that loadFromOBO did not recognize:

  • MS:1003820 (coordinate spacing model) uses has_value_type MS:1003813 (list of doubles).
  • MS:1003986 (protein sequence) uses has_value_type MS:1001344 (AA sequence).

The parser mapped only the MS:1002711–MS:1002713 list types and printed ControlledVocabulary: OBOFile: unknown xsd type: ..., ignoring for anything else.

Observed result. With 4.1.260 and 4.2.2, every load of psi-ms.obo printed both lines to stderr. The first appears from 4.1.240 and the second from 4.1.255; 4.1.155 printed neither. The shared vocabulary is loaded once per process, so almost every TOPP tool that reads mzML printed them, and handlers that load their own copy, such as TraML, printed them again. Both terms were also left without a value type, so semantic validation rejected any value they carry. A spectrum with an MS:1003820 value failed with Value of CV term not allowed, although the mapping allows the term there.

Fix (5b66b3669d). loadFromOBO stores MS:1003813 like the other list types and MS:1001344 as a string. ControlledVocabulary_test checks that the bundled vocabulary loads without messages and with string value types. MzMLFile_test checks that the new fixture MzMLFile_list_value.mzML, a spectrum with an MS:1003820 value, validates.

Informational: third-party mzIdentML examples now miss a unit

MS:1002404 (count of identified proteins) gained has_units UO:0000189. The three third-party mzIdentML 1.3 examples use it without a unit (MzIdentML_v1.3_noncov_assoc.mzid, MzIdentML_v1.3_crosslinking.mzid, MzIdentML_v1.3_xlink_edc.mzid), so semantic validation now reports CV term must have a unit for them. The tests only load these files, and OpenMS never writes this term, so no action is needed.

Validation

The branch includes develop at acedbca245.

Data consistency checks passed:

  • The bundled file is identical to the upstream v4.2.2 blob.
  • 6,061 terms, with no dangling is_a parents and no new duplicate names relative to 4.1.260.
  • No stale names from any of the 23 renames or 7 obsoletions between 4.1.155 and 4.2.2 remain anywhere in the tree, including files git treats as binary.
  • All version references are consistent.
  • In the six edited indexed mzML files (four pyOpenMS doc files, two tutorial files), every spectrum and chromatogram offset and indexListOffset was checked against the actual element positions.
  • git diff --check passes.

Native runtime experiments executed in the sandbox: Linux x86_64, Python 3.11, pyopenms==3.6.0.dev20260923. Each vocabulary ran from its own copy of the wheel's share/OpenMS, selected with OPENMS_DATA_PATH and confirmed per run from the resolved data path and version-specific sentinel terms. The copies differ only in psi-ms.obo, plus this PR's TraML-mapping.xml for 4.1.260 and 4.2.2.

  • Parsing. 4.2.2 loads 6,061 terms, also when combined with PATO, UO, BTO and GO as in ControlledVocabulary::getPSIMSCV(). Apart from finding 4, which the reader fix removes, the load prints nothing to stderr.
  • Fixture sweep. All 455 tracked mzML, TraML and mzIdentML files were semantically validated under each vocabulary.
    • 4.1.260 and 4.2.2 give identical results for every file: validity, error messages and warning counts.
    • Relative to 4.1.155 (using develop's copies of the fixtures this PR edits), eight files change from valid to invalid: the four doc files and the three cyclotron files from finding 3, all updated in this PR and valid again with 4.2.2, and one third-party mzIdentML example (informational item).
  • mzML data edits. For the four doc files and the three files from finding 3, full load and, for the indexed files, on-disk random access return identical spectra before and after the edit. All seven files validate with 4.2.2.
  • pyOpenMS unit tests from this branch: 5,807 passed and 0 failed with both the 4.1.260 and 4.2.2 resources (117 skipped, 10 xfailed, 7 xpassed). The 28 Parquet tests locate their data relative to the repository root, so they ran from a mirrored directory layout.
  • Reader fix. Without a local build, I compiled the patched ControlledVocabulary.cpp with the real ControlledVocabulary_test and MzMLFile_test sources and this branch's test framework, and linked them against the nightly libOpenMS. The library calls the reader through the PLT, so its own code paths, including MzMLFile::isSemanticallyValid, used the patched reader. Both test binaries pass completely with 4.2.2. With the original ControlledVocabulary.cpp built the same way, only the new assertions fail: three in ControlledVocabulary_test and two in MzMLFile_test.
  • Score selection fix. Built the same way, with the patched MzIdentMLDOMHandler.cpp using system Xerces-C 3.2, the real MzIdentMLFile_test passes completely. With the original handler, only the 12 new assertions fail. Loading all 32 tracked mzIdentML files (1,734 identifications) gives identical score types, directions, scores and hit order with the patched and original handler.
  • X!Tandem/OMSSA follow-up. Built the same way with the patched MzIdentMLDOMHandler.cpp and Scores.cpp, MzIdentMLFile_test and Scores_test pass completely. With the previous handler and registry, only the new assertions fail: all five lower-is-better cases import as higher-is-better with the worse hit first, and Scores_test fails on the pinned counts and the new entries. With the registry change alone, X!Tandem with a q-value uses the hyperscore. The 33 mzIdentML files already in the repository (1,739 identifications, including the Comet fixture) import with identical score types, directions, scores and hit order.
  • mzML writer fix. Built the same way, with the patched MzMLHandler.cpp, the full MzMLFile_test passes with 4.2.2, including the schema and semantic validation of its temporary files. With the original handler, only the new section fails: seven assertions, plus the validation of its two temporary files with the errors from findings 2 and 3. Loading and storing all 420 tracked mzML files gives byte-identical output and the same validation results with the patched and the original handler. 406 files load; the other 14 are empty, deliberately broken, or expected outputs with placeholders, and fail with both. The previous versions of the three files from finding 3, stored with the patched handler, validate with 4.2.2.
  • Regression reproductions and controls (nightly binary, before the fixes in this PR):
Runtime case 4.1.155 4.1.260 4.2.2
Comet expectation + q-value (either XML order) q-value; lower is better; correct first hit Expectation; higher is better; wrong first hit Same regression
Comet expectation only No imported hits Expectation; higher is better; wrong first hit Same regression
Comet q-value only Correct Correct Correct
EThcD-only / ETciD-only, canonical names Valid Missing required dissociation method Same failure
Source-only instrument fallback Valid Invalid cyclotron analyzer Same failure
Explicit CYCLOTRON / SWIFT Valid Invalid analyzer terms Same failure
CID, HCD, TRAP, ETD Valid; expected activation readback Same Same
HCID, canonical name Valid; expected activation readback Same Same
ETD + supplemental HCD/CID Valid; expected activation readback Same Same
Generic analyzer, Orbitrap Valid Valid Valid

These are native runtime reproductions with the nightly wheel's binary, which predates this branch and lacks its C++ edits (renamed names written for MS:1000079 and MS:1001117, the mzQC version constant). The table records the behavior before the fixes; the bullets above describe the fixed behavior. None of these runs is a build or test-suite run of commit 5bcd806df4; CI covers that.

Original prompt

update the psi-ms.obo with newest version

🤖 Generated with Claude Code

https://claude.ai/code/session_01EtXXbHmqnbQ8wjJBZnciZj

Copilot AI changed the title [WIP] Update psi-ms.obo with newest version Update psi-ms.obo to version 4.1.232 Jan 24, 2026
Copilot AI requested a review from timosachsenberg January 24, 2026 17:27
@jpfeuffer

Copy link
Copy Markdown
Contributor

@copilot checking (created temporary files)...

  • Error: mzML file semantically invalid 'IndexedMzMLFileLoader_test_117.tmp'
    Error - Name of CV term not correct: 'MS:1000079 - fourier transform ion cyclotron resonance mass spectrometer' should be 'fourier transform ion cyclotron resonance'
  • invalid file 'IndexedMzMLFileLoader_test_117.tmp' (type: mzML)
  • Error: mzML file semantically invalid 'IndexedMzMLFileLoader_test_154.tmp'
    Error - Name of CV term not correct: 'MS:1000079 - fourier transform ion cyclotron resonance mass spectrometer' should be 'fourier transform ion cyclotron resonance'
  • invalid file 'IndexedMzMLFileLoader_test_154.tmp' (type: mzML)
    : failed

Output of successful tests were suppressed. Set the environment variable 'OPENMS_TEST_VERBOSE=True' to enable them.
FAILED

Did something change in existing CV terms? Should we therefore change sth in code?

Copilot AI commented Jan 25, 2026

Copy link
Copy Markdown
Contributor Author

@copilot checking (created temporary files)...

  • Error: mzML file semantically invalid 'IndexedMzMLFileLoader_test_117.tmp'
    Error - Name of CV term not correct: 'MS:1000079 - fourier transform ion ...

Yes, several CV term names changed in the updated psi-ms.obo. I've fixed the code and test data files in commit d9de9fb:

CV term renames handled:

  • MS:1000079: "fourier transform ion cyclotron resonance mass spectrometer" → "fourier transform ion cyclotron resonance"
  • MS:1001117: "theoretical mass" → "theoretical neutral mass"
  • MS:1001910: "LTQ Orbitrap Elite" → "Orbitrap Elite"
  • MS:1000280: "suface ionization" → "surface ionization" (typo fix)

Updated MzMLHandler.cpp, TraMLHandler.cpp, and 8 test data files to match the new CV term names.

@jpfeuffer

Copy link
Copy Markdown
Contributor

Gotta love it when CV term names change. That's why I am always advocating for ontology IDs only in long-term storage files.

@timosachsenberg

Copy link
Copy Markdown
Contributor

great. @ypriverol see another recent name chance

@timosachsenberg
timosachsenberg marked this pull request as ready for review January 26, 2026 06:52
@ypriverol

ypriverol commented Jan 26, 2026 •

Copy link
Copy Markdown
Contributor

That is why a vote for our own ontology within the OpenMS ecosystem is aligned with existing ontologies but not based-on.

Copilot AI and others added 4 commits February 16, 2026 11:00
Updated code and test data to match renamed CV terms in psi-ms.obo v4.1.232:
- MS:1000079: fourier transform ion cyclotron resonance
- MS:1001117: theoretical neutral mass
- MS:1001910: Orbitrap Elite
- MS:1000280: surface ionization (fixed typo)

Co-authored-by: jpfeuffer <[email protected]>
- Fix byte offsets in indexed mzML files that were invalidated by
  CV term name length changes (fixes IndexedMzML*, OnDiscMSExperiment,
  CometAdapter_5, Tutorial_FileIO_mzML, and pyopenms tests)
- Update CV version 4.1.155 -> 4.1.232 in MzQCFile.cpp, MzTabM_test,
  and reference output files (fixes MzTabMFile and AccurateMassSearchEngine tests)
- Update "theoretical mass" -> "theoretical neutral mass" (MS:1001117)
  in traML test/reference files (fixes FileMerger_9 test)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@timosachsenberg
timosachsenberg force-pushed the copilot/update-psi-ms-obo-version branch from d9de9fb to fe3c44a Compare February 16, 2026 10:25
timosachsenberg pushed a commit that referenced this pull request Jun 10, 2026
…v4.1.232

The CV term MS:1001117 was renamed from "theoretical mass" to
"theoretical neutral mass" in psi-ms.obo v4.1.232. PR #8691 updated the
writer (TraMLHandler.cpp) and the .traML test data, but the shipped CV
mapping file still carried the old termName. Update both occurrences so
the mapping stays consistent with the controlled vocabulary.

https://claude.ai/code/session_01YJmfkpV9FLwZg1WjcqGf2s
timosachsenberg and others added 2 commits June 10, 2026 14:24
…v4.1.232

The CV term MS:1001117 was renamed from "theoretical mass" to
"theoretical neutral mass" in psi-ms.obo v4.1.232. The writer
(TraMLHandler.cpp) and the .traML test data were updated; update the
shipped CV mapping file's termName for both occurrences so it stays
consistent with the controlled vocabulary.

Co-authored-by: Claude <[email protected]>
@timosachsenberg
timosachsenberg force-pushed the copilot/update-psi-ms-obo-version branch from f02897b to e353ea2 Compare June 10, 2026 14:25
Sync psi-ms.obo with HUPO-PSI/psi-ms-CV at 6552b7e71dcffe41e5bf2b35b20239659fc472d0.
Update mzQC and mzTab-M version references, clean up TraML whitespace,
and document the vocabulary update in CHANGELOG.

Verified upstream blob identity, ontology IDs and parent references,
XML/JSON fixtures, and indexed mzML byte offsets. Full C++ tests run in CI.
@timosachsenberg timosachsenberg changed the title Update psi-ms.obo to version 4.1.232 Update psi-ms.obo to version 4.1.260 Sep 7, 2026
Resolve the CHANGELOG conflict by taking develop's restructured 3.6.0
section and re-adding the PSI-MS vocabulary entry under General.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtXXbHmqnbQ8wjJBZnciZj
Sync share/OpenMS/CV/psi-ms.obo with the HUPO-PSI/psi-ms-CV v4.2.2
release (54477ce1f35285afc1397bfd4bc9d0838d009aa3, blob 50153ad).

4.2.2 is additive relative to 4.1.260: 1,945 new terms (1,928 liquid
chromatographic column models from RepoRT, 11 mzQC metabolomics
metrics, Lutefisk software and four Lutefisk PSM scores, and a column
model parent). No existing term is renamed, reparented, obsoleted or
changes a relationship; only the MS:1003384 semver regex definition
text changes. Every term now carries a subset tag and column models
carry property_value lines; the OBO parser stores both as unparsed.

Bump the mzQC and mzTab-M vocabulary version references and the
CHANGELOG entry accordingly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtXXbHmqnbQ8wjJBZnciZj
…iles

The pyOpenMS user-guide data merged in with #9024 still named MS:1000079
"fourier transform ion cyclotron resonance mass spectrometer". Since
PSI-MS 4.1.232 the term is "fourier transform ion cyclotron resonance",
so these four indexed mzML files failed semantic validation with the
bundled vocabulary.

Rename the term and recompute the spectrum/chromatogram index offsets
and indexListOffset from the actual element positions, as done for the
other indexed fixtures in this PR. Full and on-disk (indexed) loading
return the same data as before, and all four files validate again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtXXbHmqnbQ8wjJBZnciZj
@timosachsenberg timosachsenberg changed the title Update psi-ms.obo to version 4.1.260 Update psi-ms.obo to version 4.2.2 Sep 24, 2026
…ue types as strings

PSI-MS 4.1.240 added MS:1003820 (coordinate spacing model) with
has_value_type MS:1003813 (list of doubles), and 4.1.255 added
MS:1003986 (protein sequence) with has_value_type MS:1001344 (AA
sequence). loadFromOBO only knew the three older list types, so every
load of psi-ms.obo printed two "unknown xsd type" lines to stderr and
left both terms without a value type. Semantic validation then rejected
any value they carry ("Value of CV term not allowed").

Store both as strings, like the existing list types. Test that the
bundled vocabulary loads without messages and with string value types,
and that an mzML spectrum with an MS:1003820 value validates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtXXbHmqnbQ8wjJBZnciZj
…gine scores

Since PSI-MS 4.1.232, Comet:expectation value (MS:1002257) is a PSM-level
search engine specific statistic (MS:1001143). The reader takes the first
recognized score in accession order, so a Comet expectation value now
displaced a PSM-level q-value (MS:1002354). Lacking a has_order
annotation, it was also read as higher-is-better, so the worst hit ranked
first.

Engine-specific scores without has_order now take their direction from
OpenMS' score registry (Scores), which lists Comet:expectation value as an
e-value and percolator:Q value and percolator:PEP as q-value and PEP. All
other unannotated scores stay higher-is-better. A lower-is-better engine
score yields to a PSM-level q-value; otherwise the accession order is
kept. For the 32 mzIdentML files in the repository, the imported score
types, directions, scores and hit order are unchanged.

Test expectation value and q-value (in either XML order), expectation
value only, q-value only, and xcorr with expectation value and q-value
using a new fixture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtXXbHmqnbQ8wjJBZnciZj
… 4.2.2

PSI-MS moved "combined dissociation method" (MS:1003181) from
"dissociation method" to "precursor activation attribute", so a
precursor whose only activation term is EThcD (MS:1002631) or ETciD
(MS:1003182) violated precursor_activation_must. The writer now adds
the generic "dissociation method" (MS:1000044) whenever every
activation method it writes is a combined term, as it already did for
an empty set. The reader ignores MS:1000044, so EThcD/ETciD read back
unchanged. HCID, EThcD and ETciD are written with their PSI-MS names;
the old names already failed the name check.

Cyclotron (MS:1000288) is now an ion optics type and SWIFT (MS:1000284)
an acquisition method, so neither satisfies analyzer_must. Analyzers of
type SWIFT, CYCLOTRON or IONSTORAGE (which never had a writer term) are
written as "mass analyzer type" (MS:1000443) plus a "legacy mass
analyzer type" userParam, which the reader turns back into the enum.
Old files with the specific terms still read as before. The analyzer
invented for instruments without one uses the generic term instead of
cyclotron; the three shipped files that contain it are updated (index
offsets of the two indexed tutorial files recomputed).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtXXbHmqnbQ8wjJBZnciZj
X!Tandem:expect (MS:1001330), OMSSA:evalue (MS:1001328) and
OMSSA:pvalue (MS:1001329) have no score order in PSI-MS, and OpenMS'
score registry did not list them, so the mzIdentML reader took them as
higher-is-better. X!Tandem:expect and OMSSA:evalue come first among
their engines' scores in accession order, so X!Tandem and OMSSA imports
used them with the wrong direction and ranked the worst hit first. The
registry now lists the three accessions as e-value scores (RAW_EVAL),
next to MS-GF:EValue and Comet:expectation value.

When a lower-is-better engine score yields to a PSM-level q-value, the
reader now goes on to the q-value instead of taking whichever score
comes next in accession order. Otherwise X!Tandem files with a q-value
would use the hyperscore, and a later unannotated lower-is-better score
(e.g. TopPIC:spectral FDR after TopPIC:spectral E-value) would be used
as higher-is-better. The 33 mzIdentML files already in the repository
import unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtXXbHmqnbQ8wjJBZnciZj
@timosachsenberg

Copy link
Copy Markdown
Contributor

needed for DIAAuditor

@timosachsenberg
timosachsenberg merged commit 0d8d3bb into develop Sep 25, 2026
34 checks passed
@timosachsenberg
timosachsenberg deleted the copilot/update-psi-ms-obo-version branch September 25, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants