Skip to content

Proposal: cross-linking results above the PSM level (residue pairs, protein pairs, FDR per class) #394

Open

Description

@ypriverol

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) and interaction (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_a and _b. Protein-terminal links use position 0 or length + 1, with site_kind, as in the site view. Every end of each side is listed in ends_a/ends_b, with is_ambiguous when there is more than one.
  • Protein context: family_* and pg_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_count and best_psm_id.
  • Error control:
    • is_decoy and decoy_class, which are null when the producer exports targets only;
    • xl_protein_scope;
    • score, crosslink_qvalue, crosslink_qvalue_min_csms and pass_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 sets proteins_a/b, family_* and pg_id_*.
  • Evidence: residue_pair_count, csm_count, best_crosslink_id and best_psm_id.
  • Error control: is_decoy, decoy_class, score, interaction_qvalue, pass_threshold (MS:1003341) and fdr_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_name and the score source;
  • the training population, when a rescorer learned the score;
  • the decoy model, with CV terms MS:1001194, MS:1001195/MS:1001196 and MS:1001197;
  • the TT/TD/DD counts;
  • the estimator, written out in full, for example fdr = min(1, max(TD + 1 − DD, 2) / TT), with fdr = 1 when 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, with MS:1003340.
  • Protein pair: MS:1002676, with MS: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:

  1. The PAGs that mzIdentML uses for residue pairs and PPIs are read today as protein groups. The pg adapter must skip them and fill the new views instead.
  2. 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

  1. CSMs in psm with these columns (reuses joins and the converter), or a separate csm view?
  2. View and table names. Should crosslink_fdr be a table, or provenance parameters?
  3. Ambiguity as lists (ends_a/b), or one row per alternative with a group id, as modification_candidates does?
  4. Should the per-project share rows be in the format at all, or only in producer reports?
  5. Should calibration columns (entrapment or truth-set error) be allowed in production files, or only in benchmark files?
  6. 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_type vocabulary clash, now resolved by xl_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

  1. Shen-YuFei commented on Nov 21, 2026

    @Shen-YuFei
    Collaborator

    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:

    1. mzIdentML has no separate residue-pair / PPI PAGs. Per the extension's "Interaction Level Scores" section and scores_and_thresholds_1_3_0_draft.mzid, MS:1002677 / MS:1002676 / MS:1003340 / MS:1003341 sit on ProteinDetectionHypothesis elements of ordinary protein groups. Their values are encoded strings (106.b:146:0.0294:true, 11:false), and the same PDH carries group representative. "pg adapter skips these PAGs" would drop protein groups. The converter should keep pg, parse the encoded values and pair the .a/.b sides by id. Today pg_adapter._float_value returns None for these strings, so the values are dropped silently.
    2. MS:1003336 is the PEP of the combined identification. In multiple_spectra_per_id_1_3_0_draft.mzid the parent and child SIIs carry the same 1234:1E-08. It belongs on the psm row, not on each xl_child_spectrum.
    3. Decoys need one rule. crosslink.is_decoy/decoy_class come from the best CSM, while the page also proposes the side rule. The converter sets psm.is_decoy and crosslink_decoy_class with any-decoy (crosslinks.py:157). Please state whether the side rule changes those psm columns, which rule xl_peptide.is_decoy follows, and which one a residue pair uses.
    4. FDR traceability. psm has no fdr_estimate_id, although level includes csm and peptide_pair. crosslink_qvalue_min_csms shares the main estimate's id and TT/TD/DD counts. The "FDR group" key from the issue is not in the table. A free-text estimator cannot drive the opt-in recompute. Is max(TD + 1 - DD, 2) intended? The shares example uses max(TD - DD, 0).
    5. Link classes. "family (homologs included)" conflicts with proteoform.md, where homologs are separate families. same_sequence also satisfies same_family, so a precedence rule is needed. The mapping to MS:1003343 (self = one protein sequence) should be spelled out. interaction excludes same-family links, but the 1.3 example reports self PPIs under MS:1002676. Where do homodimers go?
    6. Smaller fixes on the page:
      • psm.md still says residue/protein-pair FDR goes in additional_scores.
      • site_kind is not in site.md, so call it new; what does peptide_n_term mean when linking precedes digestion?
      • identity_source is a file footer value, not per row.
      • A looplink's second site has no home in a single xl_peptides entry, so donor/acceptor_position can't be deprecated.
      • partner_sequence/partner_peptidoform/crosslinked_peptidoform also duplicate xl_peptides.
      • SDRF comment[cross-linker] guarantees only NT and AC, but intact_mass, cleavable and end_1/end_2 are non-null.
      • spectrum_id is a native-id string while psm uses scan.
      • The crosslink_id composite needs the link_end fields and sort key spelled out.
  2. ypriverol commented on Nov 21, 2026

    @ypriverol
    ContributorAuthor

    Thanks for checking this against the OBO, the extension and its examples. All six points hold, and #395 is updated (e56d37d). Point by point:

    1. Residue-pair and PPI values. Agreed. In scores_and_thresholds_1_3_0_draft.mzid, MS:1002677/MS:1003340 and MS:1002676/MS:1003341 are encoded strings (11.b:697:0.06:false) on the PDHs of ordinary protein groups, next to group representative. The page now says the converter keeps those groups in pg. In addition it parses the encoded values into crosslink and interaction, pairing .a/.b by ID. It also notes that pg_adapter._float_value drops them today.

    2. MS:1003336. Moved. It is the PEP of the combined identification, so it goes in psm.posterior_error_probability. xl_child_spectrum no longer has a PEP.

    3. Decoys. There is now one rule, stated once:

      • a peptide is a decoy when every protein it maps to is a decoy;
      • crosslink_decoy_class and psm.is_decoy follow from the two peptides;
      • xl_peptides[].is_decoy follows the peptide rule;
      • a residue pair or protein pair takes the class of its best CSM, the one whose score ranks it.

      The page notes that this changes the converter's any-decoy result for a peptide mapping to both a target and a decoy accession.

    4. FDR traceability.

      • psm gets fdr_estimate_id.
      • The min-CSM q-value is its own population, with its own id and counts (fdr_estimate_id_min_csms).
      • crosslink_fdr gains fdr_group.
      • The estimator is now structured fields: estimator (td_minus_dd or td_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.
      • Yes, max(TD + 1 − DD, 2) / TT is intended for q-values.
      • The per-project share is a different, descriptive estimate: max(TD − DD, 0) / TT, no pseudo-count or floor. It is now labelled as such and is not a q-value.
    5. Link classes.

      • same_family now uses the proteoform.md family, so homologs are different families.
      • same_sequence takes precedence over same_family.
      • MS:1003343 maps self (same_sequence, same_family) against heteromeric (different_family).
      • interaction now includes self pairs, flagged self_pair, as in the 1.3 example. A same_sequence link is a candidate homo-oligomer. A producer that estimates protein-pair FDR for heteromeric pairs only leaves self pairs out.
      • New: 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.
    6. Smaller points.

      • psm.md now points to the proposal for residue-pair and protein-pair FDR.
      • site_kind is marked new, with values residue, protein_n_term and protein_c_term. A link at a non-protein peptide N-terminus (cross-linking after digestion) is residue at that position.
      • identity_source is described as the file footer value.
      • Positions stay in cross_links (a looplink has both there), and so do crosslinked_peptidoform and partner_*. xl_peptides now carries only the per-peptide evidence those columns lack, so it repeats no sequence or position. The only remaining overlap is partner_protein_* against xl_peptides[].protein_* (open question 6).
      • The run.crosslinkers fields beyond name and accession are nullable, filled from XLMOD or the search settings.
      • Child spectra use run_file_name + scan, like psm.
      • The crosslink_id canonical key is spelled out: ends_a and ends_b as sorted (accession, position) lists, side A being the one whose first end sorts first, then sorted grouped_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, like feature.
    • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions