Agent skill

Cibersort Immune Infiltration Analysis

by aipoch in aipoch/medical-research-skills

A skill your agent uses 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…

MITAuto-check passedResearch & Science

Install Cibersort Immune Infiltration Analysis

skills CLI
$ npx skills add aipoch/medical-research-skills --skill cibersort-immune-infiltration-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills cibersort-immune-infiltration-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'awesome-med-research-skills/Data Analysis/cibersort-immune-infiltration-analysis' .claude/skills/cibersort-immune-infiltration-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cibersort-immune-infiltration-analysis
GitHub stars
1.9k
Token cost
~2.6k tokens
SKILL.md length
1,057 words
Files
20 (incl. scripts, references)
Skills in repo
578
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses 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…

  • Works in 4 steps: Confirm that the expression matrix,… → Run scripts/main.R with the case and… → Review the full result table, derived… → …
  • Comparing one case group against one control group
  • SKILL.md covers When to Use, When Not to Use, Workflow and When to Read External Files, plus 7 more sections
  • Runs R scripts from its folder

What it does

Cibersort Immune Infiltration Analysis is an agent skill from aipoch/medical-research-skills. 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.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 23 other files, including scripts and reference files (for example `eval_report_cibersort-immune-infiltration-analysis_result.json`, `references/algorithm.md` and `references/cli-guide.md`).

It sits in Research & Science, covering Bioinformatics. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

When your agent uses it

  • Comparing one case group against one control group
  • Generating structured tables plus immune-fraction plots

Example prompts

  • “/cibersort-immune-infiltration-analysis”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Confirm that the expression matrix, group file, and signature matrix are available.
  2. Run scripts/main.R with the case and control groups.
  3. Review the full result table, derived summary tables, and optional plots.
  4. Inspect run_record.txt and output_manifest.txt after each run, including failed validation attempts.

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 11 files in scripts/ (R, from the files we listed), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cibersort Immune Infiltration Analysis loads about 2.6k tokens when it runs, and up to ~6.8k if it reads all its reference files. Until then it costs about 114 tokens; SKILL.md has 1,057 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~114
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 1,057 words, ~2,615 tokens.

Download SKILL.mdSave it as .claude/skills/cibersort-immune-infiltration-analysis/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
cibersort-immune-infiltration-analysis
description
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.
license
MIT
author
AIPOCH

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

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

  1. Confirm that the expression matrix, group file, and signature matrix are available.
  2. Run scripts/main.R with the case and control groups.
  3. Review the full result table, derived summary tables, and optional plots.
  4. Inspect run_record.txt and output_manifest.txt after each run, including failed validation attempts.

When to Read External Files

SituationFile to ReadPurpose
Need to run the analysisscripts/main.RCLI entry point
Need algorithm detailsreferences/algorithm.mdHQ reference workflow and result interpretation
Encounter an errorreferences/troubleshooting.mdError codes and environment fixes
Need CLI examples or the baseline recordreferences/cli-guide.mdExample commands and validation notes
Need packaged test inputstests/data/Demo expression matrix, group file, and LM22 file

Usage

bash
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

Arguments

ShortLongTypeDefaultDescription
-i--input_filefilerequiredExpression matrix with genes as rows and samples as columns
-g--group_filefilerequiredGroup annotation table
-a--case_groupstringrequiredCase group label
-b--control_groupstringrequiredControl group label
-o--output_dirdir./outputOutput directory
--signature_filefiletests/data/LM22.txt when presentSignature matrix file
--sample_colstring/intnoneOptional sample column name or 1-based index
--group_colstring/intnoneOptional group column name or 1-based index
--gene_id_casestringupperGene ID normalization: asis, upper, or lower
--auto_unlogbooleantrueApply 2^x only if the expression matrix passes a conservative log-scale heuristic
--min_mean_expressionnumeric1Minimum mean expression before deconvolution
--perminteger1000Permutation count for empirical p-value estimation; 0 keeps the run lightweight but records P-value as NA
--qnbooleantrueApply quantile normalization to the mixture matrix
--svm_coresinteger1Worker count for the nu-SVR model selection step
--make_plotsbooleantrueGenerate PDF plots
--plot_widthnumeric16Default plot width in inches
--plot_heightnumeric10Default plot height in inches
-s--seedinteger42Random seed
-t--timeout_secondsinteger0Optional timeout in seconds; 0 disables it
--verbosebooleantruePrint progress logs

