
Cibersort Immune Infiltration Analysis
Use when estimating relative immune cell infiltration from a bulk expression matrix...
Install
npx skills add aipoch/medical-research-skills --skill cibersort-immune-infiltration-analysis -g -a claude-code -y- Repository
- aipoch/medical-research-skills2k
- Category
- Engineering
- Updated
- 2mo ago
- License
- MIT
- Context cost
- Mediumabout 2,487 tokens
- Runs scripts
- No, instructions only
What it does
Use when estimating relative immune cell infiltration from a bulk expression matrix with a CIBERSORT-style nu-SVR deconvolution workflow based on an LM22 signature matrix, comparing one case group against one control group, and generating structured tables plus immune-fraction plots. NOT for single-cell RNA-seq, spatial data, clinical diagnosis, or workflows that require the original hosted CIBERSORT web service.
CIBERSORT Immune Infiltration Analysis
When to Use
- Estimate relative immune cell fractions from a bulk expression matrix.
- Compare one case group against one control group after deconvolution.
- Generate structured tables, a serialized result object, and optional PDF plots.
When Not to Use
- Single-cell RNA-seq, spatial transcriptomics, or clustering tasks.
- Absolute clinical interpretation or treatment recommendation.
- Workflows that require the original online CIBERSORT service instead of a local R implementation.
Workflow
- Confirm that the expression matrix, group file, and signature matrix are available.
- Run
scripts/main.Rwith the case and control groups. - Review the full result table, derived summary tables, and optional plots.
- Inspect
run_record.txtandoutput_manifest.txtafter each run, including failed validation attempts.
When to Read External Files
| Situation | File to Read | Purpose |
|---|---|---|
| Need to run the analysis | scripts/main.R | CLI entry point |
| Need algorithm details | references/algorithm.md | HQ reference workflow and result interpretation |
| Encounter an error | references/troubleshooting.md | Error codes and environment fixes |
| Need CLI examples or the baseline record | references/cli-guide.md | Example commands and validation notes |
| Need packaged test inputs | tests/data/ | Demo expression matrix, group file, and LM22 file |
Usage
Rscript scripts/main.R \
--input_file ./expression_matrix.csv \
--group_file ./group_info.csv \
--signature_file ./LM22.txt \
--case_group treatment \
--control_group control \
--output_dir ./output \
--qn false \
--seed 42
