[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CVFF514525SVB8NQRCNHRD":3,"skill-same:01M7CVFF514525SVB8NQRCNHRD":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7CVFF514525SVB8NQRCNHRD","bio-proteomics-protein-inference",null,"Groups proteins from peptide identifications and controls protein-level FDR, framing inference as a chosen explanation (parsimony or a probability model) of underdetermined peptide evidence rather than a measurement. Reports protein GROUPS (proteins indistinguishable by observed peptides) with a leading protein, not flat lists. Covers shared-vs-unique peptides, indistinguishable\u002Fsubsumable proteins, parsimony vs probabilistic (ProteinProphet, EPIFANY) vs razor inference, picked-protein and picked-group FDR, and why the two-peptide rule is wrong. Use when resolving which proteins are present from a peptide list, building protein groups, or estimating protein-level FDR. PSM\u002Fpeptide FDR and search engines are peptide-identification; razor-vs-unique quant consequences are quantification; isoform\u002Fproteoform resolution is top-down and out of scope.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmass-spec-proteomics-analyst\u002Fversions\u002F1.0.1\u002Fpackage\u002Fskills\u002Fbio-proteomics-protein-inference\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-proteomics-protein-inference\ndescription: Groups proteins from peptide identifications and controls protein-level FDR, framing inference as a chosen explanation (parsimony or a probability model) of underdetermined peptide evidence rather than a measurement. Reports protein GROUPS (proteins indistinguishable by observed peptides) with a leading protein, not flat lists. Covers shared-vs-unique peptides, indistinguishable\u002Fsubsumable proteins, parsimony vs probabilistic (ProteinProphet, EPIFANY) vs razor inference, picked-protein and picked-group FDR, and why the two-peptide rule is wrong. Use when resolving which proteins are present from a peptide list, building protein groups, or estimating protein-level FDR. PSM\u002Fpeptide FDR and search engines are peptide-identification; razor-vs-unique quant consequences are quantification; isoform\u002Fproteoform resolution is top-down and out of scope.\ntool_type: mixed\nprimary_tool: pyOpenMS\n---\n\n## Version Compatibility\n\nReference examples tested with: pyOpenMS 3.5.0, pandas 2.2+, Percolator 3.09.0, Philosopher 5.1.0\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n- CLI: `\u003Ctool> --help` (or `\u003Ctool> help \u003Csubcommand>`) and confirm the flag is in the listing BEFORE\n  scripting it -- protein-inference flags get renamed and removed between releases (Percolator's Fido\n  option `--protein`\u002F`-A` is gone in 3.09.0 and exits 1 with `ERROR: the option --protein is invalid.`)\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\nIn pyOpenMS the EPIFANY class is `BayesianProteinInferenceAlgorithm` (there is no `EpifanyAlgorithm`; the TOPP tool is `Epifany`). From 3.5, peptide IDs must be a `PeptideIdentificationList`, and `ProteinGroup.accessions` come back as bytes.\n\n# Protein Inference -- A Chosen Explanation of Peptide Evidence, Reported as Groups\n\n**\"Tell me which proteins are present from my identified peptides\"** -> Assign the observed peptides to a minimal or probability-weighted set of proteins, reported as groups of indistinguishable proteins with a leading accession -- because bottom-up MS measures peptides, and the protein set behind them is inferred, not observed.\n- Python: `pyopenms.BasicProteinInferenceAlgorithm().run(peptide_ids, protein_ids)` for score-aggregation inference; set `greedy_group_resolution` to resolve shared peptides parsimony-style\n- Python: `pyopenms.BayesianProteinInferenceAlgorithm` (TOPP tool `Epifany`) for Bayesian belief-propagation inference\n- CLI: `percolator -f \u003Ctarget_decoy.fasta>` (`--picked-protein`) for picked-protein FDR straight off the `.pin` you already ran; `philosopher proteinprophet` + `philosopher filter --picked --razor` for the FragPipe\u002FTPP route (EM apportionment) -- both judged by their OUTPUT FILES, never by their exit status\n\nScope: this skill OWNS peptide-to-protein grouping, the indistinguishable\u002Fsubsumable distinction, the leading-protein convention, inference-method choice, and protein\u002Fprotein-group FDR. PSM-level and peptide-level FDR plus the search engines that produce the peptide list -> peptide-identification. The quantitative fallout of razor vs unique peptides on protein abundance -> quantification. OUT OF SCOPE: resolving splice isoforms, single-AA variants, or PTM-defined proteoforms (bottom-up groups cannot separate them; that is top-down \u002F proteoform work). Research use only: an inferred group is a chosen explanation, not a clinical finding -- route any patient-level \"protein X is present\" claim to a validated targeted assay (PRM\u002FMRM on protein-unique peptides), never to a discovery protein list.\n\n## The Single Most Important Modern Insight -- Protein Inference Is Underdetermined, So the Honest Unit Is a Group, Not a List\n\n1. **The protein set is not uniquely recoverable from peptides, so a protein group -- not a flat protein list -- is the only honest reporting unit.** Many peptides are shared across paralogs, gene families, and isoforms, so distinct protein sets can explain the same peptide evidence equally well. The inference picks ONE explanation under an assumption (parsimony, or a probability model); proteins that the observed peptides cannot tell apart (indistinguishable) MUST be reported as one group with a designated leading protein. A flat list double-counts indistinguishable proteins and breaks target\u002Fdecoy symmetry at the protein level, silently corrupting FDR.\n\n2. **Protein FDR is its own estimation problem; estimate it at the protein level with PICKED FDR.** Controlling PSM-FDR at 1% does not give 1% protein-FDR: a deep run has many false PSMs in absolute terms, each can nucleate a one-hit-wonder false protein, and with NO protein-level estimate the protein list can be 10-30% false. That range is dataset- and threshold-dependent, not a constant: on this skill's own synthetic 113k-PSM benchmark, already filtered to 1% PSM FDR, the unfiltered protein list was 7.0% false (and the built-in estimator put it at 14.8%). Measure it on your own data instead of quoting the range. The classic (non-picked) protein-level target-decoy count errs the other way on large data: decoy proteins accumulate random hits faster than false targets, so it OVER-estimates FDR and discards real proteins. Savitski 2015 picked-protein FDR pairs each target protein with its decoy and keeps only the higher-scoring of the pair before counting, which removes that bias. Picked-group FDR (The, Samaras, Kuster & Wilhelm 2022) applies picking to protein groups, and also shows that naive Occam\u002Fparsimony-style grouping can be anticonservative on large data. Subsumable proteins must be removed before groups are counted, or they inflate the target list (synthetic test: 8.6% true FDP at nominal 1% without resolution, 0.9% with it).\n\n3. **Do not use the two-peptide rule -- it discards real proteins, and it is not an FDR control.** Requiring >=2 peptides per protein (Gupta & Pevzner 2009, \"A strike against the two-peptide rule\") throws away legitimate low-abundance single-peptide IDs. Its effect on protein FDR depends on the PSM threshold: Gupta & Pevzner found it raised FDR, while under a strict 1% PSM pre-filter it can lower it at the cost of many true proteins. Replace the blanket rule with: control protein-level (picked) FDR, then judge single-peptide IDs by their score, not their peptide count.\n\n## Vocabulary the Rest of This Depends On\n\n- Shared (degenerate) peptide: maps to >1 protein in the searched database. Cannot, alone, distinguish which protein is present.\n- Unique peptide: maps to exactly one protein -- the only direct evidence for a specific protein. \"Unique\" is DATABASE-RELATIVE: a peptide unique against SwissProt may be shared against TrEMBL+isoforms+contaminants. Always document the exact database (isoforms, contaminants, decoys included).\n- Indistinguishable proteins: explained by the SAME set of observed peptides -> one group, never two confident IDs.\n- Subset \u002F subsumable protein: its observed peptides are a subset of another protein's -> parsimony drops it (the larger protein explains everything it would).\n- Leading \u002F representative protein: the group's reported accession. Convention: most peptides, then highest score, then SwissProt canonical over TrEMBL. Downstream tables key on this accession but must retain group membership -- \"protein P12345\" usually means \"the group led by P12345\".\n- Protein group vs proteoform: a group is an inference artifact (proteins lumped because peptides cannot separate them); a proteoform is a real molecular species (one gene product with a specific sequence + PTM + cleavage state). Bottom-up groups DO NOT resolve proteoforms -- claiming \"isoform X present\" from a shared-peptide group is overreach.\n\n## Tool Taxonomy\n\n| Tool \u002F method | Citation | Mechanism \u002F role | When |\n|---------------|----------|------------------|------|\n| Parsimony (Occam) | -- | Greedy minimal protein set explaining all peptides | Fast default; ties broken arbitrarily; can be anticonservative for group FDR on large data (The 2022) |\n| Score aggregation (OpenMS `BasicProteinInferenceAlgorithm`) | -- | Aggregates peptide scores for EVERY protein; `greedy_group_resolution` adds razor-style resolution | Not parsimony by default: subsumable and shared-only proteins stay as groups unless `greedy_group_resolution='true'` |\n| ProteinProphet | Nesvizhskii 2003 | EM APPORTIONS shared peptides across candidate proteins, weighted by other evidence | TPP \u002F FragPipe pipelines; the classic probabilistic standard |\n| EPIFANY | Pfeuffer 2020 | Bayesian network over the peptide-protein graph, loopy belief propagation + convolution trees | When you want calibrated posteriors rather than a parsimony set. It is NOT automatically better calibrated at the group level: on the reference idXML it passed 583 groups at 1% picked FDR with 3.43% true FDP, against 556 and 0.36% for Basic + `greedy_group_resolution` |\n| Fido | Serang 2010 | Bayesian generative model; was Percolator's `--protein` \u002F `-A` option | GONE from the Percolator CLI -- absent from 3.09.0 `--help`, and `--protein` exits 1 with `ERROR: the option --protein is invalid.` Only \"Not available for Fido\" remarks on `--protein-report-fragments`\u002F`-duplicates` survive. Do not script it |\n| Percolator picked-protein (`-f` \u002F `--picked-protein \u003Cfasta>`) | Savitski 2015 | In-silico digest of the FASTA -> protein grouping -> fragment\u002Fduplicate elimination -> picking, on the `.pin` Percolator already read | The way Percolator 3.09 does protein inference, and it IS the picked method recommended here -- no extra tool needed after Percolator |\n| Razor peptide | -- | Shared peptide assigned winner-take-all to the group with most evidence (MaxQuant) | MaxQuant default; ID-fine but distorts QUANT (route to quantification) |\n| Picked-protein FDR | Savitski 2015 | Pair target with its decoy, keep the higher-scoring of the pair, then count decoys | Protein-level FDR on any non-trivial dataset |\n| Picked-group FDR | The 2022 | Picking applied at the protein-GROUP level | When the inference unit is the group (the correct unit on deep data) |\n| All-proteins \u002F inclusive | -- | Report every protein any peptide could come from | Almost never; massive false-positive protein inflation |\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended | Why |\n|----------|-------------|-----|\n| Standard DDA run, OpenMS-based pipeline | `BasicProteinInferenceAlgorithm` with `greedy_group_resolution='true'` + picked-group FDR; `BayesianProteinInferenceAlgorithm` (EPIFANY) when you want calibrated posteriors | Both are group-FDR aware, but resolution is what controls FDP: on the same idXML, Basic+greedy gave 0.36% true FDP and 0 subsumable groups passing, EPIFANY called with `greedy_group_resolution=False` gave 3.43% and 3 |\n| Already running Percolator after the search | `percolator -f target_decoy.fasta -P DECOY_ -l prot.target.tsv -L prot.decoy.tsv ... search.pin` | Percolator's own picked-protein route; adds no tool and computes the method recommended below |\n| MaxQuant output (`proteinGroups.txt`) | Parse groups as-is; drop `Reverse` (`+`, accessions `REV__`), `Potential contaminant` and `Only identified by site` rows; quantify on UNIQUE peptides | Groups already inferred; `Protein IDs` = all members, `Majority protein IDs` = members with at least half the group's peptides, first = leading; `Unique peptides` = unique to the GROUP, not to one protein |\n| FragPipe \u002F TPP pipeline | `philosopher peptideprophet` -> `proteinprophet` -> `filter --picked --razor` -> `report` (commands below), then COUNT THE ROWS in `protein.tsv` | Native EM apportionment + 2-level FDR; `filter` exits 0 and prints `Converged to 0.00 % FDR` when it read nothing, so the row count is the only real result |\n| Deep dataset (many thousands of proteins) | Picked-GROUP FDR on resolved groups | No protein-level FDR leaves a 7-30% false protein list (measure it; the figure depends on depth and the PSM threshold); the non-picked count over-estimates FDR and loses proteins |\n| Sensitive differential abundance downstream | Quantify on unique peptides only -> quantification | Razor assignment can flip between conditions and fake DE |\n| Want isoform-level answers | Stop -- route to top-down \u002F proteoform methods | Bottom-up groups cannot resolve proteoforms |\n| Few PSMs (single-protein pulldown) | Report evidence, do not trust a \"0% protein FDR\" | Target-decoy FDR is meaningless at tiny counts |\n\nDefault when uncertain: run `BasicProteinInferenceAlgorithm` with `annotate_indistinguishable_groups` and `greedy_group_resolution` on, report protein GROUPS with a leading accession, and control protein-GROUP FDR with picked-group FDR at 1%. Do NOT impose a two-peptide rule.\n\n**Input contract:** protein FDR needs decoys, so the upstream PSM\u002Fpeptide filter must KEEP the decoy hits that pass it. Know the score orientation: PEP is lower-better, posterior probability and the group probability written by these algorithms are higher-better.\n\n**Output contract (CLI):** judge every command-line inference\u002FFDR step by the file it was supposed to write, NEVER by its exit status. A protein-FDR tool that read zero PSMs reports the emptiest possible result as a triumph -- `philosopher filter` exits 0 and prints `Converged to 0.00 % FDR with 0 PSMs` and `Final report ... proteins=0`, and `philosopher peptideprophet` exits 0 after writing an `interact-*.pep.xml` with every `spectrum_query` copied through and zero `peptideprophet_result` elements (both reproduced on Philosopher 5.1.0 with real Comet pepXML). After each step assert non-empty: `protein.tsv` has more than its header line, the `prot.xml` exists, the peptide count Percolator prints is greater than zero. A \"0.00 % FDR\" or a \"0% protein FDR\" is a failed run until a row count says otherwise.\n\n### Group Proteins with pyOpenMS (aggregation + greedy resolution)\n\n**Goal:** Turn an FDR-filtered peptide identification list into protein groups with a leading protein, resolving shared-peptide ambiguity.\n\n**Approach:** Load the idXML from peptide identification, run `BasicProteinInferenceAlgorithm` (score aggregation per protein) with indistinguishable-group annotation AND greedy group resolution on -- without resolution, subsumable and shared-only proteins stay as their own groups -- then read the groups off the protein identification run and apply picked protein-group FDR with the built-in.\n\n```python\nfrom pyopenms import (IdXMLFile, BasicProteinInferenceAlgorithm, PeptideIdentificationList,\n                      FalseDiscoveryRate, String)\n\nprotein_ids = []\npeptide_ids = PeptideIdentificationList()   # pyOpenMS 3.5+: a plain [] fails\n# protein_ids is FIRST in both load() and store() for IdXMLFile\nIdXMLFile().load('peptides_1pct_fdr.idXML', protein_ids, peptide_ids)\n\ninference = BasicProteinInferenceAlgorithm()\nparams = inference.getParameters()\n# annotate_indistinguishable_groups reports indistinguishable proteins as ONE group\nparams.setValue('annotate_indistinguishable_groups', 'true')\n# greedy_group_resolution assigns shared peptides to the best group, so subsumable proteins drop out\nparams.setValue('greedy_group_resolution', 'true')\ninference.setParameters(params)\ninference.run(peptide_ids, protein_ids)\n\n# picked protein-group FDR: (decoy string, is prefix, groups too); group.probability becomes a q-value\nFalseDiscoveryRate().applyPickedProteinFDR(protein_ids[0], String('DECOY_'), True, True)\n\nfor group in protein_ids[0].getIndistinguishableProteins():\n    accs = [a.decode() for a in group.accessions]   # bytes; pyOpenMS sorts them alphabetically\n    if all(a.startswith('DECOY_') for a in accs) or group.probability > 0.01:\n        continue\n    # members share the same evidence; choose the lead explicitly: canonical (no -N isoform suffix) first\n    leading = sorted(accs, key=lambda a: ('-' in a, a))[0]\n    print(leading, group.probability, accs)\n```\n\n### Bayesian Inference + Group FDR with EPIFANY\n\n**Goal:** Assign calibrated protein\u002Fgroup posteriors and control protein-group FDR with a probability model rather than greedy parsimony.\n\n**Approach:** EPIFANY consumes idXML whose PSMs already carry posterior error probabilities (from Percolator or IDPosteriorErrorProbability), then propagates belief over the peptide-protein graph. The TOPP tool is `Epifany`; the pyOpenMS class is `BayesianProteinInferenceAlgorithm`.\n\n```python\nfrom pyopenms import IdXMLFile, BayesianProteinInferenceAlgorithm, PeptideIdentificationList\n\nprotein_ids = []\npeptide_ids = PeptideIdentificationList()\nIdXMLFile().load('peptides_with_pep.idXML', protein_ids, peptide_ids)\n\nalgo = BayesianProteinInferenceAlgorithm()\n# EPIFANY expects PSM posteriors as input. The third POSITIONAL argument is\n# greedy_group_resolution. Unlike BasicProteinInferenceAlgorithm's parameter of the same\n# name, flipping it here did not change the result on the reference idXML (583 groups at 1%\n# picked FDR, 3.43% true FDP with either value) -- so do NOT assume it removed subsumable\n# proteins. Check the surviving groups, or use Basic + greedy when FDP is what you care about.\nalgo.inferPosteriorProbabilities(protein_ids, peptide_ids, False)\n\nfor group in protein_ids[0].getIndistinguishableProteins():\n    print([a.decode() for a in group.accessions], group.probability)   # higher = more likely present\n```\n\n### Picked Protein-Group FDR\n\n**Goal:** Estimate protein-group FDR without the inflation that the reused PSM formula causes on large data.\n\n**Approach:** For each target group, find its decoy counterpart (same accessions with the decoy prefix); keep only the higher-scoring member of each target\u002Fdecoy PAIR; rank the picked set and count decoys as the FDR estimate. For idXML, prefer the built-in `FalseDiscoveryRate().applyPickedProteinFDR(prot_id, String(prefix), True, True)` shown above; for group-level work on large data, the kusterlab `picked_group_fdr` package implements The 2022. The sketch below pairs by the exact accession set, so decoy groups whose membership differs from their target's stay unpaired and are counted unpicked. The decoy prefix is tool-specific (`DECOY_` OpenMS, `rev_` FragPipe\u002FPhilosopher's `--tag` default, `REV__` MaxQuant) and must be passed explicitly. A wrong prefix does not pass silently in either implementation: `applyPickedProteinFDR` raises `IndexError: invalid unordered_map\u003CK, T> key`, and the sketch below raises `ValueError: no decoy groups with prefix ...`. Treat both as \"the prefix is wrong\", not as a corrupt input file.\n\n```python\ndef picked_group_fdr(groups, decoy_prefix, min_decoys=10):\n    # groups: list of dicts with 'accessions' (str), 'score' (higher = better), 'is_decoy'\n    n_decoy = sum(g['is_decoy'] for g in groups)\n    if n_decoy == 0 or not any(a.startswith(decoy_prefix) for g in groups for a in g['accessions']):\n        raise ValueError(f'no decoy groups with prefix {decoy_prefix!r}; keep decoys upstream or fix the prefix')\n    if n_decoy \u003C min_decoys:\n        print(f'WARNING: only {n_decoy} decoy groups; the protein FDR estimate is not meaningful')\n    by_base = {}\n    for g in groups:\n        base = frozenset(a.replace(decoy_prefix, '') for a in g['accessions'])\n        # keep only the higher-scoring of the target\u002Fdecoy pair (the 'pick')\n        if base not in by_base or g['score'] > by_base[base]['score']:\n            by_base[base] = g\n    picked = sorted(by_base.values(), key=lambda g: g['score'], reverse=True)\n\n    targets = decoys = 0\n    for g in picked:\n        if g['is_decoy']:\n            decoys += 1\n        else:\n            targets += 1\n        g['fdr'] = decoys \u002F targets if targets else 1.0\n    running_min = 1.0\n    for g in reversed(picked):  # monotone q-values from the bottom up\n        running_min = min(running_min, g['fdr'])\n        g['qvalue'] = running_min\n    return [g for g in picked if not g['is_decoy'] and g['qvalue'] \u003C= 0.01]\n```\n\n### Protein Groups from the CLI: Percolator and Philosopher\n\n**Goal:** Get groups and protein-level FDR out of a search you are already post-processing on the command line, and recognise a failed run instead of reporting its \"0.00 % FDR\".\n\n**Approach:** Percolator does picked-protein inference itself from the `.pin` -- `-f\u002F--picked-protein` takes the TARGET+DECOY FASTA, in-silico-digests it to build protein groups, eliminates fragment (subsumable) and duplicate proteins, then picks. The FragPipe\u002FTPP route chains PeptideProphet -> ProteinProphet -> `philosopher filter`. Every step below is checked on the file it wrote (see the Output contract above).\n\n```bash\n# --- Percolator 3.09.0: picked-protein FDR, no extra tool after Percolator ---\n# Fido (the old `--protein` \u002F `-A`) is GONE in 3.09.0; `-f` is the only protein route.\n# -P is the decoy prefix in the FASTA; -z must match the search enzyme (default trypsin).\npercolator -f target_decoy.fasta -P DECOY_ -z trypsin \\\n           -l prot.target.tsv -L prot.decoy.tsv \\\n           -r pep.target.tsv  -B pep.decoy.tsv \\\n           -m psm.target.tsv  -M psm.decoy.tsv -S 1 search.pin\n# OUTPUT CHECK. prot.target.tsv columns: ProteinId, ProteinGroupId, q-value,\n# posterior_error_prob, peptideIds -- one row per group representative, already picked.\nawk -F'\\t' 'NR>1 && $3\u003C=0.01' prot.target.tsv | wc -l    # groups at 1% protein-group FDR\n\n# --- Philosopher 5.1.0: the FragPipe \u002F TPP route ---\nphilosopher workspace --init                              # once per output folder\nphilosopher database --annotate target_decoy.fasta --prefix DECOY_\nphilosopher peptideprophet --database target_decoy.fasta --ppm --accmass \\\n                           --nonparam --decoy DECOY_ --decoyprobs search.pep.xml\n# OUTPUT CHECK: peptideprophet exits 0 even when it modelled nothing, copying every\n# spectrum_query through with no probability attached. Count the results, not the exit code.\ngrep -c peptideprophet_result interact-search.pep.xml || { echo 'PeptideProphet modelled 0 PSMs'; exit 1; }\nphilosopher proteinprophet --maxppmdiff 2000000 interact-search.pep.xml\ntest -s interact.prot.xml || { echo 'ProteinProphet wrote no prot.xml'; exit 1; }\n# --tag defaults to 'rev_', NOT the OpenMS\u002FComet 'DECOY_'; --razor is silently ignored\n# unless --protxml supplies inference data.\nphilosopher filter --psm 0.01 --pep 0.01 --prot 0.01 --tag DECOY_ --picked --razor \\\n                   --pepxml interact-search.pep.xml --protxml interact.prot.xml\nphilosopher report\n# OUTPUT CHECK: `filter` exits 0 and prints \"Converged to 0.00 % FDR with 0 PSMs\" on an\n# empty read, and writes header-only tables or none at all.\n[ -s protein.tsv ] && [ \"$(wc -l \u003C protein.tsv)\" -gt 1 ] || { echo 'filter converged on an EMPTY result'; exit 1; }\n```\n\n## Per-Method Failure Modes\n\n### Naive (non-picked) protein\u002Fgroup FDR\n**Trigger:** (a) No protein-level FDR at all (\"1% PSM FDR is enough\"); (b) the classic protein-level `decoys\u002Ftargets` count without picking on a deep dataset; (c) picked FDR on unresolved groups.\n**Mechanism:** (a) false PSMs nucleate one-hit-wonder false proteins that no protein-level estimate catches; (b) decoy proteins keep accumulating random hits while true targets saturate, so decoys are over-counted; (c) subsumable and shared-only proteins count as extra target groups.\n**Symptom:** (a) protein list 7-30% false depending on depth and PSM threshold (7.0% observed on the 113k-PSM synthetic benchmark at 1% PSM FDR); (b) FDR over-estimated, real proteins lost (conservative, not anticonservative); (c) nominal 1% with several-fold higher true FDP.\n**Fix:** Picked-protein FDR (Savitski 2015) or picked-group FDR (The 2022) on resolved groups; validate with a two-species or entrapment search.\n\n### Two-peptide rule\n**Trigger:** Filtering to proteins with >=2 (unique) peptides \"for confidence\".\n**Mechanism:** The rule deletes real low-abundance single-peptide proteins; its FDR effect depends on the PSM threshold (Gupta & Pevzner found it raised FDR; after a strict 1% PSM filter it can lower it while still deleting hundreds of true proteins).\n**Symptom:** Fewer proteins than picked FDR at the same nominal cutoff, with no calibrated error rate.\n**Fix:** Drop the rule; control picked protein-level FDR and score single-peptide IDs individually.\n\n### Razor-peptide quantification\n**Trigger:** Quantifying on MaxQuant's default unique+razor peptides for a sensitive comparison.\n**Mechanism:** A shared peptide's full intensity is credited to one group; that razor assignment can flip between conditions when peptide counts shift, so a protein's quantity changes for inference reasons, not biology.\n**Symptom:** Spurious differential abundance concentrated on proteins sharing peptides with paralogs.\n**Fix:** Quantify on unique peptides only for sensitive comparisons -> quantification.\n\n### Parsimony tie-breaking\n**Trigger:** Multiple minimal protein sets explain the peptides equally well.\n**Mechanism:** Greedy parsimony breaks ties arbitrarily; minimality is a heuristic, not truth, and a real protein with only shared peptides is silently dropped.\n**Symptom:** Reported lead protein differs run-to-run or pipeline-to-pipeline on the same data.\n**Fix:** Prefer a probabilistic method (EPIFANY\u002FProteinProphet) that apportions shared evidence; retain group membership.\n\n### Proteoform overreach\n**Trigger:** Reporting \"isoform X is present\" from a group whose evidence is shared peptides.\n**Mechanism:** Splice isoforms, variants, and PTM forms collapse into groups in bottom-up data; the group cannot separate them.\n**Symptom:** Isoform-specific claim with no isoform-unique peptide behind it.\n**Fix:** Require an isoform-unique peptide for any isoform claim, or use top-down \u002F proteoform methods.\n\n## Quantitative Thresholds\n\n| Threshold | Source | Rationale |\n|-----------|--------|-----------|\n| Protein \u002F protein-group FDR 1% (sometimes 5% for discovery) | community standard | SEPARATE estimation from PSM FDR; never assume 1% PSM implies 1% protein |\n| Picked FDR (target\u002Fdecoy pairing) | Savitski 2015; The 2022 | Removes target\u002Fdecoy asymmetry; dataset-size-independent, unlike naive decoy\u002Ftarget |\n| Decoy:target ratio 1:1 | community standard | Standard null; unequal ratios require formula correction |\n| Min PSMs for trustworthy protein FDR | hundreds+ | Below ~100s of items decoy counts are too noisy; \"0% FDR\" from zero decoys is luck, not control |\n| Two-peptide rule | DO NOT USE (Gupta & Pevzner 2009) | Drops real proteins; FDR effect depends on the PSM threshold; replaced by picked FDR + per-ID score |\n| Single-peptide IDs | judge by score, not count | A high-confidence unique peptide can be a legitimate ID |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Protein FDR much higher than nominal on deep data | No protein-level estimate, or groups not resolved (Basic without `greedy_group_resolution`) | Resolve groups, then picked-protein or picked-group FDR |\n| Real low-abundance proteins missing | Two-peptide rule applied, or non-picked protein FDR (conservative) | Remove the rule; control picked FDR |\n| `AttributeError: module 'pyopenms' has no attribute 'EpifanyAlgorithm'` | The pyOpenMS class is named differently; the R `ProteinInference::infer_proteins` could not be confirmed to exist | Use `pyopenms.BayesianProteinInferenceAlgorithm`; use pyOpenMS, not an unverified R package |\n| `Exception: can not handle type of (..., [], [])` on `IdXMLFile().load` | pyOpenMS 3.5+ needs a `PeptideIdentificationList` | `peptide_ids = PeptideIdentificationList()` |\n| `TypeError: a bytes-like object is required, not 'str'` on group accessions | `ProteinGroup.accessions` are bytes | `[a.decode() for a in group.accessions]` |\n| `IndexError: invalid unordered_map\u003CK, T> key` from `applyPickedProteinFDR` (or `ValueError: no decoy groups with prefix ...` from the sketch) | The decoy prefix does not match the one in the file | Pass the tool's prefix: `DECOY_` OpenMS, `rev_` Philosopher\u002FFragPipe, `REV__` MaxQuant. The error means \"wrong prefix\", not \"corrupt input\" |\n| `ERROR: the option --protein is invalid.` (exit 1) from Percolator | Fido's `--protein`\u002F`-A` was removed; it is not in 3.09.0 `--help` | `percolator -f target_decoy.fasta -P \u003Cdecoy prefix> -l prot.target.tsv ...` (`--picked-protein`) |\n| `philosopher filter` exits 0, logs `Converged to 0.00 % FDR with 0 PSMs` and `proteins=0`, writes header-only or no tables | It read zero PSMs from the pepXML; the exit status reports the empty result as success | Never trust the exit code -- assert `protein.tsv` has more than a header line. Then fix the input: check `Database search results ions=\u002Fpeptides=\u002Fpsms=` in the log, that `--tag` matches the FASTA prefix (default is `rev_`), and that `philosopher database --annotate` ran first |\n| `philosopher peptideprophet` exits 0 but `proteinprophet` then says `did not find any PeptideProphet results` | PeptideProphet modelled nothing and still wrote an `interact-*.pep.xml` full of `spectrum_query` elements with no probabilities | `grep -c peptideprophet_result interact-*.pep.xml` immediately after the step; 0 means the run failed |\n| Indistinguishable proteins reported as separate IDs | Flat protein list instead of groups | Enable `annotate_indistinguishable_groups`; report groups with a leading protein |\n| Spurious DE on paralog-sharing proteins | Razor-peptide quant flipped between conditions | Quantify on unique peptides -> quantification |\n| \"Unique\" peptide count changed when DB changed | Uniqueness is database-relative | Fix and document the database (isoforms, contaminants, decoys) |\n\n## References\n\n- Nesvizhskii, A.I., Keller, A., Kolker, E. & Aebersold, R. (2003). A statistical model for identifying proteins by tandem mass spectrometry. *Analytical Chemistry* 75(17):4646-4658.\n- Gupta, N. & Pevzner, P.A. (2009). False discovery rates of protein identifications: a strike against the two-peptide rule. *Journal of Proteome Research* 8(9):4173-4181.\n- Serang, O., MacCoss, M.J. & Noble, W.S. (2010). Efficient marginalization to compute protein posterior probabilities from shotgun mass spectrometry data. *Journal of Proteome Research* 9(10):5346-5357. (Fido; its Percolator front-end no longer exists as of 3.09.0.)\n- Savitski, M.M., Wilhelm, M., Hahne, H., Kuster, B. & Bantscheff, M. (2015). A scalable approach for protein false discovery rate estimation in large proteomic data sets. *Molecular & Cellular Proteomics* 14(9):2394-2404.\n- The, M., Tasnim, A. & Kall, L. (2016). How to talk about protein-level false discovery rates in shotgun proteomics. *Proteomics* 16(18):2461-2469.\n- The, M., Samaras, P., Kuster, B. & Wilhelm, M. (2022). Reanalysis of ProteomicsDB using an accurate, sensitive, and scalable false discovery rate estimation approach for protein groups. *Molecular & Cellular Proteomics* 21(12):100437.\n- Pfeuffer, J., Sachsenberg, T., Dijkstra, T.M.H., Serang, O., Reinert, K. & Kohlbacher, O. (2020). EPIFANY: a method for efficient high-confidence protein inference. *Journal of Proteome Research* 19(3):1060-1072.\n\n## Related Skills\n\n- peptide-identification - Produces the FDR-filtered peptide list that feeds inference and shares the target-decoy machinery\n- quantification - Consumes inferred groups; razor-vs-unique peptide choice lives here\n- data-import - Loads idXML\u002FmzML identification files\n- database-access\u002Funiprot-access - Canonical-vs-isoform databases drive uniqueness and the leading-protein convention\n","## Version Compatibility\n\nReference examples tested with: pyOpenMS 3.5.0, pandas 2.2+, Percolator 3.09.0, Philosopher 5.1.0\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n- CLI: `\u003Ctool> --help` (or `\u003Ctool> help \u003Csubcommand>`) and confirm the flag is in the listing BEFORE\n  scripting it -- protein-inference flags get renamed and removed between releases (Percolator's Fido\n  option `--protein`\u002F`-A` is gone in 3.09.0 and exits 1 with `ERROR: the option --protein is invalid.`)\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\nIn pyOpenMS the EPIFANY class is `BayesianProteinInferenceAlgorithm` (there is no `EpifanyAlgorithm`; the TOPP tool is `Epifany`). From 3.5, peptide IDs must be a `PeptideIdentificationList`, and `ProteinGroup.accessions` come back as bytes.\n\n# Protein Inference -- A Chosen Explanation of Peptide Evidence, Reported as Groups\n\n**\"Tell me which proteins are present from my identified peptides\"** -> Assign the observed peptides to a minimal or probability-weighted set of proteins, reported as groups of indistinguishable proteins with a leading accession -- because bottom-up MS measures peptides, and the protein set behind them is inferred, not observed.\n- Python: `pyopenms.BasicProteinInferenceAlgorithm().run(peptide_ids, protein_ids)` for score-aggregation inference; set `greedy_group_resolution` to resolve shared peptides parsimony-style\n- Python: `pyopenms.BayesianProteinInferenceAlgorithm` (TOPP tool `Epifany`) for Bayesian belief-propagation inference\n- CLI: `percolator -f \u003Ctarget_decoy.fasta>` (`--picked-protein`) for picked-protein FDR straight off the `.pin` you already ran; `philosopher proteinprophet` + `philosopher filter --picked --razor` for the FragPipe\u002FTPP route (EM apportionment) -- both judged by their OUTPUT FILES, never by their exit status\n\nScope: this skill OWNS peptide-to-protein grouping, the indistinguishable\u002Fsubsumable distinction, the leading-protein convention, inference-method choice, and protein\u002Fprotein-group FDR. PSM-level and peptide-level FDR plus the search engines that produce the peptide list -> peptide-identification. The quantitative fallout of razor vs unique peptides on protein abundance -> quantification. OUT OF SCOPE: resolving splice isoforms, single-AA variants, or PTM-defined proteoforms (bottom-up groups cannot separate them; that is top-down \u002F proteoform work). Research use only: an inferred group is a chosen explanation, not a clinical finding -- route any patient-level \"protein X is present\" claim to a validated targeted assay (PRM\u002FMRM on protein-unique peptides), never to a discovery protein list.\n\n## The Single Most Important Modern Insight -- Protein Inference Is Underdetermined, So the Honest Unit Is a Group, Not a List\n\n1. **The protein set is not uniquely recoverable from peptides, so a protein group -- not a flat protein list -- is the only honest reporting unit.** Many peptides are shared across paralogs, gene families, and isoforms, so distinct protein sets can explain the same peptide evidence equally well. The inference picks ONE explanation under an assumption (parsimony, or a probability model); proteins that the observed peptides cannot tell apart (indistinguishable) MUST be reported as one group with a designated leading protein. A flat list double-counts indistinguishable proteins and breaks target\u002Fdecoy symmetry at the protein level, silently corrupting FDR.\n\n2. **Protein FDR is its own estimation problem; estimate it at the protein level with PICKED FDR.** Controlling PSM-FDR at 1% does not give 1% protein-FDR: a deep run has many false PSMs in absolute terms, each can nucleate a one-hit-wonder false protein, and with NO protein-level estimate the protein list can be 10-30% false. That range is dataset- and threshold-dependent, not a constant: on this skill's own synthetic 113k-PSM benchmark, already filtered to 1% PSM FDR, the unfiltered protein list was 7.0% false (and the built-in estimator put it at 14.8%). Measure it on your own data instead of quoting the range. The classic (non-picked) protein-level target-decoy count errs the other way on large data: decoy proteins accumulate random hits faster than false targets, so it OVER-estimates FDR and discards real proteins. Savitski 2015 picked-protein FDR pairs each target protein with its decoy and keeps only the higher-scoring of the pair before counting, which removes that bias. Picked-group FDR (The, Samaras, Kuster & Wilhelm 2022) applies picking to protein groups, and also shows that naive Occam\u002Fparsimony-style grouping can be anticonservative on large data. Subsumable proteins must be removed before groups are counted, or they inflate the target list (synthetic test: 8.6% true FDP at nominal 1% without resolution, 0.9% with it).\n\n3. **Do not use the two-peptide rule -- it discards real proteins, and it is not an FDR control.** Requiring >=2 peptides per protein (Gupta & Pevzner 2009, \"A strike against the two-peptide rule\") throws away legitimate low-abundance single-peptide IDs. Its effect on protein FDR depends on the PSM threshold: Gupta & Pevzner found it raised FDR, while under a strict 1% PSM pre-filter it can lower it at the cost of many true proteins. Replace the blanket rule with: control protein-level (picked) FDR, then judge single-peptide IDs by their score, not their peptide count.\n\n## Vocabulary the Rest of This Depends On\n\n- Shared (degenerate) peptide: maps to >1 protein in the searched database. Cannot, alone, distinguish which protein is present.\n- Unique peptide: maps to exactly one protein -- the only direct evidence for a specific protein. \"Unique\" is DATABASE-RELATIVE: a peptide unique against SwissProt may be shared against TrEMBL+isoforms+contaminants. Always document the exact database (isoforms, contaminants, decoys included).\n- Indistinguishable proteins: explained by the SAME set of observed peptides -> one group, never two confident IDs.\n- Subset \u002F subsumable protein: its observed peptides are a subset of another protein's -> parsimony drops it (the larger protein explains everything it would).\n- Leading \u002F representative protein: the group's reported accession. Convention: most peptides, then highest score, then SwissProt canonical over TrEMBL. Downstream tables key on this accession but must retain group membership -- \"protein P12345\" usually means \"the group led by P12345\".\n- Protein group vs proteoform: a group is an inference artifact (proteins lumped because peptides cannot separate them); a proteoform is a real molecular species (one gene product with a specific sequence + PTM + cleavage state). Bottom-up groups DO NOT resolve proteoforms -- claiming \"isoform X present\" from a shared-peptide group is overreach.\n\n## Tool Taxonomy\n\n| Tool \u002F method | Citation | Mechanism \u002F role | When |\n|---------------|----------|------------------|------|\n| Parsimony (Occam) | -- | Greedy minimal protein set explaining all peptides | Fast default; ties broken arbitrarily; can be anticonservative for group FDR on large data (The 2022) |\n| Score aggregation (OpenMS `BasicProteinInferenceAlgorithm`) | -- | Aggregates peptide scores for EVERY protein; `greedy_group_resolution` adds razor-style resolution | Not parsimony by default: subsumable and shared-only proteins stay as groups unless `greedy_group_resolution='true'` |\n| ProteinProphet | Nesvizhskii 2003 | EM APPORTIONS shared peptides across candidate proteins, weighted by other evidence | TPP \u002F FragPipe pipelines; the classic probabilistic standard |\n| EPIFANY | Pfeuffer 2020 | Bayesian network over the peptide-protein graph, loopy belief propagation + convolution trees | When you want calibrated posteriors rather than a parsimony set. It is NOT automatically better calibrated at the group level: on the reference idXML it passed 583 groups at 1% picked FDR with 3.43% true FDP, against 556 and 0.36% for Basic + `greedy_group_resolution` |\n| Fido | Serang 2010 | Bayesian generative model; was Percolator's `--protein` \u002F `-A` option | GONE from the Percolator CLI -- absent from 3.09.0 `--help`, and `--protein` exits 1 with `ERROR: the option --protein is invalid.` Only \"Not available for Fido\" remarks on `--protein-report-fragments`\u002F`-duplicates` survive. Do not script it |\n| Percolator picked-protein (`-f` \u002F `--picked-protein \u003Cfasta>`) | Savitski 2015 | In-silico digest of the FASTA -> protein grouping -> fragment\u002Fduplicate elimination -> picking, on the `.pin` Percolator already read | The way Percolator 3.09 does protein inference, and it IS the picked method recommended here -- no extra tool needed after Percolator |\n| Razor peptide | -- | Shared peptide assigned winner-take-all to the group with most evidence (MaxQuant) | MaxQuant default; ID-fine but distorts QUANT (route to quantification) |\n| Picked-protein FDR | Savitski 2015 | Pair target with its decoy, keep the higher-scoring of the pair, then count decoys | Protein-level FDR on any non-trivial dataset |\n| Picked-group FDR | The 2022 | Picking applied at the protein-GROUP level | When the inference unit is the group (the correct unit on deep data) |\n| All-proteins \u002F inclusive | -- | Report every protein any peptide could come from | Almost never; massive false-positive protein inflation |\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended | Why |\n|----------|-------------|-----|\n| Standard DDA run, OpenMS-based pipeline | `BasicProteinInferenceAlgorithm` with `greedy_group_resolution='true'` + picked-group FDR; `BayesianProteinInferenceAlgorithm` (EPIFANY) when you want calibrated posteriors | Both are group-FDR aware, but resolution is what controls FDP: on the same idXML, Basic+greedy gave 0.36% true FDP and 0 subsumable groups passing, EPIFANY called with `greedy_group_resolution=False` gave 3.43% and 3 |\n| Already running Percolator after the search | `percolator -f target_decoy.fasta -P DECOY_ -l prot.target.tsv -L prot.decoy.tsv ... search.pin` | Percolator's own picked-protein route; adds no tool and computes the method recommended below |\n| MaxQuant output (`proteinGroups.txt`) | Parse groups as-is; drop `Reverse` (`+`, accessions `REV__`), `Potential contaminant` and `Only identified by site` rows; quantify on UNIQUE peptides | Groups already inferred; `Protein IDs` = all members, `Majority protein IDs` = members with at least half the group's peptides, first = leading; `Unique peptides` = unique to the GROUP, not to one protein |\n| FragPipe \u002F TPP pipeline | `philosopher peptideprophet` -> `proteinprophet` -> `filter --picked --razor` -> `report` (commands below), then COUNT THE ROWS in `protein.tsv` | Native EM apportionment + 2-level FDR; `filter` exits 0 and prints `Converged to 0.00 % FDR` when it read nothing, so the row count is the only real result |\n| Deep dataset (many thousands of proteins) | Picked-GROUP FDR on resolved groups | No protein-level FDR leaves a 7-30% false protein list (measure it; the figure depends on depth and the PSM threshold); the non-picked count over-estimates FDR and loses proteins |\n| Sensitive differential abundance downstream | Quantify on unique peptides only -> quantification | Razor assignment can flip between conditions and fake DE |\n| Want isoform-level answers | Stop -- route to top-down \u002F proteoform methods | Bottom-up groups cannot resolve proteoforms |\n| Few PSMs (single-protein pulldown) | Report evidence, do not trust a \"0% protein FDR\" | Target-decoy FDR is meaningless at tiny counts |\n\nDefault when uncertain: run `BasicProteinInferenceAlgorithm` with `annotate_indistinguishable_groups` and `greedy_group_resolution` on, report protein GROUPS with a leading accession, and control protein-GROUP FDR with picked-group FDR at 1%. Do NOT impose a two-peptide rule.\n\n**Input contract:** protein FDR needs decoys, so the upstream PSM\u002Fpeptide filter must KEEP the decoy hits that pass it. Know the score orientation: PEP is lower-better, posterior probability and the group probability written by these algorithms are higher-better.\n\n**Output contract (CLI):** judge every command-line inference\u002FFDR step by the file it was supposed to write, NEVER by its exit status. A protein-FDR tool that read zero PSMs reports the emptiest possible result as a triumph -- `philosopher filter` exits 0 and prints `Converged to 0.00 % FDR with 0 PSMs` and `Final report ... proteins=0`, and `philosopher peptideprophet` exits 0 after writing an `interact-*.pep.xml` with every `spectrum_query` copied through and zero `peptideprophet_result` elements (both reproduced on Philosopher 5.1.0 with real Comet pepXML). After each step assert non-empty: `protein.tsv` has more than its header line, the `prot.xml` exists, the peptide count Percolator prints is greater than zero. A \"0.00 % FDR\" or a \"0% protein FDR\" is a failed run until a row count says otherwise.\n\n### Group Proteins with pyOpenMS (aggregation + greedy resolution)\n\n**Goal:** Turn an FDR-filtered peptide identification list into protein groups with a leading protein, resolving shared-peptide ambiguity.\n\n**Approach:** Load the idXML from peptide identification, run `BasicProteinInferenceAlgorithm` (score aggregation per protein) with indistinguishable-group annotation AND greedy group resolution on -- without resolution, subsumable and shared-only proteins stay as their own groups -- then read the groups off the protein identification run and apply picked protein-group FDR with the built-in.\n\n```python\nfrom pyopenms import (IdXMLFile, BasicProteinInferenceAlgorithm, PeptideIdentificationList,\n                      FalseDiscoveryRate, String)\n\nprotein_ids = []\npeptide_ids = PeptideIdentificationList()   # pyOpenMS 3.5+: a plain [] fails\n# protein_ids is FIRST in both load() and store() for IdXMLFile\nIdXMLFile().load('peptides_1pct_fdr.idXML', protein_ids, peptide_ids)\n\ninference = BasicProteinInferenceAlgorithm()\nparams = inference.getParameters()\n# annotate_indistinguishable_groups reports indistinguishable proteins as ONE group\nparams.setValue('annotate_indistinguishable_groups', 'true')\n# greedy_group_resolution assigns shared peptides to the best group, so subsumable proteins drop out\nparams.setValue('greedy_group_resolution', 'true')\ninference.setParameters(params)\ninference.run(peptide_ids, protein_ids)\n\n# picked protein-group FDR: (decoy string, is prefix, groups too); group.probability becomes a q-value\nFalseDiscoveryRate().applyPickedProteinFDR(protein_ids[0], String('DECOY_'), True, True)\n\nfor group in protein_ids[0].getIndistinguishableProteins():\n    accs = [a.decode() for a in group.accessions]   # bytes; pyOpenMS sorts them alphabetically\n    if all(a.startswith('DECOY_') for a in accs) or group.probability > 0.01:\n        continue\n    # members share the same evidence; choose the lead explicitly: canonical (no -N isoform suffix) first\n    leading = sorted(accs, key=lambda a: ('-' in a, a))[0]\n    print(leading, group.probability, accs)\n```\n\n### Bayesian Inference + Group FDR with EPIFANY\n\n**Goal:** Assign calibrated protein\u002Fgroup posteriors and control protein-group FDR with a probability model rather than greedy parsimony.\n\n**Approach:** EPIFANY consumes idXML whose PSMs already carry posterior error probabilities (from Percolator or IDPosteriorErrorProbability), then propagates belief over the peptide-protein graph. The TOPP tool is `Epifany`; the pyOpenMS class is `BayesianProteinInferenceAlgorithm`.\n\n```python\nfrom pyopenms import IdXMLFile, BayesianProteinInferenceAlgorithm, PeptideIdentificationList\n\nprotein_ids = []\npeptide_ids = PeptideIdentificationList()\nIdXMLFile().load('peptides_with_pep.idXML', protein_ids, peptide_ids)\n\nalgo = BayesianProteinInferenceAlgorithm()\n# EPIFANY expects PSM posteriors as input. The third POSITIONAL argument is\n# greedy_group_resolution. Unlike BasicProteinInferenceAlgorithm's parameter of the same\n# name, flipping it here did not change the result on the reference idXML (583 groups at 1%\n# picked FDR, 3.43% true FDP with either value) -- so do NOT assume it removed subsumable\n# proteins. Check the surviving groups, or use Basic + greedy when FDP is what you care about.\nalgo.inferPosteriorProbabilities(protein_ids, peptide_ids, False)\n\nfor group in protein_ids[0].getIndistinguishableProteins():\n    print([a.decode() for a in group.accessions], group.probability)   # higher = more likely present\n```\n\n### Picked Protein-Group FDR\n\n**Goal:** Estimate protein-group FDR without the inflation that the reused PSM formula causes on large data.\n\n**Approach:** For each target group, find its decoy counterpart (same accessions with the decoy prefix); keep only the higher-scoring member of each target\u002Fdecoy PAIR; rank the picked set and count decoys as the FDR estimate. For idXML, prefer the built-in `FalseDiscoveryRate().applyPickedProteinFDR(prot_id, String(prefix), True, True)` shown above; for group-level work on large data, the kusterlab `picked_group_fdr` package implements The 2022. The sketch below pairs by the exact accession set, so decoy groups whose membership differs from their target's stay unpaired and are counted unpicked. The decoy prefix is tool-specific (`DECOY_` OpenMS, `rev_` FragPipe\u002FPhilosopher's `--tag` default, `REV__` MaxQuant) and must be passed explicitly. A wrong prefix does not pass silently in either implementation: `applyPickedProteinFDR` raises `IndexError: invalid unordered_map\u003CK, T> key`, and the sketch below raises `ValueError: no decoy groups with prefix ...`. Treat both as \"the prefix is wrong\", not as a corrupt input file.\n\n```python\ndef picked_group_fdr(groups, decoy_prefix, min_decoys=10):\n    # groups: list of dicts with 'accessions' (str), 'score' (higher = better), 'is_decoy'\n    n_decoy = sum(g['is_decoy'] for g in groups)\n    if n_decoy == 0 or not any(a.startswith(decoy_prefix) for g in groups for a in g['accessions']):\n        raise ValueError(f'no decoy groups with prefix {decoy_prefix!r}; keep decoys upstream or fix the prefix')\n    if n_decoy \u003C min_decoys:\n        print(f'WARNING: only {n_decoy} decoy groups; the protein FDR estimate is not meaningful')\n    by_base = {}\n    for g in groups:\n        base = frozenset(a.replace(decoy_prefix, '') for a in g['accessions'])\n        # keep only the higher-scoring of the target\u002Fdecoy pair (the 'pick')\n        if base not in by_base or g['score'] > by_base[base]['score']:\n            by_base[base] = g\n    picked = sorted(by_base.values(), key=lambda g: g['score'], reverse=True)\n\n    targets = decoys = 0\n    for g in picked:\n        if g['is_decoy']:\n            decoys += 1\n        else:\n            targets += 1\n        g['fdr'] = decoys \u002F targets if targets else 1.0\n    running_min = 1.0\n    for g in reversed(picked):  # monotone q-values from the bottom up\n        running_min = min(running_min, g['fdr'])\n        g['qvalue'] = running_min\n    return [g for g in picked if not g['is_decoy'] and g['qvalue'] \u003C= 0.01]\n```\n\n### Protein Groups from the CLI: Percolator and Philosopher\n\n**Goal:** Get groups and protein-level FDR out of a search you are already post-processing on the command line, and recognise a failed run instead of reporting its \"0.00 % FDR\".\n\n**Approach:** Percolator does picked-protein inference itself from the `.pin` -- `-f\u002F--picked-protein` takes the TARGET+DECOY FASTA, in-silico-digests it to build protein groups, eliminates fragment (subsumable) and duplicate proteins, then picks. The FragPipe\u002FTPP route chains PeptideProphet -> ProteinProphet -> `philosopher filter`. Every step below is checked on the file it wrote (see the Output contract above).\n\n```bash\n# --- Percolator 3.09.0: picked-protein FDR, no extra tool after Percolator ---\n# Fido (the old `--protein` \u002F `-A`) is GONE in 3.09.0; `-f` is the only protein route.\n# -P is the decoy prefix in the FASTA; -z must match the search enzyme (default trypsin).\npercolator -f target_decoy.fasta -P DECOY_ -z trypsin \\\n           -l prot.target.tsv -L prot.decoy.tsv \\\n           -r pep.target.tsv  -B pep.decoy.tsv \\\n           -m psm.target.tsv  -M psm.decoy.tsv -S 1 search.pin\n# OUTPUT CHECK. prot.target.tsv columns: ProteinId, ProteinGroupId, q-value,\n# posterior_error_prob, peptideIds -- one row per group representative, already picked.\nawk -F'\\t' 'NR>1 && $3\u003C=0.01' prot.target.tsv | wc -l    # groups at 1% protein-group FDR\n\n# --- Philosopher 5.1.0: the FragPipe \u002F TPP route ---\nphilosopher workspace --init                              # once per output folder\nphilosopher database --annotate target_decoy.fasta --prefix DECOY_\nphilosopher peptideprophet --database target_decoy.fasta --ppm --accmass \\\n                           --nonparam --decoy DECOY_ --decoyprobs search.pep.xml\n# OUTPUT CHECK: peptideprophet exits 0 even when it modelled nothing, copying every\n# spectrum_query through with no probability attached. Count the results, not the exit code.\ngrep -c peptideprophet_result interact-search.pep.xml || { echo 'PeptideProphet modelled 0 PSMs'; exit 1; }\nphilosopher proteinprophet --maxppmdiff 2000000 interact-search.pep.xml\ntest -s interact.prot.xml || { echo 'ProteinProphet wrote no prot.xml'; exit 1; }\n# --tag defaults to 'rev_', NOT the OpenMS\u002FComet 'DECOY_'; --razor is silently ignored\n# unless --protxml supplies inference data.\nphilosopher filter --psm 0.01 --pep 0.01 --prot 0.01 --tag DECOY_ --picked --razor \\\n                   --pepxml interact-search.pep.xml --protxml interact.prot.xml\nphilosopher report\n# OUTPUT CHECK: `filter` exits 0 and prints \"Converged to 0.00 % FDR with 0 PSMs\" on an\n# empty read, and writes header-only tables or none at all.\n[ -s protein.tsv ] && [ \"$(wc -l \u003C protein.tsv)\" -gt 1 ] || { echo 'filter converged on an EMPTY result'; exit 1; }\n```\n\n## Per-Method Failure Modes\n\n### Naive (non-picked) protein\u002Fgroup FDR\n**Trigger:** (a) No protein-level FDR at all (\"1% PSM FDR is enough\"); (b) the classic protein-level `decoys\u002Ftargets` count without picking on a deep dataset; (c) picked FDR on unresolved groups.\n**Mechanism:** (a) false PSMs nucleate one-hit-wonder false proteins that no protein-level estimate catches; (b) decoy proteins keep accumulating random hits while true targets saturate, so decoys are over-counted; (c) subsumable and shared-only proteins count as extra target groups.\n**Symptom:** (a) protein list 7-30% false depending on depth and PSM threshold (7.0% observed on the 113k-PSM synthetic benchmark at 1% PSM FDR); (b) FDR over-estimated, real proteins lost (conservative, not anticonservative); (c) nominal 1% with several-fold higher true FDP.\n**Fix:** Picked-protein FDR (Savitski 2015) or picked-group FDR (The 2022) on resolved groups; validate with a two-species or entrapment search.\n\n### Two-peptide rule\n**Trigger:** Filtering to proteins with >=2 (unique) peptides \"for confidence\".\n**Mechanism:** The rule deletes real low-abundance single-peptide proteins; its FDR effect depends on the PSM threshold (Gupta & Pevzner found it raised FDR; after a strict 1% PSM filter it can lower it while still deleting hundreds of true proteins).\n**Symptom:** Fewer proteins than picked FDR at the same nominal cutoff, with no calibrated error rate.\n**Fix:** Drop the rule; control picked protein-level FDR and score single-peptide IDs individually.\n\n### Razor-peptide quantification\n**Trigger:** Quantifying on MaxQuant's default unique+razor peptides for a sensitive comparison.\n**Mechanism:** A shared peptide's full intensity is credited to one group; that razor assignment can flip between conditions when peptide counts shift, so a protein's quantity changes for inference reasons, not biology.\n**Symptom:** Spurious differential abundance concentrated on proteins sharing peptides with paralogs.\n**Fix:** Quantify on unique peptides only for sensitive comparisons -> quantification.\n\n### Parsimony tie-breaking\n**Trigger:** Multiple minimal protein sets explain the peptides equally well.\n**Mechanism:** Greedy parsimony breaks ties arbitrarily; minimality is a heuristic, not truth, and a real protein with only shared peptides is silently dropped.\n**Symptom:** Reported lead protein differs run-to-run or pipeline-to-pipeline on the same data.\n**Fix:** Prefer a probabilistic method (EPIFANY\u002FProteinProphet) that apportions shared evidence; retain group membership.\n\n### Proteoform overreach\n**Trigger:** Reporting \"isoform X is present\" from a group whose evidence is shared peptides.\n**Mechanism:** Splice isoforms, variants, and PTM forms collapse into groups in bottom-up data; the group cannot separate them.\n**Symptom:** Isoform-specific claim with no isoform-unique peptide behind it.\n**Fix:** Require an isoform-unique peptide for any isoform claim, or use top-down \u002F proteoform methods.\n\n## Quantitative Thresholds\n\n| Threshold | Source | Rationale |\n|-----------|--------|-----------|\n| Protein \u002F protein-group FDR 1% (sometimes 5% for discovery) | community standard | SEPARATE estimation from PSM FDR; never assume 1% PSM implies 1% protein |\n| Picked FDR (target\u002Fdecoy pairing) | Savitski 2015; The 2022 | Removes target\u002Fdecoy asymmetry; dataset-size-independent, unlike naive decoy\u002Ftarget |\n| Decoy:target ratio 1:1 | community standard | Standard null; unequal ratios require formula correction |\n| Min PSMs for trustworthy protein FDR | hundreds+ | Below ~100s of items decoy counts are too noisy; \"0% FDR\" from zero decoys is luck, not control |\n| Two-peptide rule | DO NOT USE (Gupta & Pevzner 2009) | Drops real proteins; FDR effect depends on the PSM threshold; replaced by picked FDR + per-ID score |\n| Single-peptide IDs | judge by score, not count | A high-confidence unique peptide can be a legitimate ID |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Protein FDR much higher than nominal on deep data | No protein-level estimate, or groups not resolved (Basic without `greedy_group_resolution`) | Resolve groups, then picked-protein or picked-group FDR |\n| Real low-abundance proteins missing | Two-peptide rule applied, or non-picked protein FDR (conservative) | Remove the rule; control picked FDR |\n| `AttributeError: module 'pyopenms' has no attribute 'EpifanyAlgorithm'` | The pyOpenMS class is named differently; the R `ProteinInference::infer_proteins` could not be confirmed to exist | Use `pyopenms.BayesianProteinInferenceAlgorithm`; use pyOpenMS, not an unverified R package |\n| `Exception: can not handle type of (..., [], [])` on `IdXMLFile().load` | pyOpenMS 3.5+ needs a `PeptideIdentificationList` | `peptide_ids = PeptideIdentificationList()` |\n| `TypeError: a bytes-like object is required, not 'str'` on group accessions | `ProteinGroup.accessions` are bytes | `[a.decode() for a in group.accessions]` |\n| `IndexError: invalid unordered_map\u003CK, T> key` from `applyPickedProteinFDR` (or `ValueError: no decoy groups with prefix ...` from the sketch) | The decoy prefix does not match the one in the file | Pass the tool's prefix: `DECOY_` OpenMS, `rev_` Philosopher\u002FFragPipe, `REV__` MaxQuant. The error means \"wrong prefix\", not \"corrupt input\" |\n| `ERROR: the option --protein is invalid.` (exit 1) from Percolator | Fido's `--protein`\u002F`-A` was removed; it is not in 3.09.0 `--help` | `percolator -f target_decoy.fasta -P \u003Cdecoy prefix> -l prot.target.tsv ...` (`--picked-protein`) |\n| `philosopher filter` exits 0, logs `Converged to 0.00 % FDR with 0 PSMs` and `proteins=0`, writes header-only or no tables | It read zero PSMs from the pepXML; the exit status reports the empty result as success | Never trust the exit code -- assert `protein.tsv` has more than a header line. Then fix the input: check `Database search results ions=\u002Fpeptides=\u002Fpsms=` in the log, that `--tag` matches the FASTA prefix (default is `rev_`), and that `philosopher database --annotate` ran first |\n| `philosopher peptideprophet` exits 0 but `proteinprophet` then says `did not find any PeptideProphet results` | PeptideProphet modelled nothing and still wrote an `interact-*.pep.xml` full of `spectrum_query` elements with no probabilities | `grep -c peptideprophet_result interact-*.pep.xml` immediately after the step; 0 means the run failed |\n| Indistinguishable proteins reported as separate IDs | Flat protein list instead of groups | Enable `annotate_indistinguishable_groups`; report groups with a leading protein |\n| Spurious DE on paralog-sharing proteins | Razor-peptide quant flipped between conditions | Quantify on unique peptides -> quantification |\n| \"Unique\" peptide count changed when DB changed | Uniqueness is database-relative | Fix and document the database (isoforms, contaminants, decoys) |\n\n## References\n\n- Nesvizhskii, A.I., Keller, A., Kolker, E. & Aebersold, R. (2003). A statistical model for identifying proteins by tandem mass spectrometry. *Analytical Chemistry* 75(17):4646-4658.\n- Gupta, N. & Pevzner, P.A. (2009). False discovery rates of protein identifications: a strike against the two-peptide rule. *Journal of Proteome Research* 8(9):4173-4181.\n- Serang, O., MacCoss, M.J. & Noble, W.S. (2010). Efficient marginalization to compute protein posterior probabilities from shotgun mass spectrometry data. *Journal of Proteome Research* 9(10):5346-5357. (Fido; its Percolator front-end no longer exists as of 3.09.0.)\n- Savitski, M.M., Wilhelm, M., Hahne, H., Kuster, B. & Bantscheff, M. (2015). A scalable approach for protein false discovery rate estimation in large proteomic data sets. *Molecular & Cellular Proteomics* 14(9):2394-2404.\n- The, M., Tasnim, A. & Kall, L. (2016). How to talk about protein-level false discovery rates in shotgun proteomics. *Proteomics* 16(18):2461-2469.\n- The, M., Samaras, P., Kuster, B. & Wilhelm, M. (2022). Reanalysis of ProteomicsDB using an accurate, sensitive, and scalable false discovery rate estimation approach for protein groups. *Molecular & Cellular Proteomics* 21(12):100437.\n- Pfeuffer, J., Sachsenberg, T., Dijkstra, T.M.H., Serang, O., Reinert, K. & Kohlbacher, O. (2020). EPIFANY: a method for efficient high-confidence protein inference. *Journal of Proteome Research* 19(3):1060-1072.\n\n## Related Skills\n\n- peptide-identification - Produces the FDR-filtered peptide list that feeds inference and shares the target-decoy machinery\n- quantification - Consumes inferred groups; razor-vs-unique peptide choice lives here\n- data-import - Loads idXML\u002FmzML identification files\n- database-access\u002Funiprot-access - Canonical-vs-isoform databases drive uniqueness and the leading-protein convention\n",{"name":5,"tool_type":24,"description":7,"primary_tool":25},"mixed","pyOpenMS","main","e0956dc9606356ab78468936b502e55a365282e2","specialists\u002Fmass-spec-proteomics-analyst\u002Fversions\u002F1.0.1\u002Fpackage\u002Fskills\u002Fbio-proteomics-protein-inference",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-proteomics-protein-inference",{"tool":39,"command":40},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-proteomics-protein-inference",{"tool":42,"command":43},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-proteomics-protein-inference","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmass-spec-proteomics-analyst\u002Fversions\u002F1.0.1\u002Fpackage\u002Fskills\u002Fbio-proteomics-protein-inference\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"examples\u002Fprotein_groups.py","SCRIPT","脚本",6153,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmass-spec-proteomics-analyst\u002Fversions\u002F1.0.1\u002Fpackage\u002Fskills\u002Fbio-proteomics-protein-inference\u002Fexamples\u002Fprotein_groups.py",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"usage-guide.md","REFERENCE","参考文档",4728,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmass-spec-proteomics-analyst\u002Fversions\u002F1.0.1\u002Fpackage\u002Fskills\u002Fbio-proteomics-protein-inference\u002Fusage-guide.md",[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]