Input Format

Expression Matrix

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

When --auto_unlog=true, the workflow reports summary statistics and applies 2^x only if the matrix passes a conservative log-scale heuristic. If the matrix is ambiguous, the values are left unchanged and the startup log explains why.

If duplicate gene identifiers are present, they are consolidated after gene-ID normalization by taking the per-sample maximum before downstream filtering and deconvolution.

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

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

csv
sample,group
Sample1,control
Sample2,treatment
Sample3,treatment
Signature Matrix

The packaged default is tests/data/LM22.txt. A custom signature matrix must contain one gene column followed by immune-cell signature columns.

All immune-cell signature columns must be numeric and finite. If duplicate gene identifiers are present, they are consolidated by taking the per-cell-type maximum before gene intersection.

Output Files

FileDescription
data/cibersort_input.rdsSerialized aligned input matrices used by the local algorithm
data/cibersort_null_distribution.rdsSerialized permutation null distribution
data/cibersort_result.rdsSerialized result object with cell fractions, metrics, runtime settings, and heatmap rendering metadata
table/CIBERSORT_Results.csvFull result table in CSV format
table/CIBERSORT-Results.txtFull result table in tab-delimited text format
table/cibersort_cell_fractions_wide.csvWide-format immune cell fraction table
table/cibersort_cell_fractions_long.csvLong-format immune cell fraction table
table/cibersort_group_compare.csvCase-vs-control comparison summary
table/cibersort_quality_metrics.csvSample-level P-value, Correlation, and RMSE table
table/immune_cell_correlation_matrix.csvSpearman correlation matrix across immune cell types
table/immune_cell_correlation_pvalue.csvP-value matrix aligned to the correlation matrix
plot/immune_cell_composition_sample.pdfSample-level stacked composition plot when --make_plots=true
plot/immune_group_boxplot.pdfGroup comparison boxplot when --make_plots=true
plot/immune_correlation_heatmap.pdfImmune-cell correlation heatmap when --make_plots=true
session_info.txtR session information
output_manifest.txtAppend-only output manifest for successful and failed runs
run_record.txtAppend-only structured run record, including runtime notes and failed-run summaries

When --make_plots=false, the plot/ directory may still exist as part of the standard output layout, but no PDF plot files are written.

When --perm=0, the workflow logs a warning and completes without empirical permutation testing, so the P-value column is recorded as NA.

When a rerun targets an existing --output_dir and then fails validation or execution, the previous successful payload is preserved and the failure is appended to run_record.txt and output_manifest.txt.

Show full SKILL.md (341 more words)Show less

Error Handling

Error CodeMeaningSolution
SKILL_FILE_NOT_FOUNDAn input file or signature matrix was not foundCheck the file path and rerun
SKILL_MISSING_COLUMNSA required column is missingFix the input schema
SKILL_EMPTY_DATANo usable genes, samples, or deconvolution outputs remainCheck the data, filtering, or signature overlap
SKILL_INVALID_PARAMETERA CLI parameter is missing or invalidReview the argument table and input values
SKILL_SAMPLE_MISMATCHExpression samples and group annotations do not alignHarmonize sample identifiers
SKILL_PACKAGE_NOT_FOUNDA required R package is missingInstall the missing package
SKILL_TIMEOUTThe configured time limit was exceededIncrease --timeout_seconds or set it to 0

If the error persists, READ: references/troubleshooting.md

Input Validation

This skill accepts:

  • A bulk expression matrix file in CSV or TSV format with one gene column and numeric sample columns.
  • A group annotation file in CSV or TSV format with one sample column and one group column.
  • Exactly one case group label and one control group label for comparison.
  • An optional custom signature matrix compatible with the documented LM22-style schema.

