Heatmap of diferent conditions
1
2
Entering edit mode
7.9 years ago

Dear, How can I make a heatmap of these data (Table)?

Sample Conditions GrowthX GrowthY GrowthZ GrowthW 2ugAg+ Metal -3.085.361 15.085.361 -15.085.361 15.785.361 2ugAg+ Metal -3.005.842 13.005.842 -13.005.842 13.705.842 2ugAg+ Metal -2.997.751 11.996.551 -11.996.551 11.796.551 1ugZn+ Metal -2.890.344 11.340.344 -11.340.344 11.740.344 1ugZn+ Metal -2.849.076 13.459.076 -13.459.076 13759076 1ugZn+ Metal -2.809.053 11.409.053 -11.409.053 1.709.053 Ampicilin10ug Antibiotics -11.809.053 11.809.053 -11.809.053 11.709.053 Ampicilin10ug Antibiotics -10.809.053 16.769.053 -16.769.053 16.969.053 Ampicilin20ug Antibiotics -6.809.053 15.781.053 -15.781.053 15.981.053 Ampicilin20ug Antibiotics -3.809.053 11673153 -11.673.153 11.973.153

Any suggestion is welcome Thanks. Leandro

Heatmap Fitness score • 2.0k views
ADD COMMENT
1
Entering edit mode

pheatmap package is one of the best. it will draw heatmap the same as the heatmap in the paper.

ADD REPLY
0
Entering edit mode

For example, in R:

x <- read.table("fitness.csv",sep=",", fill = TRUE)
x_matrix<-data.matrix(x)
row.names(x)

x_heatmap <-heatmap(x_matrix,col = cm.colors(256), scale="column")

But is not ok yet;

ADD REPLY
1
Entering edit mode

To get row and column labels, use the labRow and labCol options of heatmap(). For more complicated layouts, you should probably use one of the many alternatives e.g. heatmap.2, heatmap.3, heatmap.plus or aheatmap. You may find this post useful.

ADD REPLY
0
Entering edit mode
7.9 years ago

Dear, I managed to do the figure, sharing :

data <- read.csv2(file="result.csv", sep=";", dec=";") data rnames data[,1] rnames data <- read.csv2(file="result.csv", sep=";", dec=",") data mat_data <- data.matrix(data[,2:ncol(data)]) mat_data rownames(mat_data) <- rnames my_palette <- colorRampPalette(c("red", "yellow", "green"))(n = 299) col_breaks = c(seq(-1,0,length=100), seq(0,5,length=100), seq(5,15,length=100)) heatmap.2(mat_data, cellnote = mat_data, main = "results", notecol="black", density.info="none", key.xlab="valor" trace="none", margins =c(12,9), col=my_palette, dendrogram="row",Colv="NA")

Leandro.

ADD COMMENT

Login before adding your answer.

Traffic: 2722 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6