AGENT SKILL

proteomics-de

Differential expression analysis for label-free quantitative (LFQ) intensity data with standard MaxQuant and DIA-NN output. Workflow includes preprocessing, imputation, and statistical testing.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 12
Forks
5

01 前言 Front Matter

name
proteomics-de
license
MIT
metadata
{ "version": "0.1.0", "openclaw": { "os": [ "darwin", "linux", "win32" ], "emoji": "🥚", "always": false, "install": [ { "kind": "pip", "package": "pandas" }, { "kind": "pip", "package": "numpy" }, { "kind": "pip", "package": "matplotlib" }, { "kind": "pip", "package": "scikit-learn" }, { "kind": "pip", "package": "scipy" }, { "kind": "pip", "package": "seaborn" } ], "homepage": "https://github.com/ClawBio/ClawBio", "requires": { "bins": [ "python3" ] }, "trigger_keywords": [ "Differential expression analysis of proteomics data from MaxQuant or DIA-NN output" ] } }
description
Differential expression analysis for label-free quantitative (LFQ) intensity data with standard MaxQuant and DIA-NN output. Workflow includes preprocessing, imputation, and statistical testing.

02 资源文件 6

03 SKILL.md 正文

🥚 Proteomics Differential Expression

This skill performs differential expression analysis on label-free quantitative (LFQ) intensity data from MaxQuant and DIA-NN outputs, including preprocessing, imputation, statistical testing, and visualization.


Domain Decisions

1. Multi-format Input Support

  • Supports MaxQuant proteinGroups.txt
    • Automatic filtering of reverse hits, contaminants, and site-only identifications
  • Supports DIA-NN output
    • Automatically extracts protein IDs and .raw intensity columns

2. Preprocessing Strategy

  • MaxQuant:
    • Filters:
      • Reverse
      • Potential contaminant / Contaminant
      • Only identified by site
  • DIA-NN:
    • Extracts protein identifiers and intensity matrix directly

3. Intensity Transformation

  • LFQ intensities are transformed using log2 scaling
  • Ensures approximate normality for downstream statistical testing

4. Missing Value Imputation

  • Uses down-shifted Gaussian imputation
    • Mean shifted by: median - shift × std
    • Default:
      • shift = 1.8
      • scale = 0.3
  • Assumption:
    • Missing values represent low-abundance proteins

5. Statistical Testing

  • Two-sample t-test between treatment and control groups
  • Default degrees of freedom:
    • df = 4 (for 3 vs 3 replicates)

6. Multiple-Testing Correction

  • Benjamini-Hochberg on the raw t-test p-values → padj
  • This is what controls the false discovery rate

7. s0 Fold-Change Curve

  • Hyperbolic volcano boundary combining log2 fold change and p-value
  • Shape follows Giai Gianetto et al. (2016)
  • s0 is a fold-change fudge factor, not a multiplicity correction. Perseus and SAM derive an FDR for this curve by permutation; permutation is not implemented here, so the curve is used only as an additional effect-size requirement on top of BH

8. Significance Thresholding

  • A protein is called upregulated/downregulated only when it clears both:
    • padj <= --fdr (Benjamini-Hochberg)
    • the s0 curve
  • Default:
    • FDR = 0.05
    • s0 = 0.1

9. Visualization Outputs

  • PCA plot
  • Volcano plot (with s0 curve)
  • Imputation distribution comparison

Safety Rules

  • Local-first

    • No data upload without explicit user consent
  • Statistical caution

    • Statistical results should be interpreted with caution and not overinterpreted
    • Avoid drawing conclusions beyond what the data supports
  • Missing data assumptions

    • Imputation assumes missing values correspond to low abundance
    • May not hold in all experimental designs
  • Small sample limitations

    • t-test reliability depends on sufficient replicates
  • Reproducibility

    • All parameters and commands are logged
  • No hallucinated science

    • All methods are based on established proteomics workflows

Agent Boundary

