[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EF2QRZY7FB0J2FBZS5TH2J":3,"skill-same:01M7EF2QRZY7FB0J2FBZS5TH2J":62},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EF2QRZY7FB0J2FBZS5TH2J","bio-proteomics-ptm-analysis",null,"Frames PTM\u002Fphosphoproteomics analysis as three stacked inference layers on a biased enrichment - chemistry selection, site localization (FLR), and protein-level-adjusted quantification with MSstatsPTM - plus kinase-activity and functional triage. Covers MaxQuant Phospho (STY)Sites multiplicity expansion, localization-probability filtering (class I, Ascore, ptmRS, DIA EG.PTMLocalizationProbabilities, DIA-NN PTM.Site.Confidence), false localization rate (LuciPHOr\u002FDeepFLR), motif analysis with experiment-matched backgrounds, diGly\u002FK-GG ubiquitin specificity, acetyl\u002Fglyco traps, and KSEA\u002FPTM-SEA. Use when localizing and quantifying phosphorylation, acetylation, ubiquitination, or glycosylation sites from enrichment-based runs and deciding whether an apparent site change is real after subtracting protein abundance. Peptide ID and open\u002Fvariable-mod search is peptide-identification; underlying protein-level quant is quantification and differential-abundance; DIA acquisition mechanics is dia-analysis.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-proteomics-ptm-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-proteomics-ptm-analysis\ndescription: Frames PTM\u002Fphosphoproteomics analysis as three stacked inference layers on a biased enrichment - chemistry selection, site localization (FLR), and protein-level-adjusted quantification with MSstatsPTM - plus kinase-activity and functional triage. Covers MaxQuant Phospho (STY)Sites multiplicity expansion, localization-probability filtering (class I, Ascore, ptmRS, DIA EG.PTMLocalizationProbabilities, DIA-NN PTM.Site.Confidence), false localization rate (LuciPHOr\u002FDeepFLR), motif analysis with experiment-matched backgrounds, diGly\u002FK-GG ubiquitin specificity, acetyl\u002Fglyco traps, and KSEA\u002FPTM-SEA. Use when localizing and quantifying phosphorylation, acetylation, ubiquitination, or glycosylation sites from enrichment-based runs and deciding whether an apparent site change is real after subtracting protein abundance. Peptide ID and open\u002Fvariable-mod search is peptide-identification; underlying protein-level quant is quantification and differential-abundance; DIA acquisition mechanics is dia-analysis.\ntool_type: mixed\nprimary_tool: MSstatsPTM\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"proteomics\u002Fptm-analysis\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: MSstatsPTM 2.4+, pandas 2.2+, numpy 1.26+, scipy 1.12+\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\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\n# PTM and Phosphoproteomics Analysis -- Three Inference Layers Stacked on a Biased Extraction\n\n**\"Find the regulated phosphosites in my enriched samples\"** -> Localize each modification, then test whether its abundance change survives subtracting the protein-level change -- because a PTM result is three separate inferences (enrichment, localization, quantification) and each fails silently if the layer below is treated as solved.\n- R: `MSstatsPTM::groupComparisonPTM()` for protein-adjusted site testing (the load-bearing tool)\n- Python: `pandas` to expand MaxQuant `Phospho (STY)Sites` multiplicity and filter localization probability\n- R: `KSEAapp` \u002F PTM-SEA (`ssGSEA2.0`) for kinase-activity inference from the site fold-changes\n\nScope: this skill OWNS enrichment-chemistry framing, site localization and FLR, multiplicity-resolved site quant, protein-level adjustment, motif analysis, and kinase-activity inference. Peptide identification and open\u002Fvariable-mod search route to peptide-identification; the underlying protein-level (unenriched) quant routes to quantification and differential-abundance; DIA acquisition mechanics route to dia-analysis. OUT OF SCOPE: intact-glycopeptide glycan-composition search (pGlyco3\u002FMSFragger-Glyco) and absolute occupancy from three-ratio SILAC are noted but not implemented here.\n\n## The Single Most Important Modern Insight -- A PTM Result Is Three Inferences, Not One\n\n1. **Enrichment IS the experiment, and the chemistry is a filter confounded with biology.** The data only contain what the chemistry captured. TiO2 and Fe-IMAC give partially-overlapping phosphoproteomes; anti-K-GG enriches ubiquitin, NEDD8, and ISG15 indistinguishably; a lectin reports only its cognate glycoforms. A between-method or between-lab \"biological difference\" must FIRST be excluded as a chemistry artifact before it is called biology.\n2. **Identifying a peptide is NOT localizing the modification.** A phosphopeptide with two S\u002FT and one phosphate has isobaric positional isomers of identical precursor mass and identical peptide-level score; the localization is a SECOND inference decided only by site-determining fragment ions, with its own error rate (false localization rate, FLR). Target-decoy peptide FDR cannot estimate FLR: a wrong localization is the correct sequence with the mod one residue over, not a decoy sequence (Fermin 2013). A 1% peptide FDR does NOT yield a 1% site FDR -- report them separately.\n3. **A change in phosphopeptide abundance is NOT a change in phosphorylation (the biggest quant trap).** Observed PTM signal ~ (site occupancy) x (protein abundance) x (enrichment\u002Fionization factor), so `log2FC(PTM_observed) = log2FC(occupancy) + log2FC(protein)`. Without a paired global (unenriched) proteome run on the SAME samples to subtract `log2FC(protein)`, every protein-abundance change masquerades as a regulated site. Because co-regulated proteins move together, the false positives are pathway-coherent and look biologically convincing -- the worst kind of artifact. This is the entire reason MSstatsPTM exists (Kohler 2023).\n4. **Most identified sites have no known function.** Fewer than ~5% of phosphosites are functionally annotated; a fold-change alone says nothing about regulatory relevance. Functional triage (conservation, stoichiometry, Ochoa functional score, confident kinase assignment) is a separate fourth layer on top of the quant (Ochoa 2020).\n\nBottom line: report THREE numbers, not one -- peptide\u002FPSM FDR, per-site localization probability with its threshold, and an empirically estimated global FLR -- and never call a site \"regulated\" from a phospho-only run without protein-level adjustment.\n\n## Tool Taxonomy\n\n### Enrichment chemistry (phospho)\n\n| Method | Citation | Mechanism \u002F bias | When |\n|---|---|---|---|\n| TiO2 (MOAC) | Larsen 2005 | Metal-oxide Lewis-acid surface; skews mono-phospho; needs hydroxy-acid additive | General single-method depth; EasyPhos basis |\n| Fe(III)-IMAC | Ruprecht 2015 | Chelated Fe3+ coordinates phosphate; multidentate avidity skews MULTI-phospho | Hierarchical\u002Fprocessive signaling; the mono\u002Fmulti divergence is STRONGEST here vs TiO2 |\n| Ti4+\u002FZr4+-IMAC | Matheron 2014 | Chelated metal ION on immobilized phosphonate (NOT bulk oxide); bias vs TiO2 is SMALL | Modern automated workflows; metal identity matters more than IMAC-vs-MOAC |\n| SIMAC (sequential) | Thingholm 2008 | IMAC acidic elution = mono, basic = multi, then TiO2 on mono fraction | Recovering both populations IMAC alone biases |\n\nNaming trap: Ti4+\u002FZr4+-IMAC (chelated ions) is DIFFERENT chemistry from TiO2\u002FZrO2 (bulk oxide). Glycolic acid is the modern additive standard (load 80% ACN \u002F 5% TFA \u002F 0.1 M glycolic acid).\n\n### Other-PTM enrichment and identity traps\n\n| PTM | Reagent \u002F mass | Citation | Headline trap |\n|---|---|---|---|\n| Ubiquitin (diGly, K-GG, +114.0429) | Anti-K-GG antibody | Xu 2010; Kim 2011 | NOT ubiquitin-specific: K-GG = ubiquitin + NEDD8 (~6% at basal) + ISG15 (rises under interferon). UbiSite (Akimov 2018) is the ubiquitin-specific alternative |\n| Ubiquitin alkylation artifact | use chloroacetamide | Nielsen 2008 | Iodoacetamide creates a +114.0429 lysine adduct mimicking ubiquitination; chloroacetamide does not |\n| Acetyl-K (+42.0106) | Anti-acetyllysine cocktail | Svinkina 2015 | Isobaric with trimethyl +42.0470 (0.0364 Da, needs high-res); acetyl blocks trypsin -> allow >=4 missed cleavages |\n| Glyco N-linked | PNGase F (released) or intact | Riley 2021 | Released loses the glycan; N->D tag +0.984 is isobaric with deamidation -- use PNGase F in H2-18O (+2.988) to disambiguate; N-X-S\u002FT (X!=Pro) sequon is necessary not sufficient |\n\n### Localization scoring\n\n| Tool | Citation | Mechanism | Note |\n|---|---|---|---|\n| Ascore | Beausoleil 2006 | Cumulative binomial of site-determining ions; DIFFERENCE between best and 2nd-best localization, peak-depth sweep | Ascore >=19 ~ p 0.01 PAIRWISE per-PSM, NOT a dataset FLR |\n| PhosphoRS \u002F ptmRS | Taus 2011 | Per-isomer cumulative binomial, tolerance-aware (correct for high-res), per-site probs sum to 100% | In Proteome Discoverer |\n| PTMProphet | Shteynberg (TPP) | EM\u002FBayesian mixture; per-site probs combinable across PSMs to a global FLR | TPP\u002FFragPipe |\n| MaxQuant Localization prob | Cox\u002FMann (Andromeda) | Normalized posterior on the site (fixed peak depth) | column `Localization prob`; >=0.75 = class I |\n| DIA localization | Bekker-Jensen 2020 | XIC peak-shape correlation substitutes for missing precursor isolation | Spectronaut `EG.PTMLocalizationProbabilities`; DIA-NN `PTM.Site.Confidence` |\n| DeepFLR | Zong 2023 | Deep-learning spectrum predictor + target-decoy FLR | SOTA direction; DDA + DIA |\n\n### Site-FDR \u002F FLR (the layer most pipelines skip)\n\n| Tool | Citation | Mechanism |\n|---|---|---|\n| LuciPHOr | Fermin 2013 (MCP) | Decoy localizations on non-modifiable residues; rate decoys win = empirical FLR |\n| LuciPHOr2 | Fermin 2015 (Bioinformatics) | Generic-PTM successor (do NOT swap the two journals) |\n| Decoy amino-acid FLR | Ramsbottom\u002FJones 2022 | Add a non-modifiable residue to the candidate set; global FLR ~ decoy-site-hits \u002F target-site-hits, frequency-corrected |\n\n### Kinase-activity inference\n\n| Tool | Citation | Mechanism | Limitation |\n|---|---|---|---|\n| KSEA | Casado 2013 | z-score of a kinase's substrate fold-changes | sqrt(m) favors well-annotated kinases; inherits PhosphoSitePlus bias |\n| PTM-SEA \u002F PTMsigDB | Krug 2019 | ssGSEA2.0 on site-level +\u002F-7 flanking-sequence signatures | robust to isoform drift; PERT signatures score \"looks like EGF stim\" |\n| RoKAI | Yilmaz 2021 | Network-smooth profiles before z-score so unobserved sites borrow neighbor signal | attacks missingness; feeds KSEA |\n\nBenchmark result (Mueller-Dott 2025): across ~19 methods, simple z-score (KSEA\u002FRoKAI) matched or beat sophisticated methods. Performance is PRIOR-limited, not algorithm-limited; all methods inherit PhosphoSitePlus curation bias toward CK2\u002FCDK1\u002FPKA\u002FMAPK, and the dark kinome is structurally invisible. Spend effort on the substrate prior, not the estimator.\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended | Why |\n|---|---|---|\n| Phospho-only run, want regulated sites | Acquire a PAIRED global proteome -> MSstatsPTM `groupComparisonPTM` -> require significance in `ADJUSTED.Model` | Unadjusted site changes are confounded with protein abundance |\n| No global proteome available | Report site changes as UNADJUSTED and flag the confound explicitly | Cannot separate occupancy from abundance; do not claim \"regulation\" |\n| Between-method phospho difference | Suspect chemistry (TiO2 vs Fe-IMAC mono\u002Fmulti bias) BEFORE biology | Enrichment is a confounded filter |\n| Multiply-phospho peptides present | Localize per-site (Ascore\u002FptmRS) AND report empirical global FLR | Peptide FDR != site FDR |\n| \"Ubiquitination\" sites | Confirm chloroacetamide alkylation; treat K-GG as ub + NEDD8 + ISG15; consider UbiSite | Iodoacetamide artifact + NEDD8\u002FISG15 confound |\n| Which kinases moved? | KSEA or PTM-SEA with a curated prior; do not over-interpret dark-kinome silence | Prior-limited; simple z-score suffices |\n| Motif logo from the hits | Background = experiment-matched S\u002FT\u002FY from the identified proteins (NOT whole proteome) | Whole-proteome background rediscovers disordered-region composition bias |\n\nDefault when uncertain: localize with the search engine's probability (class I >=0.75), expand MaxQuant multiplicity, run MSstatsPTM with a paired global proteome, and call only `ADJUSTED.Model` hits regulated.\n\n## Expand the MaxQuant Site Table Before Any Quant\n\n**Goal:** Produce a long, multiplicity-resolved, class-I-filtered phosphosite intensity matrix from `Phospho (STY)Sites.txt`.\n\n**Approach:** Each site row spreads its quant across `Intensity___1\u002F___2\u002F___3` (singly\u002Fdoubly\u002Ftriply-phospho forms, THREE underscores); the collapsed base `Intensity` mixes phospho-states and can fake dephosphorylation. Drop Reverse\u002Fcontaminant, filter `Localization prob`, then melt the per-multiplicity columns into rows.\n\n```python\nimport pandas as pd\nimport numpy as np\n\n# Filename has a SPACE in the modification name; accept either form.\nphospho = pd.read_csv('Phospho (STY)Sites.txt', sep='\\t', low_memory=False)\n\n# Newer MaxQuant uses 'Potential contaminant'; older uses 'Contaminant'.\ncontaminant_col = 'Potential contaminant' if 'Potential contaminant' in phospho.columns else 'Contaminant'\nphospho = phospho[(phospho['Reverse'] != '+') & (phospho[contaminant_col] != '+')]\n\nCLASS_I_PROB = 0.75  # Olsen 2006 class-I convention; comparability standard, not a calibrated FLR\nphospho = phospho[phospho['Localization prob'] >= CLASS_I_PROB].copy()\n\ngene = phospho['Gene names'].where(phospho['Gene names'].notna(), phospho['Protein'])\nphospho['site_id'] = gene.str.split(';').str[0] + '_' + phospho['Amino acid'] + phospho['Position'].astype(int).astype(str)\n\n# Multiplicity columns carry THREE underscores: collapsing them mixes phospho-states.\nmult_cols = [c for c in phospho.columns if '___' in c and c.split('___')[-1] in {'1', '2', '3'} and c.startswith('Intensity')]\nlong = phospho.melt(id_vars=['site_id', 'Amino acid', 'Position', 'Localization prob'], value_vars=mult_cols, var_name='run_multiplicity', value_name='intensity')\nlong['multiplicity'] = long['run_multiplicity'].str.split('___').str[-1]\nlong['run'] = long['run_multiplicity'].str.replace(r'___[123]$', '', regex=True).str.replace('Intensity ', '', regex=False)\nlong = long[long['intensity'] > 0]\nlong['log2_intensity'] = np.log2(long['intensity'])\n```\n\n## Protein-Level Adjustment with MSstatsPTM\n\n**Goal:** Decide whether each site change is real after subtracting the matched protein-abundance change.\n\n**Approach:** MSstatsPTM carries TWO datasets -- a PTM dataset (enriched) and a PROTEIN dataset (global\u002Funenriched). `groupComparisonPTM` fits independent linear models to each and returns a list of THREE: `PTM.Model` (unadjusted), `PROTEIN.Model`, and `ADJUSTED.Model`. The adjustment is `dFC_adj = dFC_PTM - dFC_protein` with `SE_adj = sqrt(SE_PTM^2 + SE_protein^2)`, so adjustment ADDS uncertainty -- a site can be significant unadjusted yet lose significance after adjustment. A confident regulation call requires significance in `ADJUSTED.Model`.\n\n```r\nlibrary(MSstatsPTM)\n\n# Converters are \u003CTool>toMSstatsPTMFormat and return a list with $PTM and $PROTEIN.\n# MaxQtoMSstatsPTMFormat reads the MaxQuant 'evidence.txt' (NOT the Phospho (STY)Sites\n# table -- the pandas multiplicity-expansion above is a SEPARATE workflow); the FASTA maps\n# peptides back to site coordinates. Supply BOTH the enriched evidence and the global\n# proteinGroups; without the protein dataset there is nothing to adjust against.\n# Arg-name note: the FASTA argument is `fasta_path` in current MSstatsPTM; older builds may\n# differ -- run `?MaxQtoMSstatsPTMFormat` to confirm before relying on it.\ninput \u003C- MaxQtoMSstatsPTMFormat(\n  evidence = read.table('evidence.txt', sep = '\\t', header = TRUE, quote = ''),\n  annotation = read.csv('annotation_ptm.csv'),\n  fasta_path = 'uniprot_human.fasta',\n  fasta_protein_name = 'uniprot_ac',\n  proteinGroups = read.table('proteinGroups.txt', sep = '\\t', header = TRUE, quote = ''),\n  annotation_protein = read.csv('annotation_protein.csv'),\n  mod_id = '\\\\(Phospho \\\\(STY\\\\)\\\\)',\n  which_proteinid_ptm = 'Proteins',\n  use_unmod_peptides = FALSE\n)\n\nsummarized \u003C- dataSummarizationPTM(input, use_log_file = FALSE)\n# LabelFree run: data.type = 'LF' (use 'TMT' for isobaric); contrast.matrix defaults to\n# full pairwise. groupComparisonPTM has NO `model` argument -- it always fits independent\n# PTM and PROTEIN models, then adjusts.\nresult \u003C- groupComparisonPTM(summarized, data.type = 'LF')\n\n# Three models; the adjusted one is the deliverable.\nadjusted \u003C- result$ADJUSTED.Model\nregulated \u003C- adjusted[!is.na(adjusted$adj.pvalue) & adjusted$adj.pvalue \u003C 0.05 & abs(adjusted$log2FC) > 1, ]\n\n# How much of each call was protein-driven: compare PTM.Model vs ADJUSTED.Model.\n```\n\n## Motif Analysis with the Correct Background\n\n**Goal:** Find kinase\u002Fwriter motifs around the modified residue without rediscovering amino-acid composition bias.\n\n**Approach:** Use the `Sequence window` (+\u002F-15 residues, 31-mer) MaxQuant already provides, centered on the site. The background MUST be an experiment-matched S\u002FT\u002FY set drawn from the identified proteins (or a central-residue-preserving shuffle), NOT the whole proteome or IUPAC-random -- those just report the composition of phospho-rich disordered regions. motif-x and MoMo p-values are only valid when the background is built this way.\n\n```python\nfrom collections import Counter\n\n# 'Sequence window' is a 31-mer (+\u002F-15) centered on the modified residue.\nWINDOW_HALF = 7  # +\u002F-7 flanking is the standard kinase-motif window\nforeground = [w[15 - WINDOW_HALF: 16 + WINDOW_HALF] for w in confident['Sequence window'].dropna() if len(w) >= 31]\n\n# Background: same-residue windows from the matched dataset, NOT the whole proteome.\ndef position_frequencies(windows):\n    counts = {i: Counter() for i in range(-WINDOW_HALF, WINDOW_HALF + 1)}\n    for w in windows:\n        for offset, aa in zip(range(-WINDOW_HALF, WINDOW_HALF + 1), w):\n            if aa not in '_X':\n                counts[offset][aa] += 1\n    return counts\n```\n\nFor a publication-grade enrichment logo, hand the foreground and a matched background to a dedicated tool (motif-x \u002F MoMo) and render with data-visualization\u002Fsequence-logos.\n\n## A Note on Home-Grown Ascore\n\nThe function below is an ILLUSTRATIVE approximation, NOT real Ascore. Real Ascore (Beausoleil 2006) competes the best localization against the second-best, sweeps peak depth 1-10 per 100 Th, and restricts to site-determining ions -- none of which this captures. Use the search engine's own localization probability (MaxQuant `Localization prob`, ptmRS, PTMProphet) for real work, or pyOpenMS `AScore` (introspect the exact API before relying on it). The home-grown form is here only to show the binomial intuition.\n\n```python\nimport numpy as np\nfrom scipy.stats import binom\n\ndef illustrative_localization_score(matched_site_ions, total_ions, depth_p=0.04):\n    '''Binomial intuition only; NOT Ascore (no best-vs-second competition or depth sweep).'''\n    if total_ions == 0 or matched_site_ions == 0:\n        return 0.0\n    p_random = 1 - binom.cdf(matched_site_ions - 1, total_ions, depth_p)\n    return -10 * np.log10(p_random) if p_random > 0 else 100.0\n```\n\n## Per-Method Failure Modes\n\n### Skipping protein-level adjustment\n**Trigger:** Differential testing on a phospho-only run with no paired global proteome. **Mechanism:** `log2FC(PTM_observed) = log2FC(occupancy) + log2FC(protein)`; the two terms are inseparable. **Symptom:** Pathway-coherent \"regulated sites\" that are pure protein-abundance changes (cyclins\u002Fhistones in cell cycle, stabilized substrates under drug). **Fix:** Run a matched global proteome and adjust via MSstatsPTM; route the protein-level quant to quantification.\n\n### Collapsing the MaxQuant multiplicity\n**Trigger:** Quantifying on base `Intensity` instead of `Intensity___1\u002F___2\u002F___3`. **Mechanism:** The collapsed column mixes singly\u002Fdoubly\u002Ftriply-phospho forms of the same site. **Symptom:** The singly-phospho form dropping as a neighbor gets phosphorylated reads as dephosphorylation. **Fix:** Expand multiplicity to long form (Perseus \"Expand site table\" or the melt above) before any stats.\n\n### Treating identification as localization\n**Trigger:** Reporting sites at peptide FDR without a localization threshold. **Mechanism:** Isobaric positional isomers share precursor mass and peptide score; CID\u002Fion-trap neutral loss (-98 Da) starves site-determining ions. **Symptom:** A 1% peptide FDR result with a much higher true site error. **Fix:** Filter localization probability (class I >=0.75), report an empirical global FLR (LuciPHOr\u002FDeepFLR), prefer HCD\u002FEThcD.\n\n### diGly read as ubiquitin\n**Trigger:** Calling the K-GG proteome \"ubiquitination\". **Mechanism:** NEDD8 and ISG15 share the LRLRGG C-terminus and leave the identical +114.0429 remnant; iodoacetamide adds a fourth source. **Symptom:** Inflated\u002Ffalse ubiquitin sites, worst under interferon (ISG15) or with iodoacetamide. **Fix:** Chloroacetamide alkylation; treat K-GG as ub+NEDD8+ISG15; use UbiSite for ubiquitin-specific mapping.\n\n### Motif logo against the wrong background\n**Trigger:** Whole-proteome or IUPAC-random background. **Mechanism:** Phosphosites sit in disordered, Ser\u002FPro\u002Facidic-rich regions; that composition dominates the enrichment. **Symptom:** \"Enriched\" proline\u002Fserine motifs that are region bias, not kinase preference. **Fix:** Experiment-matched S\u002FT\u002FY background or central-residue-preserving shuffle (MoMo default).\n\n### Over-reading kinase-activity output\n**Trigger:** Naming the top KSEA\u002Fatlas kinase as the responsible enzyme. **Mechanism:** Substrate priors are PhosphoSitePlus-curated (CK2\u002FCDK1\u002FPKA\u002FMAPK heavy); atlas hits are biochemical preference ignoring expression\u002Flocalization\u002Ftiming. **Symptom:** Always-the-usual-suspects kinase lists; dark-kinome activity invisible. **Fix:** Use a curated prior, report z-scores with their substrate counts, do not infer absence from silence.\n\n## Quantitative Thresholds\n\n| Threshold | Source | Rationale |\n|---|---|---|\n| Localization prob class I >= 0.75 | Olsen 2006 | Best site holds >3x the posterior of all alternatives (single-phospho); a comparability standard, not a calibrated error rate |\n| Class II 0.5-0.75; class III 0.25-0.5 | Olsen 2006 | Partial \u002F poor localization |\n| Ascore >= 19 (p~0.01); loose >13 | Beausoleil 2006 | Pairwise per-PSM best-vs-next confidence; NOT a dataset FLR |\n| DIA directDIA localization >= 0.99 | Bekker-Jensen 2020 | Stricter than library-based (0.75) to match DDA error rates |\n| DIA-NN site matrix 0.90 \u002F 0.99 | DIA-NN docs | phosphosites_90\u002F99.tsv; class-I-equivalent stringency is HIGHER than MaxQuant 0.75 |\n| Acetyl missed cleavages >= 4 | -- | Acetyl-K blocks trypsin; pair LysC + trypsin |\n| Kinase atlas motif match >= 90th percentile | Johnson 2023 | Strong motif preference, NOT proof the kinase acted |\n| Report peptide FDR and site FLR separately | Fermin 2013 | 1% peptide FDR != 1% site FDR; true site error is typically several-fold higher |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|---|---|---|\n| FileNotFoundError on the sites table | Filename has a SPACE: `Phospho (STY)Sites.txt` | Accept either spaced or no-space form |\n| Apparent dephosphorylation that is not real | Quantified base `Intensity`, mixing multiplicities | Use `Intensity___1\u002F___2\u002F___3` (three underscores) |\n| KeyError \u002F NaN on `Gene names` | Column is FASTA-dependent, absent without gene annotation | Guard with `.notna()` and fall back to `Protein` |\n| All sites \"regulated\" and pathway-coherent | No protein-level adjustment | Require significance in MSstatsPTM `ADJUSTED.Model` |\n| `PTM.Q.Value` \u002F `PhosphoSite` not found (DIA-NN) | Those columns do not exist | Use `PTM.Site.Confidence` and `Site.Occupancy.Probabilities` |\n| False \"ubiquitination\" sites | Iodoacetamide +114.0429 lysine artifact | Alkylate with chloroacetamide |\n| Acetyl confused with trimethyl | +42.0106 vs +42.0470 isobaric at nominal mass | Require high-res MS; check 0.0364 Da split |\n\n## References\n\n- Beausoleil SA, Villen J, Gerber SA, Rush J, Gygi SP. A probability-based approach for high-throughput protein phosphorylation analysis and site localization. *Nat Biotechnol* 2006;24(10):1285-1292.\n- Taus T, Kocher T, Pichler P, et al. Universal and confident phosphorylation site localization using phosphoRS. *J Proteome Res* 2011;10(12):5354-5362.\n- Olsen JV, Blagoev B, Gnad F, et al. Global, in vivo, and site-specific phosphorylation dynamics in signaling networks. *Cell* 2006;127(3):635-648.\n- Fermin D, Walmsley SJ, Gingras AC, Choi H, Nesvizhskii AI. LuciPHOr: algorithm for phosphorylation site localization with false localization rate estimation using modified target-decoy approach. *Mol Cell Proteomics* 2013;12(11):3409-3419.\n- Fermin D, Avtonomov D, Choi H, Nesvizhskii AI. LuciPHOr2: site localization of generic PTMs from tandem mass spectrometry data. *Bioinformatics* 2015;31(7):1141-1143.\n- Bekker-Jensen DB, Bernhardt OM, Hogrebe A, et al. Rapid and site-specific deep phosphoproteome profiling by data-independent acquisition without the need for spectral libraries. *Nat Commun* 2020;11:787.\n- Kohler D, Tsai TH, Verschueren E, et al. MSstatsPTM: Statistical Relative Quantification of Posttranslational Modifications in Bottom-Up Mass Spectrometry-Based Proteomics. *Mol Cell Proteomics* 2023;22(1):100477.\n- Ochoa D, Jarnuczak AF, Vieitez C, et al. The functional landscape of the human phosphoproteome. *Nat Biotechnol* 2020;38(3):365-373.\n- Casado P, Rodriguez-Prados JC, Cosulich SC, et al. Kinase-Substrate Enrichment Analysis Provides Insights into the Heterogeneity of Signaling Pathway Activation in Leukemia Cells. *Sci Signal* 2013;6(268):rs6.\n- Krug K, Mertins P, Zhang B, et al. A Curated Resource for Phosphosite-specific Signature Analysis. *Mol Cell Proteomics* 2019;18(3):576-593.\n- Yilmaz S, Ayati M, Schlatzer D, et al. Robust inference of kinase activity using functional networks. *Nat Commun* 2021;12:1177.\n- Larsen MR, Thingholm TE, Jensen ON, Roepstorff P, Jorgensen TJD. Highly selective enrichment of phosphorylated peptides from peptide mixtures using titanium dioxide microcolumns. *Mol Cell Proteomics* 2005;4(7):873-886.\n- Ruprecht B, Koch H, Medard G, et al. Comprehensive and reproducible phosphopeptide enrichment using iron immobilized metal ion affinity chromatography (Fe-IMAC) columns. *Mol Cell Proteomics* 2015;14(1):205-215.\n- Matheron L, van den Toorn H, Heck AJR, Mohammed S. Characterization of biases in phosphopeptide enrichment by Ti(IV)-IMAC and TiO2 using a massive synthetic library and human cell digests. *Anal Chem* 2014;86(16):8312-8320.\n- Thingholm TE, Jensen ON, Robinson PJ, Larsen MR. SIMAC (sequential elution from IMAC), a phosphoproteomics strategy for the rapid separation of monophosphorylated from multiply phosphorylated peptides. *Mol Cell Proteomics* 2008;7(4):661-671.\n- Svinkina T, Gu H, Silva JC, et al. Deep, Quantitative Coverage of the Lysine Acetylome Using Novel Anti-acetyl-lysine Antibodies and an Optimized Proteomic Workflow. *Mol Cell Proteomics* 2015;14(9):2429-2440.\n- Xu G, Paige JS, Jaffrey SR. Global analysis of lysine ubiquitination by ubiquitin remnant immunoaffinity profiling. *Nat Biotechnol* 2010;28(8):868-873.\n- Kim W, Bennett EJ, Huttlin EL, et al. Systematic and Quantitative Assessment of the Ubiquitin-Modified Proteome. *Mol Cell* 2011;44(2):325-340.\n- Nielsen ML, Vermeulen M, Bonaldi T, Cox J, Moroder L, Mann M. Iodoacetamide-induced artifact mimics ubiquitination in mass spectrometry. *Nat Methods* 2008;5(6):459-460.\n- Akimov V, Barrio-Hernandez I, Hansen SVF, et al. UbiSite approach for comprehensive mapping of lysine and N-terminal ubiquitination sites. *Nat Struct Mol Biol* 2018;25(7):631-640.\n- Riley NM, Bertozzi CR, Pitteri SJ. A Pragmatic Guide to Enrichment Strategies for Mass Spectrometry-Based Glycoproteomics. *Mol Cell Proteomics* 2021;20:100029.\n- Johnson JL, Yaron TM, Huntsman EM, et al. An atlas of substrate specificities for the human serine\u002Fthreonine kinome. *Nature* 2023;613(7945):759-766.\n- Mueller-Dott S, Jaehnig EJ, et al. Comprehensive evaluation of phosphoproteomic-based kinase activity inference. *Nat Commun* 2025;16:4771.\n- Zong Y, Wang Y, Yang Y, et al. DeepFLR facilitates false localization rate control in phosphoproteomics. *Nat Commun* 2023;14:2269.\n\n## Related Skills\n\n- peptide-identification - Identify modified peptides and run open\u002Fvariable-mod search\n- quantification - Underlying protein-level quant feeding the MSstatsPTM PROTEIN dataset\n- differential-abundance - Moderated testing on the protein-level intensity matrix\n- pathway-analysis\u002Fgsea - Enrichment scoring of regulated-site protein lists and PTM-SEA-style signatures\n- data-visualization\u002Fsequence-logos - Render motif logos from the foreground\u002Fbackground windows\n","## Version Compatibility\n\nReference examples tested with: MSstatsPTM 2.4+, pandas 2.2+, numpy 1.26+, scipy 1.12+\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\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\n# PTM and Phosphoproteomics Analysis -- Three Inference Layers Stacked on a Biased Extraction\n\n**\"Find the regulated phosphosites in my enriched samples\"** -> Localize each modification, then test whether its abundance change survives subtracting the protein-level change -- because a PTM result is three separate inferences (enrichment, localization, quantification) and each fails silently if the layer below is treated as solved.\n- R: `MSstatsPTM::groupComparisonPTM()` for protein-adjusted site testing (the load-bearing tool)\n- Python: `pandas` to expand MaxQuant `Phospho (STY)Sites` multiplicity and filter localization probability\n- R: `KSEAapp` \u002F PTM-SEA (`ssGSEA2.0`) for kinase-activity inference from the site fold-changes\n\nScope: this skill OWNS enrichment-chemistry framing, site localization and FLR, multiplicity-resolved site quant, protein-level adjustment, motif analysis, and kinase-activity inference. Peptide identification and open\u002Fvariable-mod search route to peptide-identification; the underlying protein-level (unenriched) quant routes to quantification and differential-abundance; DIA acquisition mechanics route to dia-analysis. OUT OF SCOPE: intact-glycopeptide glycan-composition search (pGlyco3\u002FMSFragger-Glyco) and absolute occupancy from three-ratio SILAC are noted but not implemented here.\n\n## The Single Most Important Modern Insight -- A PTM Result Is Three Inferences, Not One\n\n1. **Enrichment IS the experiment, and the chemistry is a filter confounded with biology.** The data only contain what the chemistry captured. TiO2 and Fe-IMAC give partially-overlapping phosphoproteomes; anti-K-GG enriches ubiquitin, NEDD8, and ISG15 indistinguishably; a lectin reports only its cognate glycoforms. A between-method or between-lab \"biological difference\" must FIRST be excluded as a chemistry artifact before it is called biology.\n2. **Identifying a peptide is NOT localizing the modification.** A phosphopeptide with two S\u002FT and one phosphate has isobaric positional isomers of identical precursor mass and identical peptide-level score; the localization is a SECOND inference decided only by site-determining fragment ions, with its own error rate (false localization rate, FLR). Target-decoy peptide FDR cannot estimate FLR: a wrong localization is the correct sequence with the mod one residue over, not a decoy sequence (Fermin 2013). A 1% peptide FDR does NOT yield a 1% site FDR -- report them separately.\n3. **A change in phosphopeptide abundance is NOT a change in phosphorylation (the biggest quant trap).** Observed PTM signal ~ (site occupancy) x (protein abundance) x (enrichment\u002Fionization factor), so `log2FC(PTM_observed) = log2FC(occupancy) + log2FC(protein)`. Without a paired global (unenriched) proteome run on the SAME samples to subtract `log2FC(protein)`, every protein-abundance change masquerades as a regulated site. Because co-regulated proteins move together, the false positives are pathway-coherent and look biologically convincing -- the worst kind of artifact. This is the entire reason MSstatsPTM exists (Kohler 2023).\n4. **Most identified sites have no known function.** Fewer than ~5% of phosphosites are functionally annotated; a fold-change alone says nothing about regulatory relevance. Functional triage (conservation, stoichiometry, Ochoa functional score, confident kinase assignment) is a separate fourth layer on top of the quant (Ochoa 2020).\n\nBottom line: report THREE numbers, not one -- peptide\u002FPSM FDR, per-site localization probability with its threshold, and an empirically estimated global FLR -- and never call a site \"regulated\" from a phospho-only run without protein-level adjustment.\n\n## Tool Taxonomy\n\n### Enrichment chemistry (phospho)\n\n| Method | Citation | Mechanism \u002F bias | When |\n|---|---|---|---|\n| TiO2 (MOAC) | Larsen 2005 | Metal-oxide Lewis-acid surface; skews mono-phospho; needs hydroxy-acid additive | General single-method depth; EasyPhos basis |\n| Fe(III)-IMAC | Ruprecht 2015 | Chelated Fe3+ coordinates phosphate; multidentate avidity skews MULTI-phospho | Hierarchical\u002Fprocessive signaling; the mono\u002Fmulti divergence is STRONGEST here vs TiO2 |\n| Ti4+\u002FZr4+-IMAC | Matheron 2014 | Chelated metal ION on immobilized phosphonate (NOT bulk oxide); bias vs TiO2 is SMALL | Modern automated workflows; metal identity matters more than IMAC-vs-MOAC |\n| SIMAC (sequential) | Thingholm 2008 | IMAC acidic elution = mono, basic = multi, then TiO2 on mono fraction | Recovering both populations IMAC alone biases |\n\nNaming trap: Ti4+\u002FZr4+-IMAC (chelated ions) is DIFFERENT chemistry from TiO2\u002FZrO2 (bulk oxide). Glycolic acid is the modern additive standard (load 80% ACN \u002F 5% TFA \u002F 0.1 M glycolic acid).\n\n### Other-PTM enrichment and identity traps\n\n| PTM | Reagent \u002F mass | Citation | Headline trap |\n|---|---|---|---|\n| Ubiquitin (diGly, K-GG, +114.0429) | Anti-K-GG antibody | Xu 2010; Kim 2011 | NOT ubiquitin-specific: K-GG = ubiquitin + NEDD8 (~6% at basal) + ISG15 (rises under interferon). UbiSite (Akimov 2018) is the ubiquitin-specific alternative |\n| Ubiquitin alkylation artifact | use chloroacetamide | Nielsen 2008 | Iodoacetamide creates a +114.0429 lysine adduct mimicking ubiquitination; chloroacetamide does not |\n| Acetyl-K (+42.0106) | Anti-acetyllysine cocktail | Svinkina 2015 | Isobaric with trimethyl +42.0470 (0.0364 Da, needs high-res); acetyl blocks trypsin -> allow >=4 missed cleavages |\n| Glyco N-linked | PNGase F (released) or intact | Riley 2021 | Released loses the glycan; N->D tag +0.984 is isobaric with deamidation -- use PNGase F in H2-18O (+2.988) to disambiguate; N-X-S\u002FT (X!=Pro) sequon is necessary not sufficient |\n\n### Localization scoring\n\n| Tool | Citation | Mechanism | Note |\n|---|---|---|---|\n| Ascore | Beausoleil 2006 | Cumulative binomial of site-determining ions; DIFFERENCE between best and 2nd-best localization, peak-depth sweep | Ascore >=19 ~ p 0.01 PAIRWISE per-PSM, NOT a dataset FLR |\n| PhosphoRS \u002F ptmRS | Taus 2011 | Per-isomer cumulative binomial, tolerance-aware (correct for high-res), per-site probs sum to 100% | In Proteome Discoverer |\n| PTMProphet | Shteynberg (TPP) | EM\u002FBayesian mixture; per-site probs combinable across PSMs to a global FLR | TPP\u002FFragPipe |\n| MaxQuant Localization prob | Cox\u002FMann (Andromeda) | Normalized posterior on the site (fixed peak depth) | column `Localization prob`; >=0.75 = class I |\n| DIA localization | Bekker-Jensen 2020 | XIC peak-shape correlation substitutes for missing precursor isolation | Spectronaut `EG.PTMLocalizationProbabilities`; DIA-NN `PTM.Site.Confidence` |\n| DeepFLR | Zong 2023 | Deep-learning spectrum predictor + target-decoy FLR | SOTA direction; DDA + DIA |\n\n### Site-FDR \u002F FLR (the layer most pipelines skip)\n\n| Tool | Citation | Mechanism |\n|---|---|---|\n| LuciPHOr | Fermin 2013 (MCP) | Decoy localizations on non-modifiable residues; rate decoys win = empirical FLR |\n| LuciPHOr2 | Fermin 2015 (Bioinformatics) | Generic-PTM successor (do NOT swap the two journals) |\n| Decoy amino-acid FLR | Ramsbottom\u002FJones 2022 | Add a non-modifiable residue to the candidate set; global FLR ~ decoy-site-hits \u002F target-site-hits, frequency-corrected |\n\n### Kinase-activity inference\n\n| Tool | Citation | Mechanism | Limitation |\n|---|---|---|---|\n| KSEA | Casado 2013 | z-score of a kinase's substrate fold-changes | sqrt(m) favors well-annotated kinases; inherits PhosphoSitePlus bias |\n| PTM-SEA \u002F PTMsigDB | Krug 2019 | ssGSEA2.0 on site-level +\u002F-7 flanking-sequence signatures | robust to isoform drift; PERT signatures score \"looks like EGF stim\" |\n| RoKAI | Yilmaz 2021 | Network-smooth profiles before z-score so unobserved sites borrow neighbor signal | attacks missingness; feeds KSEA |\n\nBenchmark result (Mueller-Dott 2025): across ~19 methods, simple z-score (KSEA\u002FRoKAI) matched or beat sophisticated methods. Performance is PRIOR-limited, not algorithm-limited; all methods inherit PhosphoSitePlus curation bias toward CK2\u002FCDK1\u002FPKA\u002FMAPK, and the dark kinome is structurally invisible. Spend effort on the substrate prior, not the estimator.\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended | Why |\n|---|---|---|\n| Phospho-only run, want regulated sites | Acquire a PAIRED global proteome -> MSstatsPTM `groupComparisonPTM` -> require significance in `ADJUSTED.Model` | Unadjusted site changes are confounded with protein abundance |\n| No global proteome available | Report site changes as UNADJUSTED and flag the confound explicitly | Cannot separate occupancy from abundance; do not claim \"regulation\" |\n| Between-method phospho difference | Suspect chemistry (TiO2 vs Fe-IMAC mono\u002Fmulti bias) BEFORE biology | Enrichment is a confounded filter |\n| Multiply-phospho peptides present | Localize per-site (Ascore\u002FptmRS) AND report empirical global FLR | Peptide FDR != site FDR |\n| \"Ubiquitination\" sites | Confirm chloroacetamide alkylation; treat K-GG as ub + NEDD8 + ISG15; consider UbiSite | Iodoacetamide artifact + NEDD8\u002FISG15 confound |\n| Which kinases moved? | KSEA or PTM-SEA with a curated prior; do not over-interpret dark-kinome silence | Prior-limited; simple z-score suffices |\n| Motif logo from the hits | Background = experiment-matched S\u002FT\u002FY from the identified proteins (NOT whole proteome) | Whole-proteome background rediscovers disordered-region composition bias |\n\nDefault when uncertain: localize with the search engine's probability (class I >=0.75), expand MaxQuant multiplicity, run MSstatsPTM with a paired global proteome, and call only `ADJUSTED.Model` hits regulated.\n\n## Expand the MaxQuant Site Table Before Any Quant\n\n**Goal:** Produce a long, multiplicity-resolved, class-I-filtered phosphosite intensity matrix from `Phospho (STY)Sites.txt`.\n\n**Approach:** Each site row spreads its quant across `Intensity___1\u002F___2\u002F___3` (singly\u002Fdoubly\u002Ftriply-phospho forms, THREE underscores); the collapsed base `Intensity` mixes phospho-states and can fake dephosphorylation. Drop Reverse\u002Fcontaminant, filter `Localization prob`, then melt the per-multiplicity columns into rows.\n\n```python\nimport pandas as pd\nimport numpy as np\n\n# Filename has a SPACE in the modification name; accept either form.\nphospho = pd.read_csv('Phospho (STY)Sites.txt', sep='\\t', low_memory=False)\n\n# Newer MaxQuant uses 'Potential contaminant'; older uses 'Contaminant'.\ncontaminant_col = 'Potential contaminant' if 'Potential contaminant' in phospho.columns else 'Contaminant'\nphospho = phospho[(phospho['Reverse'] != '+') & (phospho[contaminant_col] != '+')]\n\nCLASS_I_PROB = 0.75  # Olsen 2006 class-I convention; comparability standard, not a calibrated FLR\nphospho = phospho[phospho['Localization prob'] >= CLASS_I_PROB].copy()\n\ngene = phospho['Gene names'].where(phospho['Gene names'].notna(), phospho['Protein'])\nphospho['site_id'] = gene.str.split(';').str[0] + '_' + phospho['Amino acid'] + phospho['Position'].astype(int).astype(str)\n\n# Multiplicity columns carry THREE underscores: collapsing them mixes phospho-states.\nmult_cols = [c for c in phospho.columns if '___' in c and c.split('___')[-1] in {'1', '2', '3'} and c.startswith('Intensity')]\nlong = phospho.melt(id_vars=['site_id', 'Amino acid', 'Position', 'Localization prob'], value_vars=mult_cols, var_name='run_multiplicity', value_name='intensity')\nlong['multiplicity'] = long['run_multiplicity'].str.split('___').str[-1]\nlong['run'] = long['run_multiplicity'].str.replace(r'___[123]$', '', regex=True).str.replace('Intensity ', '', regex=False)\nlong = long[long['intensity'] > 0]\nlong['log2_intensity'] = np.log2(long['intensity'])\n```\n\n## Protein-Level Adjustment with MSstatsPTM\n\n**Goal:** Decide whether each site change is real after subtracting the matched protein-abundance change.\n\n**Approach:** MSstatsPTM carries TWO datasets -- a PTM dataset (enriched) and a PROTEIN dataset (global\u002Funenriched). `groupComparisonPTM` fits independent linear models to each and returns a list of THREE: `PTM.Model` (unadjusted), `PROTEIN.Model`, and `ADJUSTED.Model`. The adjustment is `dFC_adj = dFC_PTM - dFC_protein` with `SE_adj = sqrt(SE_PTM^2 + SE_protein^2)`, so adjustment ADDS uncertainty -- a site can be significant unadjusted yet lose significance after adjustment. A confident regulation call requires significance in `ADJUSTED.Model`.\n\n```r\nlibrary(MSstatsPTM)\n\n# Converters are \u003CTool>toMSstatsPTMFormat and return a list with $PTM and $PROTEIN.\n# MaxQtoMSstatsPTMFormat reads the MaxQuant 'evidence.txt' (NOT the Phospho (STY)Sites\n# table -- the pandas multiplicity-expansion above is a SEPARATE workflow); the FASTA maps\n# peptides back to site coordinates. Supply BOTH the enriched evidence and the global\n# proteinGroups; without the protein dataset there is nothing to adjust against.\n# Arg-name note: the FASTA argument is `fasta_path` in current MSstatsPTM; older builds may\n# differ -- run `?MaxQtoMSstatsPTMFormat` to confirm before relying on it.\ninput \u003C- MaxQtoMSstatsPTMFormat(\n  evidence = read.table('evidence.txt', sep = '\\t', header = TRUE, quote = ''),\n  annotation = read.csv('annotation_ptm.csv'),\n  fasta_path = 'uniprot_human.fasta',\n  fasta_protein_name = 'uniprot_ac',\n  proteinGroups = read.table('proteinGroups.txt', sep = '\\t', header = TRUE, quote = ''),\n  annotation_protein = read.csv('annotation_protein.csv'),\n  mod_id = '\\\\(Phospho \\\\(STY\\\\)\\\\)',\n  which_proteinid_ptm = 'Proteins',\n  use_unmod_peptides = FALSE\n)\n\nsummarized \u003C- dataSummarizationPTM(input, use_log_file = FALSE)\n# LabelFree run: data.type = 'LF' (use 'TMT' for isobaric); contrast.matrix defaults to\n# full pairwise. groupComparisonPTM has NO `model` argument -- it always fits independent\n# PTM and PROTEIN models, then adjusts.\nresult \u003C- groupComparisonPTM(summarized, data.type = 'LF')\n\n# Three models; the adjusted one is the deliverable.\nadjusted \u003C- result$ADJUSTED.Model\nregulated \u003C- adjusted[!is.na(adjusted$adj.pvalue) & adjusted$adj.pvalue \u003C 0.05 & abs(adjusted$log2FC) > 1, ]\n\n# How much of each call was protein-driven: compare PTM.Model vs ADJUSTED.Model.\n```\n\n## Motif Analysis with the Correct Background\n\n**Goal:** Find kinase\u002Fwriter motifs around the modified residue without rediscovering amino-acid composition bias.\n\n**Approach:** Use the `Sequence window` (+\u002F-15 residues, 31-mer) MaxQuant already provides, centered on the site. The background MUST be an experiment-matched S\u002FT\u002FY set drawn from the identified proteins (or a central-residue-preserving shuffle), NOT the whole proteome or IUPAC-random -- those just report the composition of phospho-rich disordered regions. motif-x and MoMo p-values are only valid when the background is built this way.\n\n```python\nfrom collections import Counter\n\n# 'Sequence window' is a 31-mer (+\u002F-15) centered on the modified residue.\nWINDOW_HALF = 7  # +\u002F-7 flanking is the standard kinase-motif window\nforeground = [w[15 - WINDOW_HALF: 16 + WINDOW_HALF] for w in confident['Sequence window'].dropna() if len(w) >= 31]\n\n# Background: same-residue windows from the matched dataset, NOT the whole proteome.\ndef position_frequencies(windows):\n    counts = {i: Counter() for i in range(-WINDOW_HALF, WINDOW_HALF + 1)}\n    for w in windows:\n        for offset, aa in zip(range(-WINDOW_HALF, WINDOW_HALF + 1), w):\n            if aa not in '_X':\n                counts[offset][aa] += 1\n    return counts\n```\n\nFor a publication-grade enrichment logo, hand the foreground and a matched background to a dedicated tool (motif-x \u002F MoMo) and render with data-visualization\u002Fsequence-logos.\n\n## A Note on Home-Grown Ascore\n\nThe function below is an ILLUSTRATIVE approximation, NOT real Ascore. Real Ascore (Beausoleil 2006) competes the best localization against the second-best, sweeps peak depth 1-10 per 100 Th, and restricts to site-determining ions -- none of which this captures. Use the search engine's own localization probability (MaxQuant `Localization prob`, ptmRS, PTMProphet) for real work, or pyOpenMS `AScore` (introspect the exact API before relying on it). The home-grown form is here only to show the binomial intuition.\n\n```python\nimport numpy as np\nfrom scipy.stats import binom\n\ndef illustrative_localization_score(matched_site_ions, total_ions, depth_p=0.04):\n    '''Binomial intuition only; NOT Ascore (no best-vs-second competition or depth sweep).'''\n    if total_ions == 0 or matched_site_ions == 0:\n        return 0.0\n    p_random = 1 - binom.cdf(matched_site_ions - 1, total_ions, depth_p)\n    return -10 * np.log10(p_random) if p_random > 0 else 100.0\n```\n\n## Per-Method Failure Modes\n\n### Skipping protein-level adjustment\n**Trigger:** Differential testing on a phospho-only run with no paired global proteome. **Mechanism:** `log2FC(PTM_observed) = log2FC(occupancy) + log2FC(protein)`; the two terms are inseparable. **Symptom:** Pathway-coherent \"regulated sites\" that are pure protein-abundance changes (cyclins\u002Fhistones in cell cycle, stabilized substrates under drug). **Fix:** Run a matched global proteome and adjust via MSstatsPTM; route the protein-level quant to quantification.\n\n### Collapsing the MaxQuant multiplicity\n**Trigger:** Quantifying on base `Intensity` instead of `Intensity___1\u002F___2\u002F___3`. **Mechanism:** The collapsed column mixes singly\u002Fdoubly\u002Ftriply-phospho forms of the same site. **Symptom:** The singly-phospho form dropping as a neighbor gets phosphorylated reads as dephosphorylation. **Fix:** Expand multiplicity to long form (Perseus \"Expand site table\" or the melt above) before any stats.\n\n### Treating identification as localization\n**Trigger:** Reporting sites at peptide FDR without a localization threshold. **Mechanism:** Isobaric positional isomers share precursor mass and peptide score; CID\u002Fion-trap neutral loss (-98 Da) starves site-determining ions. **Symptom:** A 1% peptide FDR result with a much higher true site error. **Fix:** Filter localization probability (class I >=0.75), report an empirical global FLR (LuciPHOr\u002FDeepFLR), prefer HCD\u002FEThcD.\n\n### diGly read as ubiquitin\n**Trigger:** Calling the K-GG proteome \"ubiquitination\". **Mechanism:** NEDD8 and ISG15 share the LRLRGG C-terminus and leave the identical +114.0429 remnant; iodoacetamide adds a fourth source. **Symptom:** Inflated\u002Ffalse ubiquitin sites, worst under interferon (ISG15) or with iodoacetamide. **Fix:** Chloroacetamide alkylation; treat K-GG as ub+NEDD8+ISG15; use UbiSite for ubiquitin-specific mapping.\n\n### Motif logo against the wrong background\n**Trigger:** Whole-proteome or IUPAC-random background. **Mechanism:** Phosphosites sit in disordered, Ser\u002FPro\u002Facidic-rich regions; that composition dominates the enrichment. **Symptom:** \"Enriched\" proline\u002Fserine motifs that are region bias, not kinase preference. **Fix:** Experiment-matched S\u002FT\u002FY background or central-residue-preserving shuffle (MoMo default).\n\n### Over-reading kinase-activity output\n**Trigger:** Naming the top KSEA\u002Fatlas kinase as the responsible enzyme. **Mechanism:** Substrate priors are PhosphoSitePlus-curated (CK2\u002FCDK1\u002FPKA\u002FMAPK heavy); atlas hits are biochemical preference ignoring expression\u002Flocalization\u002Ftiming. **Symptom:** Always-the-usual-suspects kinase lists; dark-kinome activity invisible. **Fix:** Use a curated prior, report z-scores with their substrate counts, do not infer absence from silence.\n\n## Quantitative Thresholds\n\n| Threshold | Source | Rationale |\n|---|---|---|\n| Localization prob class I >= 0.75 | Olsen 2006 | Best site holds >3x the posterior of all alternatives (single-phospho); a comparability standard, not a calibrated error rate |\n| Class II 0.5-0.75; class III 0.25-0.5 | Olsen 2006 | Partial \u002F poor localization |\n| Ascore >= 19 (p~0.01); loose >13 | Beausoleil 2006 | Pairwise per-PSM best-vs-next confidence; NOT a dataset FLR |\n| DIA directDIA localization >= 0.99 | Bekker-Jensen 2020 | Stricter than library-based (0.75) to match DDA error rates |\n| DIA-NN site matrix 0.90 \u002F 0.99 | DIA-NN docs | phosphosites_90\u002F99.tsv; class-I-equivalent stringency is HIGHER than MaxQuant 0.75 |\n| Acetyl missed cleavages >= 4 | -- | Acetyl-K blocks trypsin; pair LysC + trypsin |\n| Kinase atlas motif match >= 90th percentile | Johnson 2023 | Strong motif preference, NOT proof the kinase acted |\n| Report peptide FDR and site FLR separately | Fermin 2013 | 1% peptide FDR != 1% site FDR; true site error is typically several-fold higher |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|---|---|---|\n| FileNotFoundError on the sites table | Filename has a SPACE: `Phospho (STY)Sites.txt` | Accept either spaced or no-space form |\n| Apparent dephosphorylation that is not real | Quantified base `Intensity`, mixing multiplicities | Use `Intensity___1\u002F___2\u002F___3` (three underscores) |\n| KeyError \u002F NaN on `Gene names` | Column is FASTA-dependent, absent without gene annotation | Guard with `.notna()` and fall back to `Protein` |\n| All sites \"regulated\" and pathway-coherent | No protein-level adjustment | Require significance in MSstatsPTM `ADJUSTED.Model` |\n| `PTM.Q.Value` \u002F `PhosphoSite` not found (DIA-NN) | Those columns do not exist | Use `PTM.Site.Confidence` and `Site.Occupancy.Probabilities` |\n| False \"ubiquitination\" sites | Iodoacetamide +114.0429 lysine artifact | Alkylate with chloroacetamide |\n| Acetyl confused with trimethyl | +42.0106 vs +42.0470 isobaric at nominal mass | Require high-res MS; check 0.0364 Da split |\n\n## References\n\n- Beausoleil SA, Villen J, Gerber SA, Rush J, Gygi SP. A probability-based approach for high-throughput protein phosphorylation analysis and site localization. *Nat Biotechnol* 2006;24(10):1285-1292.\n- Taus T, Kocher T, Pichler P, et al. Universal and confident phosphorylation site localization using phosphoRS. *J Proteome Res* 2011;10(12):5354-5362.\n- Olsen JV, Blagoev B, Gnad F, et al. Global, in vivo, and site-specific phosphorylation dynamics in signaling networks. *Cell* 2006;127(3):635-648.\n- Fermin D, Walmsley SJ, Gingras AC, Choi H, Nesvizhskii AI. LuciPHOr: algorithm for phosphorylation site localization with false localization rate estimation using modified target-decoy approach. *Mol Cell Proteomics* 2013;12(11):3409-3419.\n- Fermin D, Avtonomov D, Choi H, Nesvizhskii AI. LuciPHOr2: site localization of generic PTMs from tandem mass spectrometry data. *Bioinformatics* 2015;31(7):1141-1143.\n- Bekker-Jensen DB, Bernhardt OM, Hogrebe A, et al. Rapid and site-specific deep phosphoproteome profiling by data-independent acquisition without the need for spectral libraries. *Nat Commun* 2020;11:787.\n- Kohler D, Tsai TH, Verschueren E, et al. MSstatsPTM: Statistical Relative Quantification of Posttranslational Modifications in Bottom-Up Mass Spectrometry-Based Proteomics. *Mol Cell Proteomics* 2023;22(1):100477.\n- Ochoa D, Jarnuczak AF, Vieitez C, et al. The functional landscape of the human phosphoproteome. *Nat Biotechnol* 2020;38(3):365-373.\n- Casado P, Rodriguez-Prados JC, Cosulich SC, et al. Kinase-Substrate Enrichment Analysis Provides Insights into the Heterogeneity of Signaling Pathway Activation in Leukemia Cells. *Sci Signal* 2013;6(268):rs6.\n- Krug K, Mertins P, Zhang B, et al. A Curated Resource for Phosphosite-specific Signature Analysis. *Mol Cell Proteomics* 2019;18(3):576-593.\n- Yilmaz S, Ayati M, Schlatzer D, et al. Robust inference of kinase activity using functional networks. *Nat Commun* 2021;12:1177.\n- Larsen MR, Thingholm TE, Jensen ON, Roepstorff P, Jorgensen TJD. Highly selective enrichment of phosphorylated peptides from peptide mixtures using titanium dioxide microcolumns. *Mol Cell Proteomics* 2005;4(7):873-886.\n- Ruprecht B, Koch H, Medard G, et al. Comprehensive and reproducible phosphopeptide enrichment using iron immobilized metal ion affinity chromatography (Fe-IMAC) columns. *Mol Cell Proteomics* 2015;14(1):205-215.\n- Matheron L, van den Toorn H, Heck AJR, Mohammed S. Characterization of biases in phosphopeptide enrichment by Ti(IV)-IMAC and TiO2 using a massive synthetic library and human cell digests. *Anal Chem* 2014;86(16):8312-8320.\n- Thingholm TE, Jensen ON, Robinson PJ, Larsen MR. SIMAC (sequential elution from IMAC), a phosphoproteomics strategy for the rapid separation of monophosphorylated from multiply phosphorylated peptides. *Mol Cell Proteomics* 2008;7(4):661-671.\n- Svinkina T, Gu H, Silva JC, et al. Deep, Quantitative Coverage of the Lysine Acetylome Using Novel Anti-acetyl-lysine Antibodies and an Optimized Proteomic Workflow. *Mol Cell Proteomics* 2015;14(9):2429-2440.\n- Xu G, Paige JS, Jaffrey SR. Global analysis of lysine ubiquitination by ubiquitin remnant immunoaffinity profiling. *Nat Biotechnol* 2010;28(8):868-873.\n- Kim W, Bennett EJ, Huttlin EL, et al. Systematic and Quantitative Assessment of the Ubiquitin-Modified Proteome. *Mol Cell* 2011;44(2):325-340.\n- Nielsen ML, Vermeulen M, Bonaldi T, Cox J, Moroder L, Mann M. Iodoacetamide-induced artifact mimics ubiquitination in mass spectrometry. *Nat Methods* 2008;5(6):459-460.\n- Akimov V, Barrio-Hernandez I, Hansen SVF, et al. UbiSite approach for comprehensive mapping of lysine and N-terminal ubiquitination sites. *Nat Struct Mol Biol* 2018;25(7):631-640.\n- Riley NM, Bertozzi CR, Pitteri SJ. A Pragmatic Guide to Enrichment Strategies for Mass Spectrometry-Based Glycoproteomics. *Mol Cell Proteomics* 2021;20:100029.\n- Johnson JL, Yaron TM, Huntsman EM, et al. An atlas of substrate specificities for the human serine\u002Fthreonine kinome. *Nature* 2023;613(7945):759-766.\n- Mueller-Dott S, Jaehnig EJ, et al. Comprehensive evaluation of phosphoproteomic-based kinase activity inference. *Nat Commun* 2025;16:4771.\n- Zong Y, Wang Y, Yang Y, et al. DeepFLR facilitates false localization rate control in phosphoproteomics. *Nat Commun* 2023;14:2269.\n\n## Related Skills\n\n- peptide-identification - Identify modified peptides and run open\u002Fvariable-mod search\n- quantification - Underlying protein-level quant feeding the MSstatsPTM PROTEIN dataset\n- differential-abundance - Moderated testing on the protein-level intensity matrix\n- pathway-analysis\u002Fgsea - Enrichment scoring of regulated-site protein lists and PTM-SEA-style signatures\n- data-visualization\u002Fsequence-logos - Render motif logos from the foreground\u002Fbackground windows\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","mixed","2026-09-20","proteomics\u002Fptm-analysis\u002FSKILL.md","MSstatsPTM","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-proteomics-ptm-analysis","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-proteomics-ptm-analysis",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-proteomics-ptm-analysis",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-proteomics-ptm-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-proteomics-ptm-analysis\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fphospho_analysis.py","SCRIPT","脚本",3174,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-proteomics-ptm-analysis\u002Fexamples\u002Fphospho_analysis.py",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",4485,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-proteomics-ptm-analysis\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]