getAttrStatus {NetPathMiner} | R Documentation

## Get / Set vertex attribute names and coverage

### Description

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

### Usage

    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

     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")

[Package NetPathMiner version 1.16.0 Index]