]> git.donarmstrong.com Git - rsem.git/blob - EBSeq/R/GetPatterns.R
Included EBSeq for downstream differential expression analysis
[rsem.git] / EBSeq / R / GetPatterns.R
1 GetPatterns<-function(Conditions){
2     if(!is.factor(Conditions))Conditions=as.factor(Conditions)
3         NumCond=nlevels(Conditions)
4         CondLevels=levels(Conditions)
5     #library(blockmodeling)
6     AllPartiList=sapply(1:NumCond,function(i)nkpartitions(NumCond,i))
7     AllParti=do.call(rbind,AllPartiList)
8         colnames(AllParti)=CondLevels
9         rownames(AllParti)=paste("Pattern",1:nrow(AllParti),sep="")
10         AllParti
11
12 }