# Dummy expression data
gexp=matrix(rnorm(2600,sd=3),ncol=100)
gexp=rbind(gexp,do.call(rbind,lapply(1:26,function(i){
tf = sample(1:26,4)
return((gexp[tf[1],]+gexp[tf[2],] -gexp[tf[3],]-gexp[tf[4],] +rnorm(100,sd=0.5))/2)})))
dimnames(gexp)=list(c(letters,LETTERS),paste("s",1:100,sep=""))
## Simple example of network inference
dummyNet=hLICORN(gexp,TFlist = letters)
## Infer a network only on a subset of genes
subgene = unique(dummyNet@GRN$Target)[1:2]
dummyNet=hLICORN(gexp,TFlist = letters,GeneList=subgene)
## Discretize data based on a set of reference samples (here 10 first)
discexp = discretizeExpressionData(gexp,refSamples=1:10)
dummyNet=hLICORN(gexp,TFlist = letters,discreteExpression=discexp)
## The network can be queried using the following functions
# returns the hub regulators
regulators(dummyNet)
# get the regulators of a given gene
regulators(dummyNet,"A")
activators(dummyNet,"A")
targets(dummyNet)
targets(dummyNet,"b")
# or transformed into a data.frame
coregnetToDataframe(dummyNet)
Run the code above in your browser using DataLab