SVA package error message: Error in diag(dims[2]) - mod %*% solve(t(mod) %*% mod) %*% t(mod) : non-conformable arrays
0
0
Entering edit mode
Ying Chen ▴ 110
@ying-chen-4756
Last seen 9.6 years ago
Hi guys, I tried to use SVA package to identify number of batch factors in my gene expression dataset. But I ran into an error message: > library(sva) > load("myeset.RData") > pheno <- pData(myeset) > str(pheno) 'data.frame': 821 obs. of 4 variables: $ sample : Factor w/ 821 levels "A_837766__U133Plus2",..: 1 2 3 4 5 6 7 8 9 10 ... $ Source : Factor w/ 6 levels "C1","C2",..: 5 5 5 5 5 5 5 5 5 5 ... $ CancerType: Factor w/ 28 levels "Anus","Bladder",..: 10 14 14 10 10 14 14 14 11 14 ... $ Batch : Factor w/ 14 levels "20110909_U133Plus2",..: 1 1 1 1 1 1 1 1 1 1 ... > edata <- exprs(myeset) > str(edata) num [1:18960, 1:821] 4.98 4.95 8.29 4.21 2.9 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:18960] "100009676_at" "10000_at" "10001_at" "10002_at" ... ..$ : chr [1:821] "A_837766__U133Plus2" "A_937608__U133Plus2" "A_949340__U133Plus2" "A_949363__U133Plus2" ... > > mod <- model.matrix(~as.factor(CancerType), data=pheno) > mod0 ~ model.matrix(~1,data=pheno) mod0 ~ model.matrix(~1, data = pheno) > n.sv = num.sv(edata,mod,method="leek") Error in diag(dims[2]) - mod %*% solve(t(mod) %*% mod) %*% t(mod) : non-conformable arrays Any suggestion? Thanks a lot, Ying > traceback() 1: num.sv(edata, mod, method = "leek") > sessionInfo() R version 3.0.1 (2013-05-16) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252 attached base packages: [1] splines parallel stats graphics grDevices utils datasets methods base other attached packages: [1] pamr_1.54.1 survival_2.37-4 cluster_1.14.4 bladderbatch_1.0.5 sva_3.6.0 mgcv_1.7-24 corpcor_1.6.6 [8] Biobase_2.20.1 BiocGenerics_0.6.0 loaded via a namespace (and not attached): [1] grid_3.0.1 lattice_0.20-15 Matrix_1.0-12 nlme_3.1-110 tools_3.0.1 > Confidentiality Note:\ This e-mail, and any attachment t...{{dropped:14}}
sva sva • 3.9k views
ADD COMMENT
0
Entering edit mode

Hi Ying,

I remember I had the same issue with one of my datasets... were you able to find a way to solve this problem? You should have the same size for rows in you pheno data and columns in you expression matrix.

Cheers,

 

ADD REPLY

Login before adding your answer.

Traffic: 616 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