DESeq2 rlogTransformation error
1
0
Entering edit mode
helen.cwp • 0
@helencwp-13104
Last seen 7.5 years ago

Hello,

 

Can you please help me solve this issue?

I am flummoxed.

I have ran DESeq2 and have my count matrix and now want to rlogTransform to visualise the data on a PCA.

However I get the following error after simply trying to r transform the deseqReadsCount.

 

Code below, any help greatly appreciated!


ddsMF = DESeqDataSetFromMatrix(countData = counts, colData = colData, design = ~ type + condition)

## the formula of "design" defines the interested factor is "condition"
ddsMF$condition = relevel(ddsMF$condition, ref="72E8")
size_factors = estimateSizeFactorsForMatrix(normFactor.E8.72.E6.72)
sizeFactors(ddsMF) = size_factors
ddsMF <- DESeq(ddsMF,betaPrior = TRUE) ###added betPrior = true as suggested by Daniel gaffney
deseqResultMF <- results(ddsMF)

res <- results( ddsMF )
plotMA( res, ylim = c(-3, 3) )

ddsMF
write.csv( as.data.frame(res), file="Nottingham Combined_E8 72 E6 72_DESeq2results.csv" )

deseqNormFactor = sizeFactors(ddsMF)   ### get DESeq2 normalize factors
deseqReadsCount = counts(ddsMF, normalized=T)  ### get DESeq2 normalized reads counts

 

rld <- rlogTransformation(deseqReadsCount, blind=TRUE)

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘sizeFactors’ for signature ‘"matrix"’

 

deseq2 • 2.4k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 6 days ago
United States

You can check over the workflow:

http://www.bioconductor.org/help/workflows/rnaseqGene/#the-rlog-and-variance-stabilizing-transformations

Note that, in the workflow, we call rlog() on a 'dds' object, like so:

rld <- rlog(dds)

Above you are calling the function on a matrix. rlog() will take care of normalization of the counts for you.

ADD COMMENT

Login before adding your answer.

Traffic: 695 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6