AutoSkill deg-and-marker-gene-heatmap-with-viridis-col-clustering
Generates a publication-ready heatmap for differentially expressed genes (DEGs) or marker genes using viridis colormap, column-only hierarchical clustering, and Arial font — applicable to any normalized gene expression matrix with genes as rows and samples/subclusters as columns.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/Users/u39/deg-and-marker-gene-heatmap-with-viridis-col-clustering" ~/.claude/skills/ecnu-icalk-autoskill-deg-and-marker-gene-heatmap-with-viridis-col-clustering && rm -rf "$T"
manifest:
SkillBank/Users/u39/deg-and-marker-gene-heatmap-with-viridis-col-clustering/SKILL.mdsource content
deg-and-marker-gene-heatmap-with-viridis-col-clustering
Generates a publication-ready heatmap for differentially expressed genes (DEGs) or marker genes using viridis colormap, column-only hierarchical clustering, and Arial font — applicable to any normalized gene expression matrix with genes as rows and samples/subclusters as columns.
Prompt
Goal
Generate a seaborn-based heatmap for differentially expressed or marker genes, accepting a pandas DataFrame with genes as rows and samples/subclusters as columns.
Constraints & Style
- Use
exclusively; do not use RdBu_r, center, or any other colormap or symmetry setting.cmap="viridis" - Enable only column-wise hierarchical clustering: set
andcol_cluster=True
.row_cluster=False - Use Arial font for all text elements (title, axis labels, tick labels, colorbar label); enforce via
andplt.rcParams["font.sans-serif"] = ["Arial", "DejaVu Sans", "Liberation Sans"]
; explicitly annotate plot elements if seaborn does not inherit font settings.plt.rcParams["axes.unicode_minus"] = False - Apply row-wise z-score normalization (per gene) before plotting:
.df.T.apply(lambda x: (x - x.mean()) / x.std(ddof=0)).T - Use
inrobust=True
for outlier resilience.sns.heatmap - Set
andlinewidths=0.3
for subtle cell borders.linecolor='lightgray' - Set figure size to
; include colorbar labeled "Z-score" with shrink=0.6.(8, 10) - Title: "Differentially Expressed Genes (Z-score normalized)" or "Marker Genes (Z-score normalized)" (bold, 14pt); adapt label based on context but retain consistent phrasing.
- Axis labels: "Samples" or "Subclusters" (x), "Genes" (y); no rotation of tick labels.
- Call
beforeplt.tight_layout()
; ensure no clipping.plt.show()
Workflow
- Accept input DataFrame with gene-indexed rows and sample/subcluster-labeled columns.
- Apply row-wise z-score normalization.
- Configure matplotlib font settings for Arial compatibility.
- Generate heatmap with specified clustering, colormap, robust scaling, layout, and labeling.
- Display the plot.
Triggers
- 生成差异表达基因热图
- 画DEG热图
- 单细胞亚群标志基因热图
- scRNA-seq marker gene heatmap
- viridis列聚类热图