Dear all I have drug resistance profile of 100 bacterial genomes. The data is like
Antibiotic name ab1 ab2 ab3 ab4 ab5
genome1 S R S R S
genome2 R S S R
genome3 R S S R
I want to generate a R plot. the code for generating a R plot is like:
data <- read.csv("/Users/apple/Desktop/heatmap.csv", sep=",")
rnames <- data[,1]
mat_data <- data.matrix(data[,2:ncol(data)])
rownames(mat_data) <- rnames
my_palette <- colorRampPalette(c("red", "yellow", "green"))(n = 299)
col_breaks = c(seq(-1,0,length=100), # for red
+ seq(0,0.8,length=100), # for yellow
+ seq(0.81,1,length=100)) # for green
install.packages("gplots")
heatmap.2(mat_data,
+ main = "Drug Resistance profile",
+ notecol="red",
+ density.info="none",
+ trace="none",
+ margins = c(20,15),
+ col=my_palette,
+ dendogram="row",
+ Colv="NA")
but this code produces a very dense margin on rows labels. Can anyone tell me how to modify this plot to make it visualize to all. also tell me how can I change the color of the plot as well as is there other way to represent this data like how to represent data in a circular way in a heatmap.
Add the heatmap image so that we can actually see the issue
Please tell me how to upload pic in this forum