[Bioc-devel] DESeqDataSetFromMatrix Changes Column Names

Dario Strbenac dstr7320 at uni.sydney.edu.au
Sun Aug 24 10:00:07 CEST 2014


Hello,

I have a matrix with column names. When creating a DESeqDataSet, the resulting matrix has changed column names to numbers. This causes problems if trying to create an ExpressionSet with it, for example, after regularised logarithm transformation, because the sample names no longer agree.

exprMatrix <- matrix(c(rnbinom(50, 1/0.15, mu = 30), rnbinom(50, 1/0.15, mu = 10)), ncol = 10)
colnames(exprMatrix) <- LETTERS[1:10]
exampleDDS <- DESeqDataSetFromMatrix(exprMatrix, data.frame(class = rep(c("Poor", "Good"), each = 5)), formula(~ class))

groupsTable <- data.frame(class = rep(c("Poor", "Good"), each = 5))
rownames(groupsTable) <- LETTERS[1:10]
exampleSet <- ExpressionSet(counts(exampleDDS), AnnotatedDataFrame(groupsTable))
Error in validObject(.Object) : 
  invalid class “ExpressionSet” object: 1: sampleNames differ between assayData and phenoData
invalid class “ExpressionSet” object: 2: sampleNames differ between phenoData and protocolData

--------------------------------------
Dario Strbenac
PhD Student
University of Sydney
Camperdown NSW 2050
Australia



More information about the Bioc-devel mailing list