Quick, probably simple question that I can't find the answer to.
I'm using the BHC package. The paper associated with the package says that in addition to displaying the results as a dendrogram, it is possible to display the resulats as a heatmap using the package R heatmap command. It doesn't (that I can see), say how. Any attempt to put the dendrogram straight into heatmap, very rightly returns an error suggesting that x should be a numeric matrix. And if you search for information on dendrograms and heatmaps all the results are dominated by how to attach dendrograms to the side of your heatmap rather than generate one from a dendrogram. Which would be odd anyway, so I believe I am missing something somewhere in the bhc package. Anyone know what I'm doing?
In this case, candidates is a list of gene names that I am extracting from a larger frame of all genes. Plotting the dendrogram works fine.
rawCounts = read.table( datafile,sep=",", header=TRUE,row.names=1 , stringsAsFactors = FALSE )
timePoints <- 1:2 # for the time-course case
hc2 <- bhc(counts, candidates, 0, timePoints, "time-course", numReps=1, noiseMode=0, numThreads=10, verbose=TRUE)
Error in heatmap(hc2) : 'x' must be a numeric matrix