Question: Error in the fsva function after setting "newdat" argument to NULL
2
gravatar for zicheng.hu
2.4 years ago by
zicheng.hu20
zicheng.hu20 wrote:

I ran the example code from the sva page : 

bioconductor.org/packages/release/bioc/vignettes/sva/inst/doc/sva.R

Everything works great. However, I got an error after I change the code in chunk 24 from 

fsvaobj = fsva(trainData,trainMod,trainSv,testData)

to 

fsvaobj = fsva(trainData,trainMod,trainSv,newdat=NULL)

Error message: Error in fsva(trainData, trainMod, trainSv, newdat = NULL) : object 'newV' not found

Why am I not allowed to set "newdat" argument to NULL here?  I want to clean the data using sva for clustering and PCA analysis, so I don't have test data. Can I only adjust the training data using fsva?

sva • 406 views
ADD COMMENTlink modified 2.2 years ago by victor.2wy0 • written 2.4 years ago by zicheng.hu20
Answer: Error in the fsva function after setting "newdat" argument to NULL
0
gravatar for victor.2wy
2.2 years ago by
victor.2wy0
victor.2wy0 wrote:

Did you ever figure this out?

I'm running into the same error.

ADD COMMENTlink written 2.2 years ago by victor.2wy0

I ended up using the  removeBatchEffect function from limma. 

SV = sva(expr,mod,mod0)
expr = removeBatchEffect(x=expr, batch=NULL, batch2=NULL, covariates=SV$sv)

ADD REPLYlink written 2.1 years ago by zicheng.hu20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 211 users visited in the last hour