Entering edit mode
12 months ago
Chris
▴
340
Hi all,
I have difficulty to remove the gene label (black column on the right) after trying all the papameters. Would you please have a suggestion? Also I don't know how to show the sample name (4 samples in this case). I appreciate your help! The code is adapt from this post: Issues marking genes in ComplexHeatmap
genes_to_show <- c("CCN1")
mark_at = which(rownames(sigs.df) %in% genes_to_show)
ha = rowAnnotation(foo = anno_mark(at = which(rownames(sigs.df) %in% genes_to_show),
labels = rownames(sigs.df)[rownames(sigs.df)%in%genes_to_show]))
Heatmap(mat.z,
name = "Z-score - log2CPM",
col = circlize::colorRamp2(c(-2, 0, 2), c("blue", "black", "red")),
na_col = "grey",
cluster_rows = T,
cluster_columns = T,
right_annotation = ha,
row_names_max_width = unit(10,"in"),
row_title_gp = gpar(fontsize = 15),
column_title_gp = gpar(fontsize = 20),
column_names_gp = gpar(fontsize =10),
row_names_gp = gpar(fontsize =3),
show_column_names = T)
Thanks jared.andrews07! I could remove the row names with
show_row_names = FALSE
, however,show_column_names = TRUE
didn't show the column name. Would you please have a suggestion?Does your matrix have column names?