Title: | GeneNetworkBuilder: a bioconductor package for building regulatory network using ChIP-chip/ChIP-seq data and Gene Expression Data |
---|---|
Description: | Appliation for discovering direct or indirect targets of transcription factors using ChIP-chip or ChIP-seq, and microarray or RNA-seq gene expression data. Inputting a list of genes of potential targets of one TF from ChIP-chip or ChIP-seq, and the gene expression results, GeneNetworkBuilder generates a regulatory network of the TF. |
Authors: | Jianhong Ou, Haibo Liu, Heidi A Tissenbaum and Lihua Julie Zhu |
Maintainer: | Jianhong Ou <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.49.0 |
Built: | 2024-11-05 06:06:02 UTC |
Source: | https://github.com/bioc/GeneNetworkBuilder |
Appliation for discovering direct or indirect targets of transcription factors using ChIP-chip or ChIP-seq, and microarray or RNA-seq gene expression data. Inputting a list of genes of potential targets of one TF from ChIP-chip or ChIP-seq, and the gene expression results, GeneNetworkBuilder generates a regulatory network of the TF.
Maintainer: Jianhong Ou Developer [email protected]
Authors:
Lihua Julie Zhu Developer [email protected]
plot network generated by polishNetwork
browseNetwork( gR = graphNEL(), layoutType = c("fdp", "dot", "neato", "twopi", "circo"), width = NULL, height = NULL, maxNodes = 500, ... )
browseNetwork( gR = graphNEL(), layoutType = c("fdp", "dot", "neato", "twopi", "circo"), width = NULL, height = NULL, maxNodes = 500, ... )
gR |
an object of graphNEL |
layoutType |
layout type. see GraphvizLayouts |
width |
width of the figure |
height |
height of the figure |
maxNodes |
max nodes number to plot. Because if there are two many nodes, the running time will be too long. |
... |
parameters used by GraphvizLayouts |
An object of class htmlwidget that will intelligently print itself into HTML in a variety of contexts including the R console, within R Markdown documents, and within Shiny output bindings.
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1) gR<-polishNetwork(cifNetwork) browseNetwork(gR)
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1) gR<-polishNetwork(cifNetwork) browseNetwork(gR)
Output and render functions for using browseNetwork within Shiny applications and interactive Rmd documents.
browseNetworkOutput(outputId, width = "100%", height = "400px") renderBrowseNetwork(expr, env = parent.frame(), quoted = FALSE)
browseNetworkOutput(outputId, width = "100%", height = "400px") renderBrowseNetwork(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from |
width , height
|
Must be a valid CSS unit (like |
expr |
An expression that generates a browseNetwork |
env |
The environment in which to evaluate |
quoted |
Is |
Get all the connections of interesting genes from regulatory map.
buildNetwork(TFbindingTable, interactionmap, level = 3)
buildNetwork(TFbindingTable, interactionmap, level = 3)
TFbindingTable |
a matrix or data.frame with interesting genes. Column names must be 'from', 'to' |
interactionmap |
Transcription regulatory map. Column names of interactionmap must be 'from','to' |
level |
Depth of node path |
a dataframe or matrix of all the connections of interesting genes
data("ce.interactionmap") data("example.data") xx<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2)
data("ce.interactionmap") data("example.data") xx<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2)
map file for converting gene name or sequence name of Caenorhabditis elegans to wormbase identifier
ce.IDsMap
ce.IDsMap
character vector
character vecotr with gene name or sequence name as names and wormbase identifier as values.
data(ce.IDsMap) head(ce.IDsMap)
data(ce.IDsMap) head(ce.IDsMap)
transcript regulatory map of Caenorhabditis elegans
ce.interactionmap
ce.interactionmap
dataframe
transcript regulatory map of Caenorhabditis elegans is generated using databases edgedb and microCosm Targets.
http://edgedb.umassmed.edu, http://www.ebi.ac.uk/enright-srv/microcosm/htdocs/targets/v5/
data(ce.interactionmap) head(ce.interactionmap)
data(ce.interactionmap) head(ce.interactionmap)
map file for converting from wormbase identifier to Caenorhabditis elegans gene name
ce.mapIDs
ce.mapIDs
character vector
character vecotr with wormbase identifier as names and gene name as values.
data(ce.mapIDs) head(ce.mapIDs)
data(ce.mapIDs) head(ce.mapIDs)
micro RNA of Caenorhabditis elegans
ce.miRNA.map
ce.miRNA.map
dataframe
The first column is wormbase identifier. And the second column is miRNA names.
data(ce.miRNA.map) head(ce.miRNA.map)
data(ce.miRNA.map) head(ce.miRNA.map)
For same gene, there are multple gene alias. In order to eliminate the possibility of missing any connections, convert the gene symbols to unique gene ids is important. This function can convert the gene symbols to unique ids and convert it back according a giving map.
convertID(x, IDsMap, ByName = c("from", "to"))
convertID(x, IDsMap, ByName = c("from", "to"))
x |
a matrix or dataframe contain the columns to be converted. |
IDsMap |
a character vector of the identifier map |
ByName |
the column names to be converted |
a matrix or dataframe with converted gene IDs
data("ce.IDsMap") bind<-cbind(from="daf-16", to=c("fkh-7", "hlh-13", "mxl-3", "nhr-3", "lfi-1")) convertID(toupper(bind), ce.IDsMap, ByName=c("from", "to"))
data("ce.IDsMap") bind<-cbind(from="daf-16", to=c("fkh-7", "hlh-13", "mxl-3", "nhr-3", "lfi-1")) convertID(toupper(bind), ce.IDsMap, ByName=c("from", "to"))
Using RCy3 to visualize the network.
cy3Network( gR = graphNEL(), ..., stringify = FALSE, species = "Homo sapiens", style = "Marquee", widths = c(0.25, 5) )
cy3Network( gR = graphNEL(), ..., stringify = FALSE, species = "Homo sapiens", style = "Marquee", widths = c(0.25, 5) )
gR |
an object of graphNEL |
... |
parameters will be passed to createNetworkFromGraph |
stringify |
Run STRINGify or not |
species |
if stringify is TRUE, teh species will be used to retreive the nodes and edges properties. |
style |
The default style when create the network |
widths |
The link width range. |
The network SUID.
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1) gR<-polishNetwork(cifNetwork) if(interactive()){ cy3Network(gR) }
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1) gR<-polishNetwork(cifNetwork) if(interactive()){ cy3Network(gR) }
example.data is a data list of example datasets. There is a dataset example.microarrayData, which is the example of gene expression data of a gene-chip result of C.elegans. Dataset example.data$ce.bind is a TF binding matrix of ChIP-chip experiment of C.elegans. Dataset example.data$cd.exprData is expression data of a gene-chip result of C.elegans. Dataset example.data$hs.bind is a TF binding matrix of ChIP-chip experiment of H.sapiens. Dataset example.data$hs.exprData is expression data of a combination of a gene-chip result and a RNA-SEQ result of H.sapiens.
example.data
example.data
dataframe
The dataset example.microarrayData contains columns: ID, logFC, AveExpr, t, P.Value, adj.P.Val, B, genes and symbols. The columns of ID, logFC and symbols are required by GeneNetworkBuilder. The dataset example.data$hs.bind contains columns: ID, symbols, logFC and P.Value. The dataset example.data$hs.exprData contains columns: from and to.
data(example.data) names(example.data) head(example.data$example.microarrayData) head(example.data$ce.bind) head(example.data$ce.exprData) head(example.data$hs.bind) head(example.data$hs.exprData)
data(example.data) names(example.data) head(example.data$example.microarrayData) head(example.data$ce.bind) head(example.data$ce.exprData) head(example.data$hs.bind) head(example.data$hs.exprData)
Save graph into HTML, json or xgmml format.
exportNetwork(network, file, format = c("HTML", "json", "XGMML"), ...)
exportNetwork(network, file, format = c("HTML", "json", "XGMML"), ...)
network |
output of browseNetwork |
file |
Name of the file to save to. |
format |
type in which graph shall be saved. Could be one of HTML, json or XGMML. |
... |
Parameter could be used by saveWidget for HTML or writeLines for json or saveXML for XGMML. |
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1) gR<-polishNetwork(cifNetwork) network <- browseNetwork(gR) exportNetwork(network, "sample.html")
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1) gR<-polishNetwork(cifNetwork) network <- browseNetwork(gR) exportNetwork(network, "sample.html")
verify every nodes in the regulatory network by expression profile
filterNetwork( rootgene, sifNetwork, exprsData, mergeBy = "symbols", miRNAlist, remove_miRNA = FALSE, tolerance = 0, cutoffPVal = 0.01, cutoffLFC = 0.5, minify = TRUE, miRNAtol = FALSE )
filterNetwork( rootgene, sifNetwork, exprsData, mergeBy = "symbols", miRNAlist, remove_miRNA = FALSE, tolerance = 0, cutoffPVal = 0.01, cutoffLFC = 0.5, minify = TRUE, miRNAtol = FALSE )
rootgene |
name of root gene. It must be the ID used in xx regulatory network |
sifNetwork |
Transcription regulatory network table. Column names of xx must be 'from','to' |
exprsData |
dataset of expression comparison data, which should contain column logFC and column given by exprsDataByName |
mergeBy |
The column name contains ID information used to merge with 'to' column of sifNetwork in exprsData |
miRNAlist |
vector of microRNA ids. |
remove_miRNA |
remove miRNA from the network or not. Bool value, TRUE or FALSE |
tolerance |
maximum number of unverified nodes in each path |
cutoffPVal |
cutoff p value of valid differential expressed gene/miRNA |
cutoffLFC |
cutoff log fold change value of a valid differential expressed gene/miRNA |
minify |
Only keep the best path if multiple paths exists for single node? Bool value, TRUE or FALSE |
miRNAtol |
take miRNA expression into account for tolerance calculation. Bool value, TRUE or FALSE |
a dataframe of filtered regulatory network by expression profile
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1)
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1)
map file for converting gene name or sequence name of Homo sapiens to Entrez identifier
hs.IDsMap
hs.IDsMap
character vector
character vecotr with gene name as names and Entrez identifier as values.
data(hs.IDsMap) head(hs.IDsMap)
data(hs.IDsMap) head(hs.IDsMap)
transcript regulation map of Homo sapiens
hs.interactionmap
hs.interactionmap
dataframe
transcript regulatory map of Homo sapiens is generated using databases FANTOM, mirGen and microCosm Targets.
http://fantom.gsc.riken.jp/5/, http://www.ebi.ac.uk/enright-srv/microcosm/htdocs/targets/v5/, http://carolina.imis.athena-innovation.gr/diana_tools/web/index.php
data(hs.interactionmap) head(hs.interactionmap)
data(hs.interactionmap) head(hs.interactionmap)
map file for converting from Entrez identifier to Homo sapiens gene name
hs.mapIDs
hs.mapIDs
character vector
character vecotr with Entrez identifier as names and gene name as values.
data(hs.mapIDs) head(hs.mapIDs)
data(hs.mapIDs) head(hs.mapIDs)
micro RNA of Homo sapiens
hs.miRNA.map
hs.miRNA.map
dataframe
The first column is entrez identifier. And the second column is miRNA names.
data(hs.miRNA.map) head(hs.miRNA.map)
data(hs.miRNA.map) head(hs.miRNA.map)
By providing a list of given genes, build a network for input of filterNetwork.
networkFromGenes(genes, interactionmap, level = 3, unrooted = FALSE)
networkFromGenes(genes, interactionmap, level = 3, unrooted = FALSE)
genes |
A vector of character for interested genes. |
interactionmap |
Transcription regulatory map. Column names of interactionmap must be 'from','to' |
level |
Depth of node path |
unrooted |
Return unrooted regulatory network table or not. |
a list with elements: rootgene: The nodes with maximal connections. sifNetwork: Transcription regulatory network table.
data("ce.interactionmap") data("example.data") genes <- as.character(example.data$ce.bind$from) xx<-networkFromGenes(example.data$ce.bind, ce.interactionmap, level=2)
data("ce.interactionmap") data("example.data") genes <- as.character(example.data$ce.bind$from) xx<-networkFromGenes(example.data$ce.bind, ce.interactionmap, level=2)
generate an object of grahpNEL to represent the regulation network. Each node will has three attributes: size, borderColor and fill. The size will be mapped to the length of its edges. The node fill color will be mapped to logFC.
polishNetwork( cifNetwork, nodeData, nodesDefaultSize = 48, nodecolor = colorRampPalette(c("green", "yellow", "red"))(5), nodeBg = "white", nodeBorderColor = list(gene = "darkgreen", miRNA = "darkblue"), edgeWeight = NA, edgelwd = 0.5, ... )
polishNetwork( cifNetwork, nodeData, nodesDefaultSize = 48, nodecolor = colorRampPalette(c("green", "yellow", "red"))(5), nodeBg = "white", nodeBorderColor = list(gene = "darkgreen", miRNA = "darkblue"), edgeWeight = NA, edgelwd = 0.5, ... )
cifNetwork |
dataframe used to draw network graph. column names of cifNetwork must contain 'from', 'to', 'logFC' and 'miRNA' |
nodeData |
The node data. If it is not provide, node data will be retrieved from cifNetwork for the 'to' nodes. |
nodesDefaultSize |
nodes default size |
nodecolor |
a character vector of color set. The node color will be mapped to color set by log fold change. Or the column names for the colors. |
nodeBg |
background of node |
nodeBorderColor |
a list of broder node color set. nodeBorderColor's element must be gene and miRNA |
edgeWeight |
the weight of edge. It can be a column name of cifNetwork. |
edgelwd |
the default width of edge. If edgeWeight is set, the edgelwd will be mapped to the edgeWeight. |
... |
any parameters can be passed to graph.par |
An object of graphNEL class of the network
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1) gR<-polishNetwork(cifNetwork) ## browseNetwork(gR)
data("ce.miRNA.map") data("example.data") data("ce.interactionmap") data("ce.IDsMap") sifNetwork<-buildNetwork(example.data$ce.bind, ce.interactionmap, level=2) cifNetwork<-filterNetwork(rootgene=ce.IDsMap["DAF-16"], sifNetwork=sifNetwork, exprsData=uniqueExprsData(example.data$ce.exprData, "Max", condenseName='logFC'), mergeBy="symbols", miRNAlist=as.character(ce.miRNA.map[ , 1]), tolerance=1) gR<-polishNetwork(cifNetwork) ## browseNetwork(gR)
Save graph into xgmml format.
saveXGMML(network, file, ...)
saveXGMML(network, file, ...)
network |
output of browseNetwork |
file |
Name of the file to save to. |
... |
Parameter could be used by saveXML |
Subset the output of polishNetwork by a list of nodes name
subsetNetwork(graph, genes)
subsetNetwork(graph, genes)
graph |
A graphNEL object. The output of polishNetwork. |
genes |
A list of nodes names |
An object of graph.
library(graph) set.seed(123) g1 <- randomEGraph(LETTERS[seq.int(15)], edges=100) g1 <- subsetNetwork(g1, LETTERS[seq.int(5)]) plot(g1)
library(graph) set.seed(123) g1 <- randomEGraph(LETTERS[seq.int(15)], edges=100) g1 <- subsetNetwork(g1, LETTERS[seq.int(5)]) plot(g1)
get unique the microarray data for each gene id.
uniqueExprsData(exprsData, method = "Max", condenseName = "logFC")
uniqueExprsData(exprsData, method = "Max", condenseName = "logFC")
exprsData |
dataset of expression comparison data |
method |
method must be Max, Median or Min |
condenseName |
column names to be condensed |
a dataframe of expression data without duplicates
data("example.data") example.microarrayData<-uniqueExprsData(example.data$example.microarrayData, method="Max", condenseName='logFC')
data("example.data") example.microarrayData<-uniqueExprsData(example.data$example.microarrayData, method="Max", condenseName='logFC')