pathway | R Documentation |
An S4 class to represent a gene-gene interaction network
pathway
is the pathway
object constructor.
show
displays the pathway
object briefly
summary
generates a pathway
object summary including basic network properties.
pathway2igraph
converts a pathway
object into an
igraph
object with edge attribute sign
analyze pathway
network properties
get_genes
is a helper function that extracts the gene names in a
pathway
and returns a vector
containing character
elements of gene names
plot
visualizes the pathway
as igraph
object
sample_genes
randomly selects effect gene in a
pathway
according the betweenness centrality and (no -1) neighors
pathway(object, ...)
## S4 method for signature 'ANY'
pathway(id, adj = matrix(0), sign = NULL)
## S4 method for signature 'pathway'
show(object)
## S4 method for signature 'pathway'
summary(object)
## S4 method for signature 'pathway'
pathway2igraph(object)
## S4 method for signature 'pathway'
analyze(object, ...)
## S4 method for signature 'pathway'
get_genes(object)
## S4 method for signature 'pathway,missing'
plot(
x,
y = NA,
highlight.genes = NULL,
gene.names = c(NULL, "legend", "nodes"),
main = NULL,
asp = 0.95,
vertex.size = 11,
vertex.color = "khaki1",
vertex.label.cex = 0.8,
edge.width = 2,
edge.color = "olivedrab4",
...
)
## S4 method for signature 'pathway'
sample_genes(object, no = 3)
object |
An object of class |
... |
Further arguments can be added to the function. |
id |
A |
adj |
A |
sign |
A |
x |
|
y |
missing (placeholder) |
highlight.genes |
vector of gene names or node id's, which should be highlighted in a different color, default is |
gene.names |
character indicating whether the genes names should appear in a legend ( |
main |
optional overall main title, default is |
asp |
a |
vertex.size |
a |
vertex.color |
a |
vertex.label.cex |
a |
edge.width |
a |
edge.color |
a |
no |
a |
pathway2igraph
returns an unweighted igraph
object with edge attribute sign
analyze
returns a data.frame
consisting of
pathway id,
number of genes,
number of links,
number of inhibition links,
network density,
average degree,
average degree of inhibition links,
network diamter,
transitivity, and
signed transitivity (Kunegis et al., 2009).
get_genes
returns a character vector of gene names extracted from adjacency matrix rownames.
sample_genes
returns a vector
of length no
with
vertex id's of sampled genes
analyze(pathway)
:
get_genes(pathway)
:
sample_genes(pathway)
:
id
A character
repesenting the pathway
id,
e.g. hsa00100 as used in the KEGG database.
adj
A matrix
respresenting the network adjacency matrix of dimension
equaling the number of genes (1 interaction, 0 otherwise)
sign
A numeric
vector
indicating the interaction type for
each link (1 activation, -1 inhibition) in the interaction network for the
pathway
.
Juliane Manitz, Stefanie Friedrichs, Patricia Burger
Details to the computation and interpretation can be found in:
Kolaczyk, E. D. (2009). Statistical analysis of network data: methods and models. Springer series in statistics. Springer.
Kunegis, J., A. Lommatzsch, and C. Bauckhage (2009). The slashdot zoo: Mining a social network with negative egdes. In Proceedings of the 18th international conference on World wide web, pp. 741-750. ACM Press.
# pathway object constructor
pathway(id="hsa04022")
# convert to igraph object
data(hsa04020)
str(hsa04020)
g <- pathway2igraph(hsa04020)
str(g)
# analyze pathway network properties
data(hsa04020)
summary(hsa04020)
analyze(hsa04020)
# extract gene names from pathway object
get_genes(hsa04020)
# plot pathway as igraph object
plot(hsa04020)
sample3 <- sample_genes(hsa04020, no = 3)
plot(hsa04020, highlight.genes = sample3)
# sample effect genes
sample3 <- sample_genes(hsa04020, no = 3)
plot(hsa04020, highlight.genes = sample3)
sample5 <- sample_genes(hsa04020, no = 5)
plot(hsa04020, highlight.genes = sample5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.