Skip to content

andes inference: dataset-level protein groups over several runs as the QPX pg view - #197

Merged
ypriverol merged 1 commit into
feat/protein-inferencefrom
feat/andes-inference
Oct 20, 2026
Merged

ypriverol merged 1 commit into
feat/protein-inferencefrom
feat/andes-inference

Conversation

@ypriverol

Copy link
Copy Markdown
Contributor

Stacked on #192. This PR adds andes inference: protein groups over the rescored PSMs of several runs, written as the QPX protein-group view. A multi-run pipeline that searches each file separately can then infer proteins once for the whole dataset, whether or not it quantifies.

andes inference \
  --psms run1.percolator.target.psms.txt run2.percolator.target.psms.txt \
  --decoy-psms run1.percolator.decoy.psms.txt run2.percolator.decoy.psms.txt \
  --database db.fasta -o out/PXD000001
# writes out/PXD000001.pg.parquet

Change

  • Inference: the same inference as Protein groups with picked protein-level FDR; --protein-fdr filter #192 (parsimony over protein families, picked target-decoy competition per family), run once over every run's PSMs, so the groups and their q-values are dataset-level.
  • Database: loaded with the search's options (--annotations, --uniprot-*, --knockoffs, --enzyme, decoy affixes), so families, knockoff entries and decoy pairs match the search.
  • PSM q-values: before inference, the command shares I/L-equal references and applies the class and knockoff q-values, as in a search. --fdr and --proteoform-fdr set the PSM cutoffs used for the peptide and PSM counts.
  • SpecIds: rows from per-run files are keyed by file, so a SpecId repeated across runs stays distinct.
  • <PREFIX>.pg.parquet, the QPX pg view (1.1):
    • rows: one per target group, plus one per decoy group that won its family's competition (is_decoy), so a reader can recompute the FDR;
    • q-values: global_qvalue is the protein q-value; pg_qvalue (run level) is set only when the inference covers one run;
    • groups: pg_accessions, anchor_protein, grouped_runs (--runs, else one name per --psms file);
    • evidence: peptides (peptide count per accession) and peptide_counts;
    • extras: the best peptide score in additional_scores; families, PSMs, razor peptides and subsumed families in cv_params;
    • identity: the footer sets primary_key and identity_composite. label/intensity are null (identification only).
  • Inference also returns the decoy groups and per-accession peptide counts.

The scores must come from one Percolator run over all the runs. Separate Percolator runs are not on one scale, and DOCS says so.

Tests

  • pg writer: schema, footer metadata, targets and decoys, null run-level q for a dataset, grouped runs.
  • Inference: the decoy group that beats its target is reported, with its q.
  • End to end (tests/inference_cli.rs): two runs with repeated SpecIds and a FASTA, run through the binary. Checks that a protein's peptides from both runs are merged, a target that lost to its decoy gets q = 1, the decoy group is present, and grouped_runs holds both runs.
  • Suites: clippy is clean, and the output and andes test suites pass.

…ten as the QPX pg view

andes inference --psms ... --decoy-psms ... --database ... -o PREFIX loads the
database with the search's options, applies the class and knockoff q-values,
and runs one parsimony and one picked competition over every run's PSMs.
PREFIX.pg.parquet holds the target groups and the decoy groups that won their
family's competition. Inference also keeps decoy groups and per-accession
peptide counts.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c48c666a-2eb3-4786-a60d-0fa1a3fd3053

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ypriverol
ypriverol merged commit 33d9939 into feat/protein-inference Oct 20, 2026
1 check passed
ypriverol added a commit that referenced this pull request Oct 21, 2026
Re-land andes inference and the knockoff protein-evidence fix (from #197)
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.

1 participant