Repository navigation
Description
Summary
QPX's psm view already holds crosslink spectrum matches (CSMs): cross_links, crosslinked_peptidoform, protein_starts, partner_protein_* and crosslink_decoy_class. The mzIdentML converter fills them.
QPX has no place yet for the other two levels of a crosslinking result, residue pairs and protein–protein interactions. It also cannot say how each level's FDR was estimated. Crosslinking FDR is usually estimated separately per link class and per level, and is now often pooled over many projects.
This issue proposes:
- two views,
crosslink(residue pair) andinteraction(protein pair); - a few columns on
psm; - a table that states how the q-values were estimated.
The proposal follows mzIdentML 1.3 (crosslinking extension 1.0.0) wherever that has a term, and the site/proteoform conventions everywhere else. The draft spec page with the full field tables is in #395. Comments here or there are welcome.
cc @timosachsenberg @daichengxin @Shen-YuFei
Proposal
1. psm: extra columns for crosslink rows (nullable)
The existing cross_links[].xl_type values stay as they are:
inter: a link between two peptides;intra: a link within one peptide, which mzIdentML calls a looplink;dead-end;noncovalent.
New columns:
| Column | Meaning |
|---|---|
xl_protein_scope |
same_family, same_sequence or different_family: where the two linked peptides come from. A producer that estimates FDR per class estimates it in this class. Kept separate from xl_type so neither vocabulary changes meaning |
xl_peptides |
list of structs, alpha first, as in peptidoform. Each struct has sequence, peptidoform, link position, residue and site kind, protein accessions with their starts, is_decoy, linker form (intact or a stub name), the peptide's own score, per-form scores, the number of candidate link sites, and the reagent end it reacted with (for heterobifunctional linkers). It becomes the one source for the partner peptide; partner_protein_* would be deprecated in a later version |
xl_child_spectra |
other spectra that support each peptide: MS3 scans of a cleavable linker, or ETD/EThcD spectra of the same precursor. Each entry gives the peptide (alpha or beta), its spectrum id, fragmentation, MS level, its own stub-modified peptidoform, score, PEP and rank. This is the QPX form of mzIdentML's parent/child SIIs (MS:1003332) |
crosslink_ids |
the residue-pair rows the CSM supports (MS:1003344). It is a soft link that a reader may filter, like the other cross-view ids |
Two more rules for crosslink rows:
- Scores: a crosslink row keeps both the search engine's pair score and the score it was finally ranked by, as named entries in
additional_scores. They differ when rescoring replaced the pair score. - Ids: crosslink rows carry a provided
psm_id, because the schema composite names only the alpha peptide (identity.md).
2. New view crosslink (residue pair)
One row per ambiguity set of linked residues: all the (protein, position) ends that the evidence cannot tell apart on each side. This set is the unit the residue-pair q-value counts, so two overlapping sets are two rows.
Fields:
- The linked residues: an anchor end per side,
protein_a/position_a/amino_acid_aand_b. Protein-terminal links use position 0 or length + 1, withsite_kind, as in thesiteview. Every end of each side is listed inends_a/ends_b, withis_ambiguouswhen there is more than one. - Protein context:
family_*andpg_id_*. - Linkers:
crosslinkers, the reagents seen. The linker is not part of the identity, because one residue pair is one claim, whatever the reagent. - Runs:
grouped_runs, the runs whose CSMs support the claim. - Evidence:
csm_count(all scored CSMs of the set),peptide_pair_countandbest_psm_id. - Error control:
is_decoyanddecoy_class, which are null when the producer exports targets only;xl_protein_scope;score,crosslink_qvalue,crosslink_qvalue_min_csmsandpass_threshold(MS:1003340);fdr_estimate_id.
Class and score are those of the best CSM of the set, and the view says so.
3. New view interaction (protein pair)
One row per claimed protein–protein interaction from links between different families.
Fields:
- The proteins:
protein_a/b, the ambiguity setsproteins_a/b,family_*andpg_id_*. - Evidence:
residue_pair_count,csm_count,best_crosslink_idandbest_psm_id. - Error control:
is_decoy,decoy_class,score,interaction_qvalue,pass_threshold(MS:1003341) andfdr_estimate_id.
4. How the q-values were estimated
crosslink_fdr table. It has one row per population: (FDR group, level, xl_protein_scope). Levels are csm, peptide_pair, residue_pair and interaction. Each row records:
score_nameand the score source;- the training population, when a rescorer learned the score;
- the decoy model, with CV terms
MS:1001194,MS:1001195/MS:1001196andMS:1001197; - the TT/TD/DD counts;
- the estimator, written out in full, for example
fdr = min(1, max(TD + 1 − DD, 2) / TT), withfdr = 1when TT = 0. Ties take the value at the end of their group, and q is the running minimum from the bottom.
A validator can recompute a q-value only when:
- the decoy rows are kept;
- the score is stored at full precision;
- the producer states every row it dropped before estimating.
The check is opt-in.
Looplinks and noncovalent pairs have no estimator unless a producer defines one; their q-value is null otherwise.
crosslink_fdr_shares table. When one FDR is pooled over several projects, this table gives each project's share of the CSMs that pass a pooled cut. Each row carries project, q_cut, the TT/TD/DD counts and share_estimate, with its own named formula. These rows show whether pooling moved errors into a weaker project. They are not summed against the population row.
5. run.crosslinkers
The crosslinkers used in the search, each with:
- name and XLMOD accession;
- intact mass;
- whether it is cleavable;
- its two reactive ends;
- for cleavable linkers, the stubs (name, mass, pairs_with), as in
MS:1003390; - for isotope-labelled pairs, the label.
Where an SDRF has comment[cross-linker], this field comes from it.
Relation to mzIdentML 1.3
- CSM: paired SIIs (
MS:1002511), donor/acceptor (MS:1002509/MS:1002510) and child SIIs (MS:1003332). - Peptide pair:
MS:1003338. - Residue pair:
MS:1002677, withMS:1003340. - Protein pair:
MS:1002676, withMS:1003341.
mzIdentML's FDR terms are global. The QPX q-values are per population, stated in crosslink_fdr. mzIdentML's only link-class term is the boolean MS:1003343 (self vs heteromeric), so xl_protein_scope and the estimator text are proposals beyond it.
The mzIdentML ordering rule for donor and acceptor (longer peptide, then mass, then alphabetical) is a fallback for unmarked or symmetric reagents. QPX keeps the alpha/beta order of peptidoform, and records the reagent end per peptide.
Two converter changes would come with this:
- The PAGs that mzIdentML uses for residue pairs and PPIs are read today as protein groups. The
pgadapter must skip them and fill the new views instead. - A decoy accession in an ambiguity set needs one rule for every producer. The proposal is that a side is a target when it has any target accession. The current converter marks it a decoy when any accession is a decoy.
Open questions
- CSMs in
psmwith these columns (reuses joins and the converter), or a separatecsmview? - View and table names. Should
crosslink_fdrbe a table, or provenance parameters? - Ambiguity as lists (
ends_a/b), or one row per alternative with a group id, asmodification_candidatesdoes? - Should the per-project share rows be in the format at all, or only in producer reports?
- Should calibration columns (entrapment or truth-set error) be allowed in production files, or only in benchmark files?
- New views also need a schema, a
file_type, collection/merge registration, and entries in versioning, ontology and converter-coverage. Is that best as one PR per view, or one PR for all?
Producer
The first producer would be the andes search engine. Its crosslink tables carry the three levels and per-class q-values today, but they need changes before they can write these views:
- Parquet instead of TSV;
- full-precision scores;
- MS3 scan ids;
- protein starts per accession;
- the XLMOD accession on each row;
- the estimator metadata.
The proposal went through an adversarial review before posting. The review found:
- the
xl_typevocabulary clash, now resolved byxl_protein_scope; - an estimator that couldn't be recomputed as written;
- a counting-unit definition that didn't match;
- per-project shares that couldn't be validated.
The text above reflects those fixes.
Activity
Shen-YuFei commentedon Nov 21, 2026
Thanks for writing this up. Checked against psi-ms.obo 4.2.17, the mzIdentML 1.3 crosslinking extension and its example files, and the current converter. Main points:
scores_and_thresholds_1_3_0_draft.mzid, MS:1002677 / MS:1002676 / MS:1003340 / MS:1003341 sit onProteinDetectionHypothesiselements of ordinary protein groups. Their values are encoded strings (106.b:146:0.0294:true,11:false), and the same PDH carriesgroup representative. "pg adapter skips these PAGs" would drop protein groups. The converter should keep pg, parse the encoded values and pair the.a/.bsides by id. Todaypg_adapter._float_valuereturns None for these strings, so the values are dropped silently.multiple_spectra_per_id_1_3_0_draft.mzidthe parent and child SIIs carry the same1234:1E-08. It belongs on the psm row, not on eachxl_child_spectrum.crosslink.is_decoy/decoy_classcome from the best CSM, while the page also proposes the side rule. The converter setspsm.is_decoyandcrosslink_decoy_classwith any-decoy (crosslinks.py:157). Please state whether the side rule changes those psm columns, which rulexl_peptide.is_decoyfollows, and which one a residue pair uses.fdr_estimate_id, althoughlevelincludescsmandpeptide_pair.crosslink_qvalue_min_csmsshares the main estimate's id and TT/TD/DD counts. The "FDR group" key from the issue is not in the table. A free-textestimatorcannot drive the opt-in recompute. Ismax(TD + 1 - DD, 2)intended? The shares example usesmax(TD - DD, 0).same_sequencealso satisfiessame_family, so a precedence rule is needed. The mapping to MS:1003343 (self = one protein sequence) should be spelled out.interactionexcludes same-family links, but the 1.3 example reports self PPIs under MS:1002676. Where do homodimers go?additional_scores.site_kindis not in site.md, so call it new; what doespeptide_n_termmean when linking precedes digestion?identity_sourceis a file footer value, not per row.xl_peptidesentry, sodonor/acceptor_positioncan't be deprecated.partner_sequence/partner_peptidoform/crosslinked_peptidoformalso duplicatexl_peptides.comment[cross-linker]guarantees only NT and AC, butintact_mass,cleavableandend_1/end_2are non-null.spectrum_idis a native-id string while psm usesscan.crosslink_idcomposite needs thelink_endfields and sort key spelled out.docs(spec): cross-link proposal, review of #394
ypriverol commentedon Nov 21, 2026
Thanks for checking this against the OBO, the extension and its examples. All six points hold, and #395 is updated (e56d37d). Point by point:
Residue-pair and PPI values. Agreed. In
scores_and_thresholds_1_3_0_draft.mzid,MS:1002677/MS:1003340andMS:1002676/MS:1003341are encoded strings (11.b:697:0.06:false) on the PDHs of ordinary protein groups, next togroup representative. The page now says the converter keeps those groups inpg. In addition it parses the encoded values intocrosslinkandinteraction, pairing.a/.bby ID. It also notes thatpg_adapter._float_valuedrops them today.MS:1003336. Moved. It is the PEP of the combined identification, so it goes inpsm.posterior_error_probability.xl_child_spectrumno longer has a PEP.Decoys. There is now one rule, stated once:
crosslink_decoy_classandpsm.is_decoyfollow from the two peptides;xl_peptides[].is_decoyfollows the peptide rule;The page notes that this changes the converter's any-decoy result for a peptide mapping to both a target and a decoy accession.
FDR traceability.
psmgetsfdr_estimate_id.fdr_estimate_id_min_csms).crosslink_fdrgainsfdr_group.estimator(td_minus_ddortd_plus_dd),pseudo_count,min_false. A validator can recompute from those. The rank-to-q rule (cap, TT = 0, ties, running minimum) is written out once.max(TD + 1 − DD, 2) / TTis intended for q-values.max(TD − DD, 0) / TT, no pseudo-count or floor. It is now labelled as such and is not a q-value.Link classes.
same_familynow uses the proteoform.md family, so homologs are different families.same_sequencetakes precedence oversame_family.MS:1003343maps self (same_sequence,same_family) against heteromeric (different_family).interactionnow includes self pairs, flaggedself_pair, as in the 1.3 example. Asame_sequencelink is a candidate homo-oligomer. A producer that estimates protein-pair FDR for heteromeric pairs only leaves self pairs out.xl_partner_ambiguous. In andes' truth-set work, on a proteome-sized database most false heteromeric CSMs that a rescorer accepts have a partner peptide with a near-identical, same-mass copy in another protein: an I/L variant, a permutation, or a near-isobaric substitution. Decoys cannot model that, so andes estimates those CSMs apart. The flag lets the format say so.Smaller points.
site_kindis marked new, with valuesresidue,protein_n_termandprotein_c_term. A link at a non-protein peptide N-terminus (cross-linking after digestion) isresidueat that position.identity_sourceis described as the file footer value.cross_links(a looplink has both there), and so docrosslinked_peptidoformandpartner_*.xl_peptidesnow carries only the per-peptide evidence those columns lack, so it repeats no sequence or position. The only remaining overlap ispartner_protein_*againstxl_peptides[].protein_*(open question 6).run.crosslinkersfields beyond name and accession are nullable, filled from XLMOD or the search settings.run_file_name+scan, like psm.crosslink_idcanonical key is spelled out:ends_aandends_bas sorted (accession, position) lists, side A being the one whose first end sorts first, then sortedgrouped_runs.A new section, Possible follow-up views, adds two views that the keys above leave room for. Neither is part of this proposal:
crosslink_feature: quantified cross-links per run and label, likefeature.crosslink_structure: residue pairs mapped onto structure models (PDB, AlphaFold, ModelArchive), with distances against the linker's span.Feedback welcome on whether either is worth a proposal of its own.