inst/doc/GENIE3.R

## -----------------------------------------------------------------------------
exprMatr <- matrix(sample(1:10, 100, replace=TRUE), nrow=20)
rownames(exprMatr) <- paste("Gene", 1:20, sep="")
colnames(exprMatr) <- paste("Sample", 1:5, sep="")
head(exprMatr)

## -----------------------------------------------------------------------------
library(GENIE3)
set.seed(123) # For reproducibility of results
weightMat <- GENIE3(exprMatr)

## -----------------------------------------------------------------------------
dim(weightMat)
weightMat[1:5,1:5]

## -----------------------------------------------------------------------------
# Genes that are used as candidate regulators
regulators <- c(2, 4, 7)
# Or alternatively:
regulators <- c("Gene2", "Gene4", "Gene7")
weightMat <- GENIE3(exprMatr, regulators=regulators)

## ----eval=FALSE---------------------------------------------------------------
#  # Use Extra-Trees (ET) method
#  # 7 randomly chosen candidate regulators at each node of a tree
#  # 5 trees per ensemble
#  weightMat <- GENIE3(exprMatr, treeMethod="ET", K=7, nTrees=50)

## ----eval=FALSE---------------------------------------------------------------
#  set.seed(123) # For reproducibility of results
#  weightMat <- GENIE3(exprMatr, nCores=4, verbose=TRUE)

## -----------------------------------------------------------------------------
?GENIE3

## -----------------------------------------------------------------------------
linkList <- getLinkList(weightMat)
dim(linkList)
head(linkList)

## ----eval=FALSE---------------------------------------------------------------
#  linkList <- getLinkList(weightMat, reportMax=5)

## ----eval=FALSE---------------------------------------------------------------
#  linkList <- getLinkList(weightMat, threshold=0.1)

Try the GENIE3 package in your browser

Any scripts or data that you put into this service are public.

GENIE3 documentation built on Nov. 8, 2020, 5:52 p.m.