proteomics-structural
Load when summarising cross-linking MS (XL-MS) results — intra/inter-protein link split, optional FDR filtering, distance-constraint validation against a per-crosslinker (DSS / BS3 / EDC / DSSO / DSBU) max distance. Skip when raw spectra are the input (run XlinkX / pLink / xiSEARCH first); no XL-MS experiment was performed.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 161
- Forks
- 27
01 前言 Front Matter
- name
- proteomics-structural
- tags
- [ "proteomics", "structural", "xl-ms", "crosslinking", "dss", "bs3", "dsso", "dsbu", "edc" ]
- trigger
- structural proteomics, cross-linking MS, XL-MS, XlinkX, pLink, xiSEARCH
- description
- Load when summarising cross-linking MS (XL-MS) results — intra/inter-protein link split, optional FDR filtering, distance-constraint validation against a per-crosslinker (DSS / BS3 / EDC / DSSO / DSBU) max distance. Skip when raw spectra are the input (run XlinkX / pLink / xiSEARCH first); no XL-MS experiment was performed.
02 资源文件 8
- 脚本_api.py3.5 KB
- 脚本examples/example_step.py533 B
- 参考文档references/methodology.md553 B
- 参考文档references/output_contract.md342 B
- 参考文档references/parameters.md280 B
- 脚本struct_proteomics.py5.8 KB
- 脚本tests/test_api.py2.0 KB
- 脚本tests/test_cli.py1.3 KB
03 SKILL.md 正文
proteomics-structural
When to use
The CLI defaults are DSS and fdr_threshold=0.05. DSS/BS3/DSSO/DSBU use 30 angstrom; EDC uses 20 angstrom. Use existing search-engine tables; this skill does not search raw spectra.
Use from a step
from skills._sdk.notebook import load_skill, write_output
library = load_skill('proteomics-structural')
data = library.demo_data(random_state=42)
result = library.analyse_crosslinks(data)
write_output(result, 'tables/crosslinks.csv')
For real data, use read_input and pass any read_table helper as reader=.
The executable examples/example_step.py also checks the result and writes a Figure.
API
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
analyse_crosslinks(data: pd.DataFrame, *, fdr_threshold: float=0.05, crosslinker: str='DSS') -> pd.DataFrame
Return filtered crosslinks with protein-pair and optional distance classifications.
:param data: Crosslink rows with protein_a and protein_b, optional fdr and distance_angstrom. :param fdr_threshold: CLI default 0.05; filters only when an fdr column is present. :param crosslinker: CLI default DSS; BS3, DSSO and DSBU use 30 A, EDC uses 20 A. :returns: New crosslink table; absent distance evidence remains unchecked in run_info. :raises ValueError: Protein identifiers, crosslinker or confidence threshold are invalid.
run_info(table: pd.DataFrame, *, keep: bool=True) -> dict
Read crosslink analysis diagnostics.
:param table: Output of analyse_crosslinks. :param keep: True preserves attrs; False removes diagnostics. :returns: A separate dictionary stating which optional checks ran. :raises TypeError: The input is not a DataFrame.
distance_figure(table: pd.DataFrame)
Plot measured crosslink distances.
:param table: Crosslinks containing distance_angstrom. :returns: A matplotlib Figure without writing files. :raises KeyError: distance_angstrom is absent.
demo_data(*, random_state: int=42) -> pd.DataFrame
Generate synthetic crosslink records in memory.
:param random_state: CLI seed 42; change for another simulation. :returns: Two hundred crosslinks with simulated distances and confidence. :raises ValueError: The seed is invalid.
<!-- api:end -->
Methods and parameters
The CLI defaults are DSS and fdr_threshold=0.05. DSS/BS3/DSSO/DSBU use 30 angstrom; EDC uses 20 angstrom.
Functions return new DataFrames. run_info(result) reads diagnostic attrs;
use keep=False before serialization when those attrs are not needed.
Gotchas
- analyse_crosslinks requires protein_a and protein_b. run_info records missing distance evidence as unchecked with null satisfaction counts, never 100% passed. FDR filtering requires an fdr column.
demo_datauses seed 42, matching the CLI; every demo is synthetic.run_infolives in DataFrame attrs and is not preserved by CSV serialization.
Inputs and outputs
The CLI reads CSV tables and writes:
- tables/crosslinks.csv
- tables/inter_protein_crosslinks.csv (when link_type exists; can be empty)
- report.md
- result.json
demo_crosslinks.csvis written only with--demo.
Functions return data and Figures without writing files. Steps own their outputs. Demo mode also writes its synthetic input when the original CLI used a file.
CLI
python skills/proteomics/proteomics-structural/struct_proteomics.py --demo --output /tmp/proteomics_structural
For real input replace --demo with --input <table>.
See also
references/methodology.mdreferences/parameters.mdreferences/output_contract.mdproteomics-data-importfor protein-table normalization;proteomics-defor comparisons.
Dependencies
numpy, pandas, matplotlib
04 同仓库更多 Skills
demo-skill
A fixture skill for the skill environment tests. Use it for nothing else.
fake-domains
Test fixture for the golden deployment in tests/entry. Load never; it has no script.
replace-me-skill
Load when copying this directory to bootstrap a new OmicsClaw skill. Skip when an existing skill already covers the request.
spatial-velocity
Load when estimating RNA velocity on a spatial AnnData with `layers["spliced"]` + `layers["unspliced"]` via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative). Skip when input lacks the spliced/unspliced layers (must be quantified upstream by velocyto / kb-python / STARsolo); non-spatial scRNA velocity (use sc-velocity).
spatial-trajectory
Load when inferring pseudotime / lineage trajectories on a preprocessed spatial AnnData via DPT (default — diffusion pseudotime), CellRank (terminal-state + fate-probability), or Palantir (waypoint branch probabilities). Skip when the data has spliced/unspliced layers and you want velocity-driven dynamics (use spatial-velocity); non-spatial scRNA pseudotime (use sc-pseudotime).
spatial-statistics
Load when running spatial autocorrelation / hotspot / co-occurrence / neighbourhood-enrichment / Ripley K stats on a clustered spatial AnnData via squidpy. Skip when ranking spatially variable genes (use spatial-genes); tissue domain detection (use spatial-domains).