This skill DOES:

  • Perform differential expression analysis on LFQ proteomics data
  • Handle MaxQuant and DIA-NN outputs
  • Generate statistical results and visualizations
  • Produce reproducible reports

This skill DOES NOT:

  • Process raw mass spectrometry data (e.g. RAW files)
  • Perform peptide identification or database search
  • Conduct pathway or functional enrichment analysis
  • Provide biological interpretation of results

Input Contract

Supported Input Formats

  1. MaxQuant proteinGroups.txt
  2. DIA-NN output (.tsv / .txt)

Metadata Requirements

  • .csv or .tsv
  • Must include:
    • sample_id
    • group

Supports:

  • raw names
  • full paths (e.g. /path/sample.raw)

Output Structure

proteomics_de_report/
├── report.md
├── figures/
│   ├── imputation_distribution.png
│   ├── pca.png
│   └── volcano.png
├── tables/
│   ├── imputed_proteinGroups.csv
│   └── de_results.csv
├── ro-crate-metadata.json
└── reproducibility/
    ├── commands.sh
    ├── environment.yml
    └── checksums.sha256

Usage

Demo

python proteomics_de.py \
  --demo \
  --output report_dir

MaxQuant Input

python proteomics_de.py \
  --input proteinGroups.txt \
  --input-type maxquant \
  --metadata metadata.csv \
  --contrast "treated,control" \
  --output report_dir

DIA-NN Input

python proteomics_de.py \
  --input diann_output.tsv \
  --input-type diann \
  --metadata metadata.csv \
  --contrast "treated,control" \
  --output report_dir

Parameters

Parameter Description Default
--input Input file path -
--input-type maxquant or diann maxquant
--metadata Metadata file -
--contrast treatment,control treated,control
--s0 s0 parameter 0.1
--fdr BH FDR threshold; also positions the s0 curve 0.05
--ttest-df Degrees of freedom 4
--imputation-shift Imputation shift 1.8
--imputation-scale Imputation scale 0.3
--output Output directory -

References

  • test_proteinGroups.txt is from: Keilhauer EC, Hein MY, Mann M. Accurate protein complex retrieval by affinity enrichment mass spectrometry (AE-MS) rather than affinity purification mass spectrometry (AP-MS). Mol Cell Proteomics. 2015 Jan;14(1):120-35. doi: 10.1074/mcp.M114.041012. Epub 2014 Nov 2. PMID: 25363814; PMCID: PMC4288248.
  • s0 correction algorithm is from: Giai Gianetto Q, Couté Y, Bruley C, Burger T. Uses and misuses of the fudge factor in quantitative discovery proteomics. Proteomics. 2016 Jul;16(14):1955-60. doi: 10.1002/pmic.201600132. PMID: 27272648.
  • s0 correction algorithm is cited by: Michaelis AC, Brunner AD, Zwiebel M, Meier F, Strauss MT, Bludau I, Mann M. The social and structural architecture of the yeast protein interactome. Nature. 2023 Dec;624(7990):192-200. doi: 10.1038/s41586-023-06739-5. Epub 2023 Nov 15. PMID: 37968396; PMCID: PMC10700138.

04 同仓库更多 Skills

stanfish06
stanfish06/skillquarium

zarr-python

Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3/GCS storage, and NumPy/Dask/Xarray integration. Use for array layout, bounded I/O, format migration, or scientific metadata preservation.

★ 12
stanfish06
stanfish06/skillquarium

yeet

Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.

★ 12
stanfish06
stanfish06/skillquarium

xarray

N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF/GRIB/Zarr files, climate/weather/oceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.

★ 12
stanfish06
stanfish06/skillquarium

writing-mstest-tests

Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for "review" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected/actual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext/lifecycle; timeout/cancellation; OS/CI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest/non-.NET code.

★ 12
stanfish06
stanfish06/skillquarium

wgs-prs

End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core/sarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti/Tv and Het/Hom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.

★ 12
stanfish06
stanfish06/skillquarium

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 12