#================Example Test Filter.gene================================================#
label1<-rep(0:1,each=5)
label2<-rep(0:1,each=5)
exp1<-cbind(matrix(rnorm(5*200),200,5),matrix(rnorm(5*200,2),200,5))
exp2<-cbind(matrix(rnorm(5*300),300,5),matrix(rnorm(5*300,1.5),300,5))
rownames(exp1)<-paste("g1",1:200,sep="_")
rownames(exp2)<-paste("g2",1:300,sep="_")
symbol1<-sample(paste("symbol_",1:20,sep=""),200,replace=TRUE)
symbol2<-sample(paste("symbol_",1:20,sep=""),300,replace=TRUE)
study1<-cbind(c(NA,symbol1),rbind(label1,exp1))
study2<-cbind(c(NA,symbol2),rbind(label2,exp2))
setwd(tempdir())
write.table(study1,"study1.txt",sep="t")
write.table(study2,"study2.txt",sep="t")
mydata<-MetaDE.Read(c("study1","study2"),via="txt",skip=c(2,1),log=FALSE)
mydata.matched<-MetaDE.match(mydata,"IQR")
mydata.Merged<-MetaDE.merge(mydata.matched)
mydata.filtered<-MetaDE.filter(mydata.Merged,DelPerc=c(0.1,0.2))
ind.res<-ind.analysis(mydata.filtered,ind.method=c("regt","regt"),tail="abs",nperm=10)
meta.res<-MetaDE.rawdata(mydata.filtered,ind.method=c("regt","regt"),meta.method="Fisher",ind.tail="abs",nperm=10,paired=rep(FALSE,2))
Run the code above in your browser using DataCamp Workspace