## load the libraries required
library(made4)
require(graphics)
library(cluster)
library(stats)
#### read data in from a comma-delimited file with header
array_data<-read.csv(“Overall_Outsidetreat_sort_top100.csv”,header=T, row.names=1, check.names=T)
## array_data is a data frame type
## rows are taxa_strings and columns are samples
# now transpose rows and columns
# array_data<-t(array_data)
## now rows are chips and columns are taxa
dim(array_data)
# returns the dimensions as nrow then ncol
# checks that transpose worked OK
pdf(file = “Overall_Outsidetreat_sort_top100.pdf”, width = 36,
height = 24, family = “Times”, fonts = NULL)
# jpeg(filename = “santosh_sigmoid_ss_top50stdev.jpg”, width = 2000, height = 2000,
# pointsize = 2, quality = 75, bg = “white”, res = NA)
## bmp(filename = “array_heatplot_with_dendrogram.bmp”, width = 2020, height = 2020,
## pointsize = 6, bg = “white”, res = NA)
heatplot<-heatplot(array_data, dend = TRUE, lowcol = “green”, highcol = “red”,
Colv = NULL, Rowv=NULL, scale = c(“row”), reorder = TRUE, par(cex = 0.5, cexRow = 0.2 + 1/log10(355), cex.lab = 5, cex.axis = 5, srt = 45,
mai = c(5, 5, 5, 5), lwd = 2, pty = s))
dev.off()
# plots a heat plot and dendrogram of array data
# using hierarchical clustering and average linkage method.
# write(heatplot$row, file = “top_100_reversed_gene_cluster_order.txt”, ncolumns = 1)
Recent Comments