跳到正文
cccskills
免费在 GitHub 公开

ssgsea-immune-infiltration-analysis

Estimate relative immune-cell enrichment from bulk RNA-seq expression data, compare scores between case and control groups, and prepare result tables and optional plots for review. It supports ssGSEA and GSVA workflows.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Use when estimating immune infiltration from bulk RNA-seq expression matrices with ssGSEA/GSVA, comparing case versus control groups, and generating downstream immune-score visualizations. NOT for single-cell RNA-seq, absolute cell proportion estimation, or clinical decision making.

实测评分 未实测

查看安装方法

适用场景

  • Compare immune enrichment scores in case and control samples
  • Create tables and plots from bulk RNA-seq data
  • Review correlations among immune-cell scores

包含的文件(17)

  • SKILL.md6.8 KB
  • eval_report_ssgsea-immune-infiltration-analysis_result.json13.3 KB
  • references/algorithm.md1.4 KB
  • references/cli-guide.md7.3 KB
  • references/troubleshooting.md2.2 KB
  • scripts/cli_options.R3.7 KB
  • scripts/functions.R3.6 KB
  • scripts/io.R5.2 KB
  • scripts/main.R1.5 KB
  • scripts/recording.R1023 B
  • scripts/run_analysis.R7.5 KB
  • scripts/utils.R2.8 KB
  • scripts/visualization.R4.1 KB
  • tests/data/expression_matrix.csv24.4 MB
  • tests/data/group_info.csv2.7 KB
  • tests/data/immune_gene_sets.csv27.6 KB
  • tests/run_tests.R3.8 KB

SKILL.md(原文)

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

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

ssGSEA Immune Infiltration Analysis

When to Use

  • Estimate relative immune infiltration from a bulk RNA-seq expression matrix.
  • Compare immune enrichment scores between one case group and one control group.
  • Generate structured result tables plus optional PDF visualizations for downstream review.

When Not to Use

  • Single-cell RNA-seq or spatial transcriptomics.
  • Absolute immune cell proportion estimation or deconvolution.
  • Clinical diagnosis, treatment recommendation, or any other medical decision making.

Workflow

  1. Confirm that the expression matrix, group file, and gene-set file match the documented schemas.
  2. Run scripts/main.R with the target case and control groups.
  3. Review run_record.txt, output_manifest.txt, and the generated tables or plots.
  4. If execution fails, read references/troubleshooting.md before retrying.

When to Read External Files

SituationFile to ReadPurpose
Need to run the analysisscripts/main.RCLI entry point
Need algorithm detailsreferences/algorithm.mdMethod assumptions and interpretation
Encounter an errorreferences/troubleshooting.mdError codes and fixes
Need CLI examples or baseline execution detailsreferences/cli-guide.mdExamples and recorded run details
Need dependency declarationsDESCRIPTIONPackage list and Bioconductor source note
Need test commandstests/run_tests.REnd-to-end test entry

Usage

Rscript scripts/main.R \
  --input_file ./expression_matrix.csv \
  --group_file ./group_info.csv \
  --gene_set ./immune_gene_sets.csv \
  --case_group treatment \
  --control_group control \
  --output_dir ./output \
  --method ssgsea \
  --seed 42

Validated path note:

  • ssgsea is the default validated path.
  • gsva is supported, but only with kernels validated in the local GSVA environment.
  • In the current audited environment, gsva with Gaussian completed successfully and is the documented baseline.

Arguments

ShortLongTypeDefaultDescription
-i--input_filefilerequiredExpression matrix with genes as rows and samples as columns
-g--group_filefilerequiredGroup annotation table
-e--gene_setfiletests/data/immune_gene_sets.csvImmune gene-set CSV
-a--case_groupstringrequiredCase group label
-b--control_groupstringrequiredControl group label
-o--output_dirdir./outputOutput directory
-m--methodstringssgseaGSVA method: ssgsea, gsva
-k--kcdfstringGaussianKernel mode: Gaussian, Poisson; Gaussian is the validated GSVA baseline
-n--min_szinteger2Minimum overlap genes per gene set
-x--max_szinteger10000Maximum genes per gene set
-p--parallel_szinteger2Requested parallel CPU count
-u--taunumeric0.25Tau parameter for ssGSEA
-d--mx_diffbooleantrueGSVA mx.diff switch
-c--gene_id_casestringupperGene ID normalization: asis, upper, lower
-s--seedinteger42Random seed
-t--timeout_secondsinteger0Optional timeout; 0 disables it
--sample_colstring/intnoneSample column name or 1-based index
--group_colstring/intnoneGroup column name or 1-based index
--make_plotsbooleantrueGenerate PDF plots
--verbosebooleantruePrint progress logs

Input Format

Expression Matrix

CSV or TSV. The first column must contain gene identifiers. Remaining columns are sample-level numeric expression values.

gene,Sample1,Sample2,Sample3
TP53,10.2,8.5,9.1
CXCL9,4.3,6.1,5.7

Group File

CSV or TSV with at least one sample column and one group column.

sample,group
Sample1,control
Sample2,treatment
Sample3,treatment

