get_protein_protein_graph: Retrieve a graph from a datasource.

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Retrieves a graph from a datasource converting it to an igraph object as well as retrieving accompanying annotation.

Usage

1
get.protein.protein.graph(db.con, param.obj, get.annotation = TRUE, on.symbol.protein.dup="remove.dup")

Arguments

db.con

An object inheriting from DBIConnection (e.g. MySQLConnection)

param.obj

A priorDbParams object

get.annotation

A logical value specifying whether to retrieve annotation

on.symbol.protein.dup

This controls how duplicated proteins are handled in this program. Currently, the default and only (but not optimal) option is "remove.dup". This removes the duplicate entries keeping only one for each protein.

Details

The graph has to be in form usable by graph.data.frame function in the igraph package. The graph will be retrieved using the getMatrixQuery method of priorDbParams. If get.annotation is TRUE, the getAnnotQuery method will be used to retrieve annotation. If nodeWeightCol is specified, then the specified values will be multiplied with the entire set of edges for each gene and the edge scores will be modified accordingly.

Value

An annotatedIGraph object

Note

Edge re-weighting through a specified nodeWeightCol should be considered highly experimental and is subject to change.

Author(s)

Daniel Bottomly

See Also

graph.data.frame, priorDbParams, dbConnect

Examples

1
2
3
4
5
6
7
8
if (require(HitWalkerData) && require(RSQLite))
{
  data(params)
  db.con <- dbConnect("SQLite", annot.db.path())
  annotQuery(examp.prior.param) <- function(sample.id.list, param.obj){"SELECT * FROM annotation"}
  graph.obj <- get.protein.protein.graph(db.con, examp.prior.param, get.annotation=TRUE)
  ## Not run: saveGraph(graph.obj, file="graph.RData")
}

dbottomly/HitWalker documentation built on May 15, 2019, 1:22 a.m.