Message-ID: <1408867206928.76813@uni.sydney.edu.au>
Date: 2014-08-24T08:00:07Z
From: Dario Strbenac
Subject: [Bioc-devel] DESeqDataSetFromMatrix Changes Column Names
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