[BioC] EdgeR estimateTagwiseDisp()
Gordon K Smyth
smyth at wehi.EDU.AU
Sun Dec 16 00:22:36 CET 2012
> Date: Fri, 14 Dec 2012 05:21:54 -0800 (PST)
> From: "Jetse [guest]" <guest at bioconductor.org>
> To: bioconductor at r-project.org, j.jacobi at hubrecht.eu
> Subject: [BioC] EdgeR estimateTagwiseDisp()
>
> I want to use edgeR to detect differential expression.
...
> Then I create a table of raw counts by using this command:
> rawCountTable <- data.frame(polyPlus=polyPlusCounts, polyMin=polyMinCounts)
>
> Then I follow the tutorial from: http://cgrlucb.wikispaces.com/edgeR+Tutorial
> So to build the edgeR object, I have this code:
> y <- DGEList(counts=rawCountTable, group=groups)
> y <- calcNormFactors(y)
> y <- estimateCommonDisp(y)
> y <- estimateTagwiseDisp(y)
>
> When executing this last function, I get this error:
> Error in t.default(object$counts) : argument is not a matrix
>
> When I use check the object$counts with class(y$counts), this is a matrix!
> What am I doing wrong now?
Well, you are not giving a reproducible example. The following R session,
which can be run by anyone, shows that the commands you give above work
fine.
Best wishes
Gordon
---- example R session -----
> library(edgeR)
> polyPlusCounts <- matrix(rpois(1000*2,lambda=20),1000,2)
> polyMinCounts <- matrix(rpois(1000*2,lambda=20),1000,2)
> rawCountTable<- data.frame(polyPlus=polyPlusCounts,
polyMin=polyMinCounts)
> groups <- c(1,1,2,2)
> y <- DGEList(counts=rawCountTable, group=groups)
Calculating library sizes from column totals.
> y <- calcNormFactors(y)
> y <- estimateCommonDisp(y)
> y <- estimateTagwiseDisp(y)
> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] edgeR_3.0.7 limma_3.14.3
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
More information about the Bioconductor
mailing list