一个GSE数据集,但是它有两个批次,我想去除批次效应
代码如下:
1. G24807=as.matrix(GSE24807)
1. rownames(G24807)=G24807[,1]
1. exp=G24807[,2:ncol(G24807)]
1. dimnames=list(rownames(exp),colnames(exp))
1. data=matrix(as.numeric(as.matrix(exp)),nrow = nrow(exp),dimnames = dimnames)
1. batchtype=c(rep(1,9),rep(2,8))
1. modtype=c(rep("HC",2),rep("NASH",7),rep("HC",3),rep("NASH",5))
1. mod=model.matrix(~as.factor(modtype))
1. outtable=ComBat(data,batchtype,mod,par.prior=TRUE)
运行outtable=......这一步时报错信息如下:
>outtable=ComBat(data,batchtype,mod,par.prior=TRUE)
1. Found2batches
1. Adjusting for1covariate(s) or covariate level(s)
1. Found1716Missing Data Values
1. Standardizing Data across genes
1. Error in solve.default(crossprod(des), crossprod(des, y1)) :
1. Lapack routine dgesv: system is exactly singular: U[1,1] = 0
不知道为什么出现这个错误,以及如何解决呢?