svaseq
svaseq copied to clipboard
Errors message: requiring numeric/complex matrix/vector arguments
Hi
Currently, I am trying to remove known batch effect using sva and BatchQC on express data: dds from DESeq2, suggested by Dr Jeffrey T. Leek (http://jtleek.com/genstats/inst/doc/02_13_batch-effects.html)
got two following error messages:
-
sva1 = sva(dds,mod,mod0,n.sv=2) Number of significant surrogate variables is: 2 Error in dat %% (Id - mod %% solve(t(mod) %% mod) %% t(mod)) : requires numeric/complex matrix/vector arguments 2)> batchQC(as.data.frame(dds),batch=batch, condition=condition,view_report=FALSE,interactive=FLASE) Error in as.vector(x) : no method for coercing this S4 class to a vector
Thanks a lot
Chen
Below is information for ref.
head(assay(dds)) IGF0005585.count.RF IGF0005588.count.RF IGF0005589.count.RF IGF0005590.count.RF IGF0005591.count.RF ENSG00000000003.14 4 5 3 2 2 ENSG00000000419.12 72 162 174 219 162 ENSG00000000457.13 185 330 315 303 299 ENSG00000000460.16 38 81 52 63 55 ENSG00000000938.12 231 1358 2381 1539 988 ENSG00000000971.15 47 51 66 49 216 mod (Intercept) conditionCtrl conditionInAct 1 1 0 0 2 1 0 0 3 1 0 0 4 1 0 0 5 1 0 0 6 1 0 0 mod0 (Intercept) 1 1 2 1 3 1 4 1 5 1
sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.6 (El Capitan)
locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] limma_3.30.2 reshape2_1.4.2 d3heatmap_0.6.1.1 ggvis_0.4.3
[5] pander_0.6.0 shiny_0.14.1 bladderbatch_1.12.0 BatchQC_1.2.0
[9] sva_3.22.0 genefilter_1.56.0 mgcv_1.8-15 nlme_3.1-128
try this sva1 = sva(as.matrix(dds),mod,mod0,n.sv=2)