GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
384 stars 137 forks source link

plotMarkerHeatmap #649

Open l-magnificence opened 3 years ago

l-magnificence commented 3 years ago

When I run the code in tutorial data, I found the different heatmap whose marker genes in each cluster was not ordered?What happened? How can I draw the figure like in manual chapter 7.4?

markersGS <- getMarkerFeatures(
  ArchRProj = projHeme2, 
  useMatrix = "GeneScoreMatrix", 
  groupBy = "Clusters",
  bias = c("TSSEnrichment", "log10(nFrags)"),
  testMethod = "wilcoxon"
)
markerGenes  <- c(
  "CD34", #Early Progenitor
  "GATA1", #Erythroid
  "PAX5", "MS4A1", "EBF1", "MME", #B-Cell Trajectory
  "CD14", "CEBPB", "MPO", #Monocytes
  "IRF8", 
  "CD3D", "CD8A", "TBX21", "IL7R" #TCells
)
heatmapGS <- plotMarkerHeatmap(
  seMarker = markersGS, 
  cutOff = "FDR <= 0.01 & Log2FC >= 1.25", 
  labelMarkers = markerGenes,
  transpose = TRUE,
  binaryClusterRows = T, clusterCols = T 
)
ComplexHeatmap::draw(heatmapGS, heatmap_legend_side = "bot", annotation_legend_side = "bot")

image

boberrey commented 3 years ago

I've been having the same issue. It occurs regardless of which cluster flags are passed to plotMarkerHeatmap and seems to occur on both R 3.6 and 4.0.

rcorces commented 3 years ago

This is not a bug in ArchR. Perhaps the code in the manual is a little outdated though. Just use the row_order argument to ComplexHeatmap::draw to re-order your rows manually.

alekseybelikov commented 17 hours ago

same problem https://github.com/GreenleafLab/ArchR/issues/2222#issue-2605420201