Do not use this skill for:

  • Single-cell RNA-seq, spatial transcriptomics, or cell clustering workflows.
  • Clinical diagnosis, treatment recommendation, or patient-level medical decision making.
  • Requests that need the hosted CIBERSORT web service rather than this local R implementation.
  • Multi-group study designs that require more than one case group versus one control group in a single run.

If the user's request is outside this scope, do not proceed with the workflow. Instead respond:

"cibersort-immune-infiltration-analysis is designed for local CIBERSORT-style immune deconvolution from a bulk expression matrix with one case group and one control group. Your request appears to be outside this scope. Please provide compatible bulk-expression inputs and group labels, or use a more appropriate tool for your task."

Testing

bash
Rscript scripts/main.R --help

Rscript tests/run_tests.R

Rscript tests/test_skill.R

Validated packaged test path:

bash
Rscript scripts/main.R \
  --input_file tests/data/expression_matrix.csv \
  --group_file tests/data/group_info.csv \
  --signature_file tests/data/LM22.txt \
  --case_group Tumor \
  --control_group Healthy \
  --output_dir tests/output \
  --perm 25 \
  --qn false \
  --svm_cores 1 \
  --seed 42

Container note:

  • The packaged test path uses --qn false because preprocessCore::normalize.quantiles() may trigger environment-level thread failures in some containers.
  • If you need a quantile-normalized run, validate that environment first and record the result in references/cli-guide.md.
  • tests/run_tests.R also checks that a failed rerun does not erase an existing successful payload directory.

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 19 other files (scripts, references) in awesome-med-research-skills/Data Analysis/cibersort-immune-infiltration-analysis of aipoch/medical-research-skills.

  • SKILL.md
  • eval_report_cibersort-immune-infiltration-analysis_result.json
  • references/algorithm.md
  • references/cli-guide.md
  • references/troubleshooting.md
  • scripts/cli_options.R
  • scripts/deconvolution.R
  • scripts/functions.R
  • scripts/io.R
  • scripts/main.R
  • scripts/recording.R
  • scripts/recording_helpers.R
  • scripts/recording_reports.R
  • scripts/run_analysis.R
  • scripts/utils.R
  • scripts/visualization.R
  • tests/data/LM22.txt
  • … and 3 more

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Cibersort Immune Infiltration Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cibersort Immune Infiltration Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cibersort Immune Infiltration Analysis this skillaipoch/medical-research-skills1.9k—~2.6kAutomated safety check: PassMIT
Alphagenome Single Variant Analysisgoogle-deepmind/science-skills3.2k2 repos~3kAutomated safety check: NotesApache-2.0
13C Metabolic Flux AnalysisK-Dense-AI/scientific-agent-skills48k1 repos~3.2kAutomated safety check: PassMIT
Clinvar Databasegoogle-deepmind/science-skills3.2k2 repos~3.9kAutomated safety check: NotesApache-2.0
Metabolic Study Planneraiming-lab/AutoResearchClaw15k—~1.9kAutomated safety check: PassMIT
Dbsnp Databasegoogle-deepmind/science-skills3.2k2 repos~3.4kAutomated safety check: NotesApache-2.0

