rnaseq-differential-expression
Statistical differential expression analysis using DESeq2 or edgeR in R, with support for count matrix or tximport input.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- rnaseq-differential-expression
- description
- Statistical differential expression analysis using DESeq2 or edgeR in R, with support for count matrix or tximport input.
02 资源文件 11
- 参考文档agents/claude.yaml311 B
- 参考文档agents/openai.yaml312 B
- 参考文档agents/README.md322 B
- 资产文件assets/.gitkeep—
- 参考文档config.yaml317 B
- 参考文档references/deseq2-edger.md4.6 KB
- 参考文档references/README.md68 B
- 脚本scripts/batch_run.sh5.9 KB
- 脚本scripts/run_deseq2.R10.3 KB
- 脚本scripts/run_edger.R11.3 KB
- 脚本scripts/run.sh4.5 KB
03 SKILL.md 正文
Skill: RNA-seq Differential Expression
Use When
- User has a count matrix or transcript quantification and wants to find differentially expressed genes
- User wants to perform statistical DE testing with proper normalization
- User needs volcano plots, MA plots, PCA, and heatmaps
- User wants to compare DESeq2 vs edgeR results
Inputs
- Required:
- Count matrix (TSV with gene IDs as rows, samples as columns) OR Salmon/kallisto quantification directories plus a tx2gene mapping file
- Sample metadata (TSV with columns: sample_id, condition, and optionally batch)
- Optional:
- Tool choice:
deseq2oredger(default:deseq2) - Contrast: condition levels to compare (e.g.,
treated,control) - FDR threshold (default:
0.05) - log2 fold-change threshold (default:
1) - Output directory (default:
./de_output)
- Tool choice:
Workflow
- Read count matrix or import transcript-level estimates via tximport.
- Read sample metadata and validate that sample IDs match between counts and metadata.
- Build design formula (
~ condition, or~ batch + conditionif batch column is provided). - If DESeq2: create
DESeqDataSetFromMatrix(orDESeqDataSetFromTximport), runDESeq(), extractresults(). - If edgeR: create
DGEList,calcNormFactors,estimateDisp,glmQLFit,glmQLFTest. - Extract results: gene ID, log2 fold-change, p-value, adjusted p-value, baseMean (DESeq2) or logCPM (edgeR).
- Generate plots: PCA of samples, volcano plot, MA plot, heatmap of top DE genes.
- Write results table sorted by adjusted p-value.
- Report: total genes tested, number significant (up-regulated and down-regulated), summary of top hits.
Output Contract
- DE results table (TSV): gene_id, log2FoldChange, pvalue, padj, baseMean/logCPM
- PCA plot (PDF)
- Volcano plot (PDF)
- MA plot (PDF)
- Heatmap of top DE genes (PDF)
- Normalized count matrix (TSV)
- R session info (text file)
Limits
- Requires R with DESeq2 or edgeR installed (Bioconductor packages).
- Minimum 3 biological replicates per condition recommended for reliable statistics.
- Not suitable for single-cell RNA-seq without modifications.
- Python alternative: PyDESeq2 for DESeq2-equivalent analysis.
- Common failure cases: sample ID mismatch between counts and metadata, too few replicates, incorrect contrast specification.
04 同仓库更多 Skills
structured-intelligence-skill-creator
Create or update repository skills that conform to local templates, provider metadata requirements, registry rules, and validation workflows.
stat-survival-analysis
Estimate and compare survival functions using Kaplan-Meier curves and log-rank test, with optional Cox proportional hazards regression.
stat-pca
Perform PCA on a numeric data matrix to reduce dimensionality, visualize sample structure, and identify top contributing features.
stat-pairwise-correlation
Compute pairwise correlations and significance tests across all numeric variables, and produce a correlation heatmap.
stat-nonlinear-embedding
Embed high-dimensional data into 2D using t-SNE or UMAP for exploratory visualization of sample or cell relationships.
stat-logistic-regression
Fit a logistic regression model for binary outcomes, report odds ratios and model performance (AUC-ROC, confusion matrix).