Open kmpf opened 4 years ago
I have been following the manual for DESeq2. With slight modifications so her comes the "fixed" code:
sampleDists <- stats::dist(t(SummarizedExperiment::assay(vst.dds))) sampleDistMatrix <- as.matrix(sampleDists) rownames(sampleDistMatrix) <- labels(sampleDists) colnames(sampleDistMatrix) <- labels(sampleDists) # Note: pheatmap does not work properly with DataFrame S4Vectors anno.hm = as.data.frame(SummarizedExperiment::colData(dds)[,c("condition","type")]) pheatmap(sampleDistMatrix, clustering_distance_rows=sampleDists, clustering_distance_cols=sampleDists, annotation_col=anno.hm)
The code breaks if you remove the as.data.frame, that transforms the Formal class 'DataFrame' [package "S4Vectors"] into a normal data.frame.
as.data.frame
Formal class 'DataFrame' [package "S4Vectors"]
data.frame
If you want to call this a bug is up to you, but it was quit tedious to track down the problem. Cause the error message wasn't very helpful.
I have been following the manual for DESeq2. With slight modifications so her comes the "fixed" code:
The code breaks if you remove the
as.data.frame
, that transforms theFormal class 'DataFrame' [package "S4Vectors"]
into a normaldata.frame
.If you want to call this a bug is up to you, but it was quit tedious to track down the problem. Cause the error message wasn't very helpful.