getAttr: Get / Set vertex attribute names and coverage

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

Description

These functions report the annotation status of the vertices of a given network, modify or remove certain annotations.

Usage

1
2
3
4
5
6
7
8
9
getAttrStatus(graph, pattern = "^miriam.")

getAttrNames(graph, pattern = "")

getAttribute(graph, attr.name)

setAttribute(graph, attr.name, attr.value)

rmAttribute(graph, attr.name)

Arguments

graph

An annotated igraph object.

pattern

A regex experssion representing attribute name pattern.

attr.name

The attribute name

attr.value

A list of attribute values. This must be the same size as the number of vertices.

Details

NetPathMiner stores all its vertex annotation attributes in a list, and stores them collectively as a single attr. This is not to interfer with attributes from igraph package. All functions here target NetPathMiner annotations only.

Value

For getAttrStatus, a dataframe summarizing the number of vertices with no (missing), one (single) or more than one (complex) attribute value. The coverage

For getAttrNames, a character vector of attribute names matching the pattern.

For getAttribute, a list of vertex annotation values for the query attribute.

For setAttribute, a graph with the new attribute set.

For rmAttrNames, a new igraph object with the attibute removed.

Author(s)

Ahmed Mohamed

See Also

Other Attribute handling methods: stdAttrNames

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 data(ex_kgml_sig)	# Ras and chemokine signaling pathways in human

 # Get status of attribute "pathway" only
 getAttrStatus(ex_kgml_sig, "^pathway$")
 
 # Get status of all attributes  starting with "pathway" and "miriam" keywords
 getAttrStatus(ex_kgml_sig, "(^miriam)|(^pathway)")

 # Get all attribute names containing "miriam"
 getAttrNames(ex_kgml_sig, "miriam")
 # Get all attribute names containing "miriam"
 getAttribute(ex_kgml_sig, "miriam.ncbigene")

 # Remove an attribute from graph
 graph <- rmAttribute(ex_kgml_sig, "miriam.ncbigene")

aiminy/NetPathMiner documentation built on May 12, 2019, 3:38 a.m.