ArchR
ArchR copied to clipboard
plotMarkerHeatmap
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")

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.
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.
same problem https://github.com/GreenleafLab/ArchR/issues/2222#issue-2605420201