Similar skills

  • Alphagenome Single Variant Analysis

    google-deepmind/science-skills

    Analyzes genetic variant effects on gene expression (RNA-seq), chromatin accessibility (DNASE), histone marks (ChIP), and transcription factors using the AlphaGenome API.

    3.2k GitHub starsUsed in 2 repos~3k tokens
    Research & ScienceAuto-check: notes
  • 13C Metabolic Flux Analysis

    K-Dense-AI/scientific-agent-skills

    Estimates reaction fluxes inside cells from steady-state carbon-13 labeling data with a bundled mfapy-based solver, and reports which fluxes the data pin down.

    48k GitHub starsUsed in 1 repo~3.2k tokens
    Research & ScienceAuto-check passed
  • Clinvar Database

    google-deepmind/science-skills

    A skill your agent uses when needing clinical significance, pathogenicity classifications (e.g., Pathogenic, Benign, VUS), clinical evidence rationales, or finding "hard positive" benchmark controls…

    3.2k GitHub starsUsed in 2 repos~3.9k tokens
    Research & ScienceAuto-check: notes
  • Metabolic Study Planner

    aiming-lab/AutoResearchClaw

    Turns a broad metabolic modelling topic into a concrete, paper-shaped plan with organism, model, perturbations, metrics and figures before any FBA code is written.

    15k GitHub stars~1.9k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed
  • Dbsnp Database

    google-deepmind/science-skills

    A skill your agent uses when you want to look up, map, and search for short genetic variants (SNPs, indels) in NCBI's dbSNP database.

    3.2k GitHub starsUsed in 2 repos~3.4k tokens
    Research & ScienceAuto-check: notes
  • MFA Pipeline Orchestrator

    aiming-lab/AutoResearchClaw

    Runs a metabolic flux analysis from model loading to phenotype prediction and figures by handing work to four sub-agents in sequence.

    15k GitHub stars~923 tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed

More from aipoch/medical-research-skills

All 578 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…

    1.9k GitHub stars~2.2k tokensUpdated 24 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    1.9k GitHub stars~1.4k tokensUpdated 24 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    1.9k GitHub stars~3.7k tokensUpdated 24 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    1.9k GitHub stars~1.8k tokensUpdated 24 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    1.9k GitHub stars~1.7k tokensUpdated 24 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    1.9k GitHub stars~1.3k tokensUpdated 24 days ago
    Auto-check passed

Questions about Cibersort Immune Infiltration Analysis

What does Cibersort Immune Infiltration Analysis do?

A skill your agent uses 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…. Cibersort Immune Infiltration Analysis is an agent skill from aipoch/medical-research-skills. 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.

When should I use Cibersort Immune Infiltration Analysis?

Cibersort Immune Infiltration Analysis fits situations like: comparing one case group against one control group; generating structured tables plus immune-fraction plots.

How do I install Cibersort Immune Infiltration Analysis in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill cibersort-immune-infiltration-analysis -a claude-code`. Or copy the skill folder (awesome-med-research-skills/Data Analysis/cibersort-immune-infiltration-analysis in aipoch/medical-research-skills) into .claude/skills/cibersort-immune-infiltration-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Cibersort Immune Infiltration Analysis in Codex?

Run `npx skills add aipoch/medical-research-skills --skill cibersort-immune-infiltration-analysis -a codex`. Or copy the skill folder (awesome-med-research-skills/Data Analysis/cibersort-immune-infiltration-analysis in aipoch/medical-research-skills) into .agents/skills/cibersort-immune-infiltration-analysis in your project. Codex loads it when a task matches its description.

Can I use Cibersort Immune Infiltration Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill cibersort-immune-infiltration-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cibersort-immune-infiltration-analysis, .gemini/skills/cibersort-immune-infiltration-analysis, .github/skills/cibersort-immune-infiltration-analysis and .opencode/skills/cibersort-immune-infiltration-analysis in your project.

What does Cibersort Immune Infiltration Analysis need to run?

Going by SKILL.md and its folder, Cibersort Immune Infiltration Analysis needs R for the scripts in its folder.

Does Cibersort Immune Infiltration Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cibersort Immune Infiltration Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Cibersort Immune Infiltration Analysis use?

Cibersort Immune Infiltration Analysis is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cibersort Immune Infiltration Analysis use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.2k tokens, read only when the agent opens those files.

What are the alternatives to Cibersort Immune Infiltration Analysis?

Skills that share tags, products or a category with Cibersort Immune Infiltration Analysis: Alphagenome Single Variant Analysis (google-deepmind/science-skills, 3.2k stars), 13C Metabolic Flux Analysis (K-Dense-AI/scientific-agent-skills, 48k stars), Clinvar Database (google-deepmind/science-skills, 3.2k stars) and Metabolic Study Planner (aiming-lab/AutoResearchClaw, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cibersort Immune Infiltration Analysis?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,937 GitHub stars. The repository holds 578 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.