pathway {kangar00} | R Documentation |
An S4 class to represent a gene-gene interaction network
Description
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
Usage
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)
Arguments
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 |
Value
pathway2igraph
returns an unweighted igraph
object with edge attribute sign
analyze
returns a data.frame
consisting of
- id
pathway id,
- vcount
number of genes,
- ecount
number of links,
- inh_ecount
number of inhibition links,
- density
network density,
- av_deg
average degree,
- inh_deg
average degree of inhibition links,
- diam
network diamter,
- trans
transitivity, and
- s_trans
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
Methods (by generic)
-
analyze(pathway)
: -
get_genes(pathway)
: -
sample_genes(pathway)
:
Slots
id
A
character
repesenting thepathway
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 thepathway
.
Author(s)
Juliane Manitz, Stefanie Friedrichs, Patricia Burger
References
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.
Examples
# 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)