跳到正文
cccskills
免费在 GitHub 公开

ppi-network-analysis

Use when you need a standardized R CLI workflow to build a protein-protein interaction network from a local gene list and an offline STRING cache, export node and edge tables, and render a reproducible PDF network plot. NOT for online API fetching, arbitrary graph databases, multi-omics integration, or non-STRING interaction sources.

中文简介正在准备中。当前显示原文说明。

集成工具Excel

实测评分 未实测

查看安装方法

包含的文件(27)

  • SKILL.md8.8 KB
  • eval_report_ppi-network-analysis_result.json17.2 KB
  • references/algorithm.md8.2 KB
  • references/cli-guide.md8.1 KB
  • references/string_cache/10090.protein.aliases.v11.5.txt.gz13.0 MB
  • references/string_cache/10090.protein.info.v11.5.txt.gz1.8 MB
  • references/string_cache/10090.protein.links.v11.5.txt.gz80.7 MB
  • references/string_cache/9606.protein.aliases.v11.5.txt.gz20.7 MB
  • references/string_cache/9606.protein.info.v11.5.txt.gz1.8 MB
  • references/string_cache/9606.protein.links.v11.5.txt.gz69.3 MB
  • references/troubleshooting.md4.2 KB
  • scripts/cli_options.R86 B
  • scripts/core_option_groups.R1.7 KB
  • scripts/functions.R2.7 KB
  • scripts/io.R3.3 KB
  • scripts/main.R2.0 KB
  • scripts/option_validation.R3.1 KB
  • scripts/path_utils.R2.6 KB
  • scripts/plot_option_groups.R3.9 KB
  • scripts/recording.R173 B
  • scripts/run_analysis.R1.7 KB
  • scripts/string_cache.R5.0 KB
  • scripts/utils.R1.0 KB
  • scripts/validation_utils.R1.2 KB
  • scripts/visualization.R5.6 KB
  • tests/data/gene_list.csv48 B
  • tests/run_tests.R347 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Source: https://github.com/aipoch/medical-research-skills

PPI Network Analysis

When to Read External Files

SituationFile to ReadPurpose
Need algorithm detailsreferences/algorithm.mdExplain local STRING mapping, interaction filtering, network metrics, and plot interpretation
Need to execute the analysisscripts/main.RRun the CLI entry point with a complete Rscript command
Encounter an errorreferences/troubleshooting.mdMap standardized error codes to causes and fixes
Need CLI examples or baseline usagereferences/cli-guide.mdReview installation notes, offline cache requirements, and runnable examples
Need a runnable smoke testtests/data/Use the bundled small gene list for verification

Usage

Rscript scripts/main.R \
  --genelist_file ./input/gene_list.csv \
  --species human \
  --threshold 700 \
  --output_dir output/basic-run \
  --seed 42 \
  --timeout_seconds 600
Rscript scripts/main.R \
  --plot_only TRUE \
  --output_dir output/basic-run \
  --seed 42 \
  --timeout_seconds 600

Arguments

ShortLongTypeDefaultRequiredDescription
-g--genelist_filecharacternoneyes, unless --plot_only TRUEGene list file in CSV, TSV, TXT, or XLSX format
-s--speciescharacternoneyes, unless --plot_only TRUESpecies: human, mouse, 9606, or 10090
-t--thresholdintegernoneyes, unless --plot_only TRUESTRING combined-score threshold from 400 to 1000
-o--output_dircharacteroutputnoOutput directory inside the skill root
-p--plot_onlylogicalFALSEnoReuse output_dir/data/ppi_result.rds and regenerate the network plot
-d--seedinteger42noRandom seed used for layout reproducibility
-u--timeout_secondsinteger600noElapsed time limit in seconds
--string_cache_dircharacterreferences/string_cachenoLocal STRING cache directory; if omitted, the bundled cache inside the skill is used
--string_versioncharacterautonoPreferred STRING cache version; use auto, v11.5, or v12.0 when available
--figure_familycharactersansnoPDF font family: sans, serif, or mono
--figure_widthnumeric12noPlot width in inches
--figure_heightnumeric10noPlot height in inches
--labelcharacternodenoLabel mode: node or none
--label_sizenumeric0.8noLabel size
--label_colorcharacterblacknoLabel color
--label_distnumeric0noLabel distance from the node center
--line_alphanumeric1noEdge alpha
--line_colorcharacterbuilt-in palettenoComma-separated edge colors
--line_sizenumeric0.8noBase edge width
--line_typecharactersolidnoEdge line type; supported values in plotting are solid, dashed, or dotted
--mapping_link_alphacharactervaluenoMap edge alpha from interaction score: value or none
--mapping_link_colorcharactervaluenoMap edge color from interaction score: value or none
--mapping_link_sizecharactervaluenoMap edge width from interaction score: value or none
--mapping_node_alphacharacternonenoMap node alpha from degree: value or none
--mapping_node_colorcharacternonenoMap node color from degree: value or none
--mapping_node_sizecharactervaluenoMap node size from degree: value or none
--point_alphanumeric1noNode alpha
--point_colorcharacterbuilt-in palettenoComma-separated node border colors
--point_fillcharacterbuilt-in palettenoComma-separated node fill colors
--point_shapecharactercirclenoNode shape: circle or square
--point_sizenumeric12noBase node size
--style_layoutcharacternicelynoLayout style: kk, fr, nicely, circle, star, grid, or randomly
--style_linecharacterstraightnoEdge style: straight or curve
--theme_sizenumeric0.8noTheme size placeholder retained for compatibility
--titlecharacteremptynoMain plot title

