getAttrStatus | R Documentation |
These functions report the annotation status of the vertices of a given network, modify or remove certain annotations.
getAttrStatus(graph, pattern = "^miriam.")
getAttrNames(graph, pattern = "")
getAttribute(graph, attr.name)
setAttribute(graph, attr.name, attr.value)
rmAttribute(graph, attr.name)
graph |
An annotated igraph object. |
pattern |
A |
attr.name |
The attribute name |
attr.value |
A list of attribute values. This must be the same size as the number of vertices. |
NetPathMiner stores all its vertex annotation attributes in a list, and stores them collectively as
a single attr
. This is not to interfer with graph_attr_names
from igraph
package.
All functions here target NetPathMiner annotations only.
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.
Ahmed Mohamed
Other Attribute handling methods:
stdAttrNames()
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.