#---example 1: Meta analysis of Differentially expressed genes between two classes----------#
# here I generate two pseudo datasets
label1<-rep(0:1,each=5)
label2<-rep(0:1,each=5)
exp1<-cbind(matrix(rnorm(5*20),20,5),matrix(rnorm(5*20,2),20,5))
exp2<-cbind(matrix(rnorm(5*20),20,5),matrix(rnorm(5*20,1.5),20,5))
#the input has to be arranged in lists
x<-list(list(exp1,label1),list(exp2,label2))
# start individual analysis for each dataset: here I used modt to generate p-values.
DEgene<-ind.analysis(x,ind.method=c("modt","modt"),tail="high",nperm=100)
#you don't have to use our ind.analysis for the analysis for individual study. you can input
#p-values to MetaDE.pvalue for meta analysis only. But the input has to be specified in the
# same format as the DEgene in the example above
#--then you can use meta analysis method to combine the above p-values:here I used the Fisher's method
MetaDE.pvalue(DEgene,meta.method='Fisher')
Run the code above in your browser using DataLab