Description Usage Arguments Details Value Author(s) See Also Examples
These functions report the annotation status of the vertices of a given network, modify or remove certain annotations.
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)
|
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 attributes
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
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.