Image link https://ibb.co/zhHbMyL
I am using heatmap3 to create heatmap. I have 77 rows and 10 columns in reality but getting heatmap with only 38 rows with 10 columns. my code is as below
x <- Heatmap_data x y <- as.matrix(Heatmap_data) y class(x) class(y) library(heatmap3) nrow(y) ncol(y) heatmap3(y, Rowv = NULL, Colv = NULL, distfun = function(y) as.dist(1 - cor(t(y), use = "pa")), balanceColor = F, showColDendro = T, showRowDendro = F, col = colorRampPalette(c("white", "firebrick3"))(1024), method = "complete", ColAxisColors = 0, RowAxisColors = 0, hclustfun = hclust, reorderfun = function(d, w) reorder(d, w), symm = FALSE, scale = c("none"), ColSideWidth = 0.4, file = "heatmap3.pdf", topN = NA, filterFun = sd, returnDistMatrix = FALSE, margins = c(5, 5), cexRow = 0.2 + 1/log10(nrow(y)), cexCol = 0.2 + 1/log10(ncol(y)), lasRow = 2, lasCol = 2, labRow = NULL, labCol = NULL, main = NULL, xlab = NULL, ylab = NULL, keep.dendro = FALSE, verbose = getOption("verbose"), useRaster = if (ncol(y) * nrow(y) >= 50000) TRUE else FALSE)
my data (truncated) looks like below (10 columns & 77 rows). Values are protein identities.
ORFs Aspergillus_nidulans Batrachochytrium_dendrobatidis Bifiguratus_adelaidae Botrytis_cinerea
STRG.198.1 55 0 0 39.394
STRG.428.1 86.301 88.889 87.302 90.411
STRG.1138.5 69.231 56.338 0 64.368
Many programs that do this kind of analysis have an option to remove "flat" data points, which are rows where there is not much difference between samples. I don't use
R, but my guess is that
filterFun = sdcould be doing that. Even if that's not the case, looking into what rows are removed and what they have in common could help you figure this out.
How to add figures: How to add images to a Biostars post
are you trying to log transform values of 0?
I am not doing that, you can see how my data looks like in updated post. All numeric data is protein identity values and first column is gene names.
Do you see any errors or warnings?
I am not seeing any errors or warnings, simply the nice and beautiful output figure is popping up.
Please provide minimal dataset for reproducibility.
What do you mean by that ? are you saying to give my data to see how it looks or anything else you meant?
No, you don't have to share your data. I mean that