Gene Set File

CSV with gene and cell_type; immunity_class is optional.

gene,cell_type,immunity_class
CXCL9,Activated CD8 T cell,Adaptive
CD3D,Activated CD8 T cell,Adaptive

Output Files

FileDescription
data/ssgsea_list.rdsSerialized analysis result object
table/ssgsea_scores_long.csvLong-format immune infiltration scores
table/ssgsea_scores_wide.csvWide-format immune infiltration score matrix
table/ssgsea_group_compare.csvCase-vs-control comparison summary
table/immune_cell_correlation_matrix.csvImmune-cell Spearman correlation matrix
table/immune_cell_correlation_pvalue.csvCorrelation p-value matrix
plot/immune_cell_composition_sample.pdfSample-level composition plot; generated only when --make_plots=true
plot/immune_group_boxplot.pdfGroup comparison boxplot; generated only when --make_plots=true
plot/immune_correlation_heatmap.pdfImmune-cell correlation heatmap; generated only when --make_plots=true
plot/gene_immune_correlation_scatter_*.pdfAuto-selected gene-vs-cell scatter plot; generated only when --make_plots=true
run_record.txtStructured execution record
output_manifest.txtOutput file manifest with descriptions
session_info.txtR session information

Error Handling

ErrorCauseSolution
SKILL_FILE_NOT_FOUNDInput file path is invalidCheck file paths
SKILL_MISSING_COLUMNSRequired columns are absentFix the input schema
SKILL_EMPTY_DATANo usable rows, gene sets, or aligned samples remainCheck IDs and filters
SKILL_INVALID_PARAMETERCLI value is invalid or data is malformedReview arguments and file content
SKILL_SAMPLE_MISMATCHExpression and group samples do not alignHarmonize sample identifiers
SKILL_PACKAGE_NOT_FOUNDRequired R package is missingInstall the missing package
SKILL_TIMEOUTThe configured time limit was exceededIncrease --timeout_seconds or disable it with 0

Testing

Rscript scripts/main.R --help

Rscript tests/run_tests.R

Rscript tests/test_skill.R

tests/test_skill.R is self-contained: if expected outputs are absent, it first runs tests/run_tests.R and then validates both file presence and core result structure.

评价

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

评论

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

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

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

0 / 1000 字

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

同一仓库的技能

Condense an academic paper into a structured abstract of up to 250 words, organized by background, objective, methods, results, and conclusion. It aims to retain key quantitative findings and supports papers from several research fields; figures and charts are not interpreted.

中文简介正在准备中。当前显示英语简介。

  • Creating a concise abstract from a research paper
  • Summarizing empirical studies while retaining key statistics
  • Preparing structured summaries across multiple papers
aipoch/medical-research-skills19802026年9月17日 更新

Trim English academic abstracts to a target word count while preserving key findings, statistics, and the background-to-conclusion structure. Choose conservative, balanced, or aggressive compression, check word counts, and review the edited text for readability and accuracy.

中文简介正在准备中。当前显示英语简介。

  • Cutting an abstract to meet a journal word limit
  • Preparing a conference abstract with a strict word count
  • Checking an abstract's word count before submission
aipoch/medical-research-skills19802026年9月17日 更新

Refines long medical drafts, reports, or literature notes into formal, single-paragraph Chinese and English abstracts in an SCI journal style. It can place both abstracts in a Markdown report while keeping claims grounded in the source text.

中文简介正在准备中。当前显示英语简介。

  • Condensing a medical study report into bilingual abstracts
  • Preparing unstructured abstracts from literature notes
  • Creating a Markdown report with Chinese and English abstracts
aipoch/medical-research-skills19802026年9月17日 更新

Creates three to five concise English Highlights for journal submission from manuscript text or supported files. It adapts bullets to the article type, keeps each within 85 characters, and grounds every claim in the supplied source without inventing results.

中文简介正在准备中。当前显示英语简介。

  • Draft journal Highlights from an abstract or manuscript
  • Summarize a meta-analysis or review for submission
  • Extract key findings from a supported PDF or DOCX
aipoch/medical-research-skills19802026年9月17日 更新

Design comparative drug safety studies using FAERS, the FDA’s adverse event reporting database, within one defined safety area. The plan compares drugs or classes, lays out workload options and analysis steps, and distinguishes detected signals from conclusions the data cannot support.

中文简介正在准备中。当前显示英语简介。

  • Comparing drug classes within one adverse event area
  • Planning a FAERS study with active comparators
  • Adding declared subgroup or onset characterization
aipoch/medical-research-skills19802026年9月17日 更新

Predicts absorption, distribution, metabolism, and excretion properties for small molecules from their structures. Use the results to compare compounds, screen libraries, and review drug-likeness scores in structured outputs. Predictions support prioritization and need experimental validation.

中文简介正在准备中。当前显示英语简介。

  • Compare predicted ADME profiles for small-molecule candidates
  • Screen a compound library for drug-likeness
  • Rank candidates against target property ranges
aipoch/medical-research-skills19802026年9月17日 更新

查看 aipoch 的全部技能

报告此技能的问题