permuteLabels | R Documentation |
permuteLabels
permutes the node annotations of a lineage tree.
permuteLabels(graph, field, exclude = c("Germline", NA))
graph |
igraph object containing an annotated lineage tree. |
field |
string defining the annotation field to permute. |
exclude |
vector of strings defining |
A modified igraph object with vertex annotations permuted.
testEdges.
# Define and plot example graph
library(igraph)
graph <- ExampleTrees[[23]]
plot(graph, layout=layout_as_tree, vertex.label=V(graph)$c_call,
vertex.size=50, edge.arrow.mode=0, vertex.color="grey80")
# Permute annotations and plot new tree
g <- permuteLabels(graph, "c_call")
plot(g, layout=layout_as_tree, vertex.label=V(g)$c_call,
vertex.size=50, edge.arrow.mode=0, vertex.color="grey80")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.