I am trying to do a heatmap using this pipeline:
http://bio.biomedicine.gu.se/~marcela/courses/2014/imbi/practicals/4-RNASeq.html
Everything works well except the "heatmap.2" graph
I think that it is a problem with the object: "sig2heatmap", that is generated by:
assay(rld)[rownames(assay(rld))%in%rownames(sig),] -> sig2heatmap
With this result:
sig2heatmap
RJF_AV163 RJF_AV170 RJF_AV171 RJF_AV176 RJF_C165 RJF_C167 RJF_C172
RJF_C174 RJF_C175 RJF_C178
When I try the command to generate the graph:
tiff("heatmap.2.tiff", units="in", width=11, height=8.5, res=600, compress="lzw")
heatmap.2( sig2heatmap, scale="row",
trace="none", dendrogram="column",
col = colorRampPalette( rev(brewer.pal(9, "RdBu")) )(255))
The follow error appear:
Error in heatmap.2(sig2heatmap, scale = "row", trace = "none", dendrogram = "column", :
`x' must have at least 2 rows and 2 columns
Follow my objects used in the command:
> head(assay(rld))
RJF_AV163 RJF_AV170 RJF_AV171 RJF_AV176 RJF_C165 RJF_C167 RJF_C172
[1,] 3.385057 1.812603 2.721344 3.452685 1.817673 1.816809 1.815895
...
RJF_C174 RJF_C175 RJF_C178
[1,] 1.817404 1.820117 1.813146
...
> rownames(assay(rld))
NULL
> rownames(sig)
NULL
> sig
log2 fold change (MAP): condition Ctrl vs AV
Wald test p-value: condition Ctrl vs AV
DataFrame with 37 rows and 6 columns
baseMean log2FoldChange lfcSE stat pvalue padj
<numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
1 89.09102 8.159865 1.443825 5.651562 1.589961e-08 5.126605e-07
... ... ... ... ... ... ...
Thank you