Input Format

Supported input types

--genelist_file accepts the following formats:

  • .csv
  • .tsv
  • .txt
  • .xlsx

Gene list parsing rules

  • Plain-text .txt files can be provided as one gene symbol per line without a header.
  • For .csv, .tsv, and .xlsx, the tool automatically selects a likely gene column.
  • Preferred column names include: gene, genes, genename, genesymbol, symbol, hgnc, hgncsymbol, mgi, ensembl, ensemblgeneid, geneid, and id.
  • If no standard gene column name is found, the tool falls back to the column with the strongest non-numeric signal.
  • Values may contain multiple genes separated by commas, semicolons, pipes, tabs, or spaces; these are split automatically.
  • Empty inputs, unsupported file extensions, or inputs with no parsable genes will raise a SKILL_EMPTY_DATA or SKILL_INVALID_PARAMETER error.

Minimal examples

TXT example

TP53
EGFR
BRCA1
MYC

CSV example

gene
TP53
EGFR
BRCA1
MYC

Output Files

FileFormatDescription
data/ppi_result.rdsRDSSerialized PPI bundle with mappings, interactions, nodes, summary, and metadata
table/ppi_network_edges.xlsxXLSXEdge table with from, to, and combined_score
table/ppi_network_nodes.xlsxXLSXNode table with gene, degree, betweenness, and closeness
table/ppi_summary.csvCSVSummary metrics for input genes, mapped genes, unmapped genes, nodes, edges, and threshold
plot/ppi_network_plot.pdfPDFRendered PPI network plot from the local STRING interaction graph
session_info.txtTXTR version, platform, and package version information

Error Handling

Error CodeMeaningHow to Fix
SKILL_FILE_NOT_FOUNDInput gene list, STRING cache directory, required cache files, or data/ppi_result.rds in plot-only mode was not foundConfirm the path exists, required cache files are present, and run a full analysis before --plot_only TRUE
SKILL_EMPTY_DATANo valid genes were parsed, no genes mapped to STRING, fewer than two mapped STRING IDs remained, no interactions passed filtering, or the interaction table was empty for plottingCheck that the input is not empty, verify gene symbols are supported by the local STRING cache, and lower the threshold if the network is too sparse
SKILL_INVALID_PARAMETERA required argument is missing, a numeric value is out of range, an unsupported choice was supplied, the output path is invalid, or the input extension is unsupportedRecheck the parameter value and allowed choices, especially --species, --threshold, mapping options, plot options, and output paths
SKILL_MISSING_COLUMNSRequired columns were not found in a STRING cache tableConfirm the local aliases, info, and links files are valid STRING cache files with expected columns
SKILL_PACKAGE_NOT_FOUNDRequired R packages are not installedInstall the missing packages listed in the error message before rerunning

Detailed fixes and troubleshooting steps: READ references/troubleshooting.md

Testing

Smoke test with bundled data

Rscript scripts/main.R \
  --genelist_file tests/data/gene_list.csv \
  --species human \
  --threshold 700 \
  --output_dir tests/output/basic-run

Plot-only regeneration test

Rscript scripts/main.R \
  --plot_only TRUE \
  --output_dir tests/output/basic-run \
  --seed 42

Expected outputs after test

  • tests/output/basic-run/data/ppi_result.rds
  • tests/output/basic-run/table/ppi_network_edges.xlsx
  • tests/output/basic-run/table/ppi_network_nodes.xlsx
  • tests/output/basic-run/table/ppi_summary.csv
  • tests/output/basic-run/plot/ppi_network_plot.pdf
  • tests/output/basic-run/session_info.txt

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Transform lengthy academic papers into concise, structured 250-word abstracts.

中文简介正在准备中。当前显示原文说明。

aipoch/medical-research-skills19892026年9月17日 更新

Precision editing tool that reduces abstract word count through intelligent compression techniques, maintaining scientific rigor while meeting strict journal and conference requirements.

中文简介正在准备中。当前显示原文说明。

aipoch/medical-research-skills19892026年9月17日 更新

Refines long medical academic texts into SCI-style unstructured Chinese and English abstracts; use when you need to condense drafts/reports/summaries into bilingual abstracts and generate Summary_Report.md.

中文简介正在准备中。当前显示原文说明。

aipoch/medical-research-skills19892026年9月17日 更新

Generates submission-ready Elsevier/SCI Highlights from manuscript text or extracted PDF/DOCX/TXT content. Use when a user needs 3-5 concise, evidence-grounded highlight bullets for a research paper, review, meta-analysis, case report, or bioinformatics manuscript.

中文简介正在准备中。当前显示原文说明。

aipoch/medical-research-skills19892026年9月17日 更新

Generates complete FAERS pharmacovigilance study designs for multi-drug or class-level safety comparison inside one predefined SOC or AE family using active comparators, disproportionality analysis, subgroup characterization, and reviewer-facing evidence control.

中文简介正在准备中。当前显示原文说明。

aipoch/medical-research-skills19892026年9月17日 更新

Analyze data with `adme-property-predictor` using a reproducible workflow, explicit validation, and structured outputs for review-ready interpretation.

中文简介正在准备中。当前显示原文说明。

aipoch/medical-research-skills19892026年9月17日 更新

查看 aipoch 的全部技能

报告此技能的问题