Title: | Identification of Transcriptional Regulatory Modules from Protein-Protein Interaction Networks |
---|---|
Description: | rTRM identifies transcriptional regulatory modules (TRMs) from protein-protein interaction networks. |
Authors: | Diego Diez |
Maintainer: | Diego Diez <[email protected]> |
License: | GPL-3 |
Version: | 1.45.0 |
Built: | 2024-12-18 04:12:38 UTC |
Source: | https://github.com/bioc/rTRM |
This package identifies transcriptional regulatory modules (TRMs) from PPI networks.
Package: | rTRM |
Type: | Package |
Version: | 1.0 |
Date: | 2013-02-01 |
License: | GPL-3 |
Diego Diez
Maintainer: Diego Diez <[email protected]>
getAnnotations()
getAnnotations()
Returns an annotated graph with node size and edge width proportional at the number of occurrences of nodes/edges in a suplied list of graphs.
annotateFreq(g, graph_list)
annotateFreq(g, graph_list)
g |
target graph to annotate. |
graph_list |
list of graph to extract information from. |
Commonly graph_list refers to a list of predicted TRMs (with findTRM) and g is the combined TRM. This function annotates the nodes/edges in g to known their frequency in the original list of graphs.
Diego Diez
Uses information about expression, enrichment and parent PPI network to annotate a subgraph.
annotateModule(g, enrich, trm, targets, ppi, exprs, tfs)
annotateModule(g, enrich, trm, targets, ppi, exprs, tfs)
g |
graph to annotate in igraph format. |
enrich |
list of enriched transcription factors (or motifs). |
trm |
TRM to compare with (to identify bridges). |
targets |
list of target transcription factors (typically those with ChIP-seq data). |
ppi |
parent PPI network (to check membership of nodes). |
exprs |
list of entrezgene ids representing expressed genes. |
tfs |
Diego Diez
This function takes a network object and includes cluster information as piecolor attribute, suitable to be plotted with plotTRM()
annotateTRM(g, target)
annotateTRM(g, target)
g |
a network object. |
target |
target node (from findTRM()) |
Diego Diez
Human protein-protein interaction (PPI) dataset from the BioGRID database release .
data(biogrid_hs)
data(biogrid_hs)
An igraph object.
Diego Diez
Mouse protein-protein interaction (PPI) dataset from the BioGRID database .
data(biogrid_mm)
data(biogrid_mm)
An igraph object.
Diego Diez
This the main function used to identify TRMs. It takes a graph object and use it to search in the neighborhood of a target node for query nodes that are separated a maximum distance (controlled by max.bridge parameter).
findTRM(g, target, query, method = "nsa", max.bridge = 1, extended = FALSE, strict = FALSE, type = "igraph")
findTRM(g, target, query, method = "nsa", max.bridge = 1, extended = FALSE, strict = FALSE, type = "igraph")
g |
the network used to identify TRMs (tipically a PPI network) |
target |
character variable with the name of a target node. |
query |
character vector with the list of query nodes. |
method |
method to use. |
max.bridge |
maximum number of nodes allowed between the target and query nodes. |
extended |
whether to allow distance restrictions to include both target and query nodes. |
strict |
whether to return a single component (using decompose.graph()) |
type |
type of graph object to return, either an "igraph" (the default) or a "graphNEL" |
Currently only "first" and "nsa" methods are available. First is used for tests and returns the first neighborhood of the target node. Method "nsa" implements the TRM finding algorithm.
A network in igraph format or NULL.
Diego Diez
# load example network. load(system.file(package = "rTRM", "extra/example.rda")) # define target and query nodes. target = "N6" query = c("N7", "N12", "N28") # find TRM: s = findTRM(g, target = target, query = query, method = "nsa", max.bridge = 1)
# load example network. load(system.file(package = "rTRM", "extra/example.rda")) # define target and query nodes. target = "N6" query = c("N7", "N12", "N28") # find TRM: s = findTRM(g, target = target, query = query, method = "nsa", max.bridge = 1)
Obtain the 'pwm' table fromt the database, containing PWM's annotations.
getAnnotations(filter, dbname = NULL)
getAnnotations(filter, dbname = NULL)
filter |
one or more PWM ids. |
dbname |
the location of the database (to load custom datbases). |
Diego Diez
ann = getAnnotations()
ann = getAnnotations()
This function is used to generate igraph network objects from BioGRID data. It downloads the database into a data.frame object that can be used later with processBiogrid()
getBiogridData(release)
getBiogridData(release)
release |
release of BioGRID to download. |
The release to download must be specified as currently there is no way to download automatically the latests release.
An data.frame object.
Diego Diez
Specify target and enriched motifs and returns a list with circle membership. This information is used by layout.concentric to position the nodes in plots.
getConcentricList(g, t, e, max.size = 60, order.by = "label")
getConcentricList(g, t, e, max.size = 60, order.by = "label")
g |
graph to layout (extract the nodes). |
t |
list of target nodes (will go in the center). |
e |
list of enriched nodes (will go in the periphery). |
max.size |
maximum number of nodes per layer. |
order.by |
ordering attribute for list before split. |
Diego Diez
Returns the largest connected component from a graph.
getLargestComp(g)
getLargestComp(g)
g |
an igraph object. |
Diego Diez
Obtain the mapping between PWM and Entrez Gene identifiers.
getMaps(filter, dbname = NULL)
getMaps(filter, dbname = NULL)
filter |
vector of PWMs to filter results. |
dbname |
Diego Diez
getMaps()
getMaps()
Returns a list of PWMs, by default all the PWMs in the database. Alternativelly, filtered by the ids provided by filter.
getMatrices(filter, dbname = NULL)
getMatrices(filter, dbname = NULL)
filter |
list of PWMs to filter results. |
dbname |
Diego Diez
pwms = getMatrices()
pwms = getMatrices()
Retrieve PWMs associated with genes provided as entrezgene identifiers.
getMotifsFromEntrezgene(e, organism)
getMotifsFromEntrezgene(e, organism)
e |
vector of entrezgene identifiers to retrieve exiting PWMs. |
organism |
target organism. |
Diego Diez
Retrieve PWMs associated with genes provided as symbol.
getMotifsFromSymbol(s, organism)
getMotifsFromSymbol(s, organism)
s |
vector of gene symbols. |
organism |
target organism. |
Diego Diez
Obtain gene identifiers for a target organism associated with a list of PWMs.
getOrthologFromMatrix(filter, organism = "human", dbname = NULL)
getOrthologFromMatrix(filter, organism = "human", dbname = NULL)
filter |
vector of matrices to filter results. |
organism |
target organism. |
dbname |
database- usually not need to specify. |
Diego Diez
Obtain the mapping to Entrez Gene identifiers in the given organism.
getOrthologs(filter, organism, dbname = NULL)
getOrthologs(filter, organism, dbname = NULL)
filter |
entrezgene identifiers for the original mapping (PWM to gene). These can belong to diverse species and correspond to the "entrezgene" column obtained with getMaps() function. |
organism |
target organisms, currently supported "human" and "mouse" |
dbname |
If organism is not specified the entire table of orthologs (with all supported species) is returned.
A data.frame object with ortholog information.
Diego Diez
getOrthologs(organism = "human")
getOrthologs(organism = "human")
Returns ortholog genes for a target organism
getOrthologsFromBiomart(eg, target_org, mart)
getOrthologsFromBiomart(eg, target_org, mart)
eg |
list of entrezgene ids to obtain orthologs. |
target_org |
target organism. |
mart |
mart object. |
Diego Diez
This is just a wrapper to getSeq() in package Biostrings that facilitates adding a label to each sequence.
getSequencesFromGenome(BED, genome, append.id)
getSequencesFromGenome(BED, genome, append.id)
BED |
file with peak locations in BED format. |
genome |
a BSgenome object (e.g. Mmusculus) |
append.id |
optional label to append to each sequence id. |
Diego Diez
This function computes pair-wise similarity based on common nodes (default) or edges between the graphs passed as a list.
getSimilarityMatrix(g_list, type = "edges")
getSimilarityMatrix(g_list, type = "edges")
g_list |
list of graph objects. |
type |
type of similarity, either node or edge (default). |
Diego Diez
Return the ontology in the TFclass database associated with an entrezgene identifier.
getTFclass(dbname = NULL)
getTFclass(dbname = NULL)
dbname |
SQLite file to use as database. |
Diego Diez
Applies getTFclass sequentially to a vector of entrezgene identifiers.
getTFclassFromEntrezgene(x, subset = "Class", tfclass, dbname = NULL)
getTFclassFromEntrezgene(x, subset = "Class", tfclass, dbname = NULL)
x |
vector of entrezgene identifiers. |
subset |
level in the ontology (subset in TFclass terminology. By default "Class") |
tfclass |
data.frame with tfclass data to pass to the recursive function. |
dbname |
SQLite file to use as database. |
Diego Diez
Returns a vector of names (not ids) with the members of a particular subset in the TFclass database. By default it returns the Class subset.
getTFterms(subset = "Class", dbname = NULL)
getTFterms(subset = "Class", dbname = NULL)
subset |
a subset in TFclass (default Class). |
dbname |
SQLite file to use as database. |
Diego Diez
Initializes mart objects to identify ortholog genes
initBiomart(filter, biomart = "ensembl", host)
initBiomart(filter, biomart = "ensembl", host)
filter |
list of supported organisms |
biomart |
|
host |
Diego Diez
Generates a layout for graphs that places in the center the target transcription factors, in the sides the enriched transcription factors and in between of them the bridge proteins.
layout.arc(g, target, query)
layout.arc(g, target, query)
g |
the graph object to layout. |
target |
list of target nodes (typically target transcription factors.) |
query |
list of query nodes (typically enriched transcription factors.) |
A matrix with the x and y locations of each node in the target graph.
Diego Diez
Generates a matrix with x,y coordinates for each node in a target graph, which layouts the nodes using concentric circles.
layout.concentric(g, concentric = NULL, radius = NULL, order.by)
layout.concentric(g, concentric = NULL, radius = NULL, order.by)
g |
graph (igraph) to layout. |
concentric |
list with the components of each layer. |
radius |
radious of each layer. |
order.by |
graph attributes to order nodes by. |
Diego Diez
Plots the degree distribution and fits a power law, returning in the legend the values of the fitted parameters.
plotDegree(g)
plotDegree(g)
g |
igraph object |
Diego Diez
This function plots graphs of the class igraph.
plotGraph(g, layout = layout.fruchterman.reingold, mar = .5, vertex.pch = 21, vertex.cex, vertex.col, vertex.bg, vertex.lwd, edge.col, edge.lwd, edge.lty, label = TRUE, label.col, label.cex, label.pos = NULL, label.offset = 1.5, adjust.label.col = FALSE, normalize.layout = TRUE)
plotGraph(g, layout = layout.fruchterman.reingold, mar = .5, vertex.pch = 21, vertex.cex, vertex.col, vertex.bg, vertex.lwd, edge.col, edge.lwd, edge.lty, label = TRUE, label.col, label.cex, label.pos = NULL, label.offset = 1.5, adjust.label.col = FALSE, normalize.layout = TRUE)
g |
a network object. |
layout |
graph layout, either a function or the output of a layout function. |
mar |
plot margin. |
vertex.pch |
node size. |
vertex.cex |
node size. |
vertex.col |
node line color. |
vertex.bg |
node background color. |
vertex.lwd |
node line width. |
edge.col |
edge color. |
edge.lwd |
edge line width. |
edge.lty |
edge line type. |
label |
logical; whether to plot labels. |
label.col |
label color. |
label.cex |
label expansion. |
label.pos |
label position. |
label.offset |
label offset. |
adjust.label.col |
whether to automatically adjust label color depending on the luminance of the node's color/s. |
normalize.layout |
whether to apply layout.norm (with limits xmin=-1, xmax=1, ymin=-1, ymax=1) to the layout. |
Diego Diez
This function plots the output findTRM() after it has been annotated with cluster information with annotateTRM() function. Cluster membership is plotted using a pie plot.
plotTRM(g, layout = layout.fruchterman.reingold, mar = .5, vertex.col, vertex.cex, vertex.lwd, edge.col, edge.lwd, edge.lty, label = TRUE, label.cex, label.col, label.pos = NULL, label.offset = 1.5, adjust.label.col = FALSE, normalize.layout = TRUE)
plotTRM(g, layout = layout.fruchterman.reingold, mar = .5, vertex.col, vertex.cex, vertex.lwd, edge.col, edge.lwd, edge.lty, label = TRUE, label.cex, label.col, label.pos = NULL, label.offset = 1.5, adjust.label.col = FALSE, normalize.layout = TRUE)
g |
a network object with cluster information (attribute piecolor). |
layout |
graph layout, either a function or the output of a layout function. |
mar |
plot margin. |
vertex.col |
node color. |
vertex.cex |
node size. |
vertex.lwd |
node border line width. |
edge.col |
edge color. |
edge.lwd |
edge line width. |
edge.lty |
edge line type. |
label |
logical; whether to plot labels. |
label.cex |
label expansion. |
label.col |
label color. |
label.pos |
label position. |
label.offset |
label offset. |
adjust.label.col |
whether to automatically adjust label color depending on the luminance of the node's color. |
normalize.layout |
whether to apply layout.norm (with limits xmin=-1, xmax=1, ymin=-1, ymax=1) to the layout. |
Diego Diez
This function just plots a legend with the cluster membership of the provided list of genes. The legend includes de most prominent families of each cluster and there is some name polishing as well.
plotTRMlegend(x, title = NULL, cex = 1)
plotTRMlegend(x, title = NULL, cex = 1)
x |
list of family names or igraph object. |
title |
title for the legend. |
cex |
numeric value controlling the size of the legend's text. |
Diego Diez
Process a data.frame with BioGRID data into a network for a target organism.
processBiogrid(dblist, org = "human", simplify = TRUE, type = "physical", mimic.old = FALSE)
processBiogrid(dblist, org = "human", simplify = TRUE, type = "physical", mimic.old = FALSE)
dblist |
data.frame containing the BioGRID data. |
org |
target organism (default: "human") |
simplify |
whether to eliminate redundant edges (default TRUE) |
type |
type of interaction (physical or genetic) to include (default: "physical") |
mimic.old |
mimic old behavior of processBiogrid() when interactions for multiple species could be retrieved. Used only for testing. |
An igraph object.
Diego Diez
Remove nodes from a graph and returns the largest component
removeVertices(g, filter, keep.hanging = FALSE)
removeVertices(g, filter, keep.hanging = FALSE)
g |
graph to remove nodes. |
filter |
|
keep.hanging |
(logical) whether to return the largest component or not. |
Diego Diez
This function generates a data.frame with the nodes in the provided graph and associated annotations.
writeTRMreport(graph, file, organism, target, query, sort.by = "symbol")
writeTRMreport(graph, file, organism, target, query, sort.by = "symbol")
graph |
a graph object. |
file |
file name. |
organism |
organisms for the annotations. |
target |
target transcription factor. |
query |
query transcription factors. |
sort.by |
order the columns of the data.frame by (default: "symbol"). |
Diego Diez