Entering edit mode
Suppose I have run deseq like this:
my_coldata$varA = factor(mycoldata$varA, levels=c('control', 'case')
my_coldata$varB = factor(mycoldata$varB, levels=c(0,1))
dds = DESeqDataSetFromMatrix(
countData=my_counts,
colData=my_coldata,
design=~varA + varB
)
deseq_obj = DESeq(
dds,
test='Wald',
fitType='mean'
)
I can access the metadata with colData(deseq_obj)
but it comes as a matrix with factor and level information wiped out. Is there a way to access this information?
Maybe a suggestion would be to switch to DataFrames since that is becoming ever more standard in the r-verse.
Thanks!
I have a plotting routine to which I'm passing
deseq_obj
, and I was hoping I might get the levels in there. Well gollee, it IS a DataFrame. I had tried to extract the levels from the output ofcolData
and thought I got an error and a matrix object. But as you said, it really is a DataFrame and has the levels. I can docolData(deseq_obj)$varA
and get the levels.