acts=apply(matrix(rep(letters[1:4],7),nrow=2),2,paste,collapse=" ")[1:13]
reps=apply(matrix(rep(letters[5:8],7),nrow=2),2,paste,collapse=" ")[1:13]
grn=data.frame("Target"= LETTERS[1:26] ,"coact"=c(acts,reps),"corep"= c(reps,acts),"R2"=runif(26),stringsAsFactors=FALSE)
co=coregnet(grn)
samples= paste("S",1:100,sep="")
expression=matrix(rnorm(3400),ncol=100)
dimnames(expression) = list(c(grn$Target,names(regulators(co))),samples)
#Minimum number of targets is adjusted because of the small size of the network
TFA = regulatorInfluence(co,expression,minTarg=4)
Run the code above in your browser using DataLab