buildPathway: Build a Pathway object.

View source: R/build.R

buildPathwayR Documentation

Build a Pathway object.

Description

This function creates a new object of type Pathway given a data frame describing its edges.

Usage

buildPathway(id, title, species, database, proteinEdges,
             metaboliteEdges = NULL, mixedEdges = NULL,
             timestamp = NULL)

Arguments

id

the pathway identifier.

title

the title of the pathway.

species

the species the pathway belongs to.

database

the name of the database the pathway derives from.

proteinEdges

a data.frame of edges between proteins (or genes).

Must have the following columns: src_type, src, dest_type, dest, direction and type.

Direction must be one of the two strings: "directed" or "undirected".

metaboliteEdges

interactions between metabolites.

Can be NULL. Otherwise, it must have the same structure as proteinEdges.

mixedEdges

interactions between metabolites and proteins.

Can be NULL. Otherwise, it must have the same structure as proteinEdges.

timestamp

when the pathway was annotated, by default the time buildPathway is called.

Value

A new Pathway instance.

Examples

edges <- data.frame(src_type = "ENTREZID", src="672",
                    dest_type = "ENTREZID", dest="7157",
                    direction="undirected", type="binding")
pathway <- buildPathway("#1", "example", "hsapiens", "database", edges)

# Example with metabolites:
edges <- data.frame(src_type = "ENTREZID", src="672",
                    dest_type = "ENTREZID", dest="7157",
                    direction="undirected", type="binding")
mixed <- data.frame(src_type = "CHEBI", src="77750",
                    dest_type = "ENTREZID", dest="7157",
                    direction="undirected", type="binding")
pathway <- buildPathway("#1", "example", "hsapiens", "database",
                        edges, mixedEdges = mixed)

sales-lab/graphite documentation built on Nov. 1, 2024, 4:49 p.m.