zhanghao-njmu / SCP

An end-to-end Single-Cell Pipeline designed to facilitate comprehensive analysis and exploration of single-cell data.
https://zhanghao-njmu.github.io/SCP/
GNU General Public License v3.0
382 stars 82 forks source link

The plot size of the FeatureHeatmap function is incorrect. #249

Closed UnseenAnchor closed 3 months ago

UnseenAnchor commented 3 months ago
DEGs <- data2@tools$DEtest_cell_type $AllMarkers_wilcox
DEGs <- DEGs[with(DEGs, avg_log2FC > 1 & p_val_adj < 0.05), ]

data2 <- AnnotateFeatures(data2, species = "Mus_musculus", db = c("TF", "CSPA"))

ht <- FeatureHeatmap(
  srt = data2,
  group.by = "cell_type", 
  features = DEGs$gene, 
  feature_split = DEGs$group1,
  species = "Mus_musculus", 
  db = c("GO_BP", "KEGG", "WikiPathway"),  #c("GO_BP", "KEGG", "WikiPathway")
  anno_terms = TRUE,
  feature_annotation = c("TF", "CSPA"), 
  feature_annotation_palcolor = list(c("gold", "steelblue"), c("forestgreen")),
  libsize=1,
  width = 5, height = 4,
)
print(ht$plot)

image

Why is the plot I created using the code from the official website so different? and I only have six cell types .

UnseenAnchor commented 3 months ago

It‘s the limit of VScode,Rstudio is OK。