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 pathway-class

...

Further arguments can be added to the function.

id

A character repesenting the pathway id.

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.

x

pathway object

y

missing (placeholder)

highlight.genes

vector of gene names or node id's, which should be highlighted in a different color, default is NULL so that no genes are highlighted

gene.names

character indicating whether the genes names should appear in a legend ('legend'), as vertex label ('nodes'), or should be omitted (NA)

main

optional overall main title, default is NULL, which uses the pathway id

asp

a numeric constant, which gives the aspect ratio parameter for plot, default is 0.95

vertex.size

a numeric constant specifying the vertex size, default is 11

vertex.color

a character or numeric constant specifying the vertex color, default is 'khaki1'

vertex.label.cex

a numeric constant specifying the the vertex label size, default is 0.8,

edge.width

a numeric constant specifying the edge width, default is 2

edge.color

a character or numeric constant specifying the edge color, default is 'olivedrab4'

no

a numeric constant specifying the number of genes to be sampled, default is 3

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)

Slots

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.

Author(s)

Juliane Manitz, Stefanie Friedrichs, Patricia Burger

References

Details to the computation and interpretation can be found in:

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)


[Package kangar00 version 1.4.2 Index]