How to run combat-seq, strange output?
1
0
Entering edit mode
2.5 years ago
Maryam • 0

I ran the combat-seq for my data

The full program was executed, but its output is as follows

I checked the code several times and I do not know where the problem is

Can you help?

files <-list.files(".","*.count")
cnt <- lapply(files,read.delim,header=F)
cnt<- lapply(files,read.delim,header=F,stringsAsFactors=F)
cnt<-do.call(cbind,cnt)
cnt<- cnt[,-seq(1,ncol(cnt),2)]
colnames(cnt)<- sub(".count","",files)
batch<- samplerace
samplecondition <- factor(rep(c('control','control','fibrosis','fibrosis'),84))
covariate_matrix = cbind(group,samplegender)
cntcombat<-ComBat_seq(cnt,batch= batch,full_mod=TRUE,group=NULL, 
                      covar_mod = covariate_matrix)


 head(cntcombat)
[[1]]
[1] 50

[[2]]
[1] 11

[[3]]
   [1] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  [70] 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 [139] 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 [208] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
 [277] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 2 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
R batch-effect combat-seq • 1.7k views
ADD COMMENT
2
Entering edit mode
21 months ago
vicasze ▴ 20

This could be because class(cnt) is not "matrix" (it is e.g. "data.frame").

So you can do:

ComBat_seq(as.matrix(cnt),batch= batch,full_mod=TRUE,group=NULL, covar_mod = covariate_matrix)

Source: https://github.com/zhangyuqing/ComBat-seq/issues/21

ADD COMMENT

Login before adding your answer.

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