Complexheatmap row boxes or grids are not visible

143 views Asked by At

I would like to see each row like this looking distinct grid

Such as this this image

This is my code which im running

Heatmap(heat, col = col_fun,name="Z-score", 
        show_row_names = TRUE, show_column_names = TRUE, cluster_rows = FALSE,
        cluster_columns = FALSE, show_column_dend = TRUE, show_row_dend = FALSE,
        column_title="Samples",
        column_title_side="top",
        row_names_side="left",
        row_names_gp = grid::gpar(fontsize = 8),
        
        column_title_gp=gpar(fontsize=10, fontface="bold"),
        column_title_rot=0,
        column_names_gp = gpar(fontsize = 20, fontface="bold"),
        row_dend_reorder = TRUE, column_dend_reorder = TRUE, clustering_method_rows = "complete",
        clustering_method_columns = "ward.D2", width = unit(100, "mm")
        )


decorate_heatmap_body("Z-score", {
  
  grid.rect(gp = gpar(fill = "transparent", col = "black", lwd = 2))
  
})

I get something like this below image where apart from top few rows all looks like one big block. How do i make them look like each row a separate block.

My data used for the above plot

dput(heat)
structure(c(0.707106781186547, 0.707106781186547, -0.707106781186547, 
0.707106781186548, 0.707106781186548, -0.707106781186548, 0.707106781186548, 
-0.707106781186548, 0.707106781186547, -0.707106781186548, 0.707106781186548, 
-0.707106781186547, 0.707106781186547, 0.707106781186546, 0.707106781186547, 
0.707106781186547, 0.707106781186548, 0.707106781186548, 0.707106781186539, 
0.707106781186547, 0.707106781186546, 0.707106781186546, 0.707106781186548, 
0.707106781186547, 0.707106781186548, 0.707106781186548, 0.707106781186548, 
0.707106781186548, 0.707106781186547, -0.707106781186547, -0.707106781186547, 
0.707106781186547, -0.707106781186548, -0.707106781186548, 0.707106781186548, 
-0.707106781186548, 0.707106781186548, -0.707106781186547, 0.707106781186548, 
-0.707106781186548, 0.707106781186547, -0.707106781186547, -0.707106781186549, 
-0.707106781186547, -0.707106781186547, -0.707106781186548, -0.707106781186548, 
-0.707106781186556, -0.707106781186547, -0.707106781186549, -0.707106781186549, 
-0.707106781186548, -0.707106781186547, -0.707106781186548, -0.707106781186547, 
-0.707106781186548, -0.707106781186548, -0.707106781186548), .Dim = c(29L, 
2L), .Dimnames = list(c("ATP synthase subunit beta", "V-type proton ATPase subunit G, putative", 
"Vacuolar proton pump subunit B", "M17 leucyl aminopeptidase, putative", 
"H(+)-transporting two-sector ATPase", "L-lactate dehydrogenase", 
"Thioredoxin peroxidase 1", "Peroxiredoxin, putative", "Proteasome subunit alpha type-1, putative", 
"Proteasome subunit alpha type-2, putative", "Proteasome subunit alpha type-6, putative", 
"Proteasome subunit alpha type-5, putative", "Proteasome subunit beta type-7, putative", 
"Aminopeptidase P, putative", "Ras-related protein Rab-2, putative", 
"Protein phosphatase PPM2", "Protein phosphatase PPM8", "Kelch domain-containing protein, putative", 
"Plasmepsin IV", "Cytoadherence linked asexual protein, putative", 
"High molecular weight rhoptry protein 3, putative", "High molecular weight rhoptry protein 2", 
"Exported protein 1", "Exported protein 2", "Translocon component PTEX150", 
"Rhoptry neck protein 4", "Rhoptry associated adhesin, putative", 
"Rhoptry neck protein 6, putative", "Rhoptry neck protein 12"
), c("WT_Intensity", "AAT1_Intensity")), "`scaled:center`" = c(17.5323275756918, 
12.5879279763914, 7.5401414560253, 9.04624468845455, 8.56124374900428, 
19.6628733567755, 9.65500076513037, 15.7927947316372, 16.6030212709358, 
7.60569701604908, 8.56046802398039, 15.7666437893553, 5.23974867745572, 
14.0615197163815, 9.59489610029214, 7.78961966091922, 5.4857081174032, 
7.8005574871979, 21.9766899064477, 9.52031394237784, 17.8070206178665, 
17.0544410524523, 10.4575462036285, 16.9036711824594, 15.8482002898553, 
14.3776501925613, 8.99955981026985, 6.85652138529223, 8.43092140696476
), "`scaled:scale`" = c(0.535824438642248, 0.382830340883356, 
9.2491567469495, 11.3791083645849, 10.6932134582506, 5.14478947757017, 
12.2400194643969, 1.29280852741531, 0.64698164549907, 9.34186630902409, 
10.6921164174012, 1.80434443334261, 5.99591008071127, 0.80239530017384, 
3.16637672778425, 9.60197220782697, 6.34374925647869, 9.61744063009317, 
0.20290456563894, 12.0495435329873, 1.65362496030127, 1.43528282537116, 
13.3749901079416, 1.3729510404263, 1.01983825139877, 2.90545357044537, 
11.3130859766984, 8.28237197140834, 10.5089098346581))
> 

my image

Suggestion or help would be really appreciated.

0

There are 0 answers