ANI.graph | R Documentation |
This function constructs an undirected graph using pairwise ANI values calculated between genomes and the similarity metric described by Carroll, Wiedmann, and Kovac (2019).
ANI.graph(
bactaxRObject,
ANI_threshold = 95,
graphopt_charge = 0.02,
graphout_niter = 500,
edge_color = hcl(h = 168, c = 5, l = 58, alpha = 0.1),
metadata = NULL,
color_palette = plasma(n = length(unique(metadata))),
node_size = 3,
show_legend = T,
legend_pos_x = -2,
legend_pos_y = 1,
legend_cex = 0.5,
legend_ncol = 1
)
bactaxRObject |
A bactaxRObject |
ANI_threshold |
ANI threshold; an edge will be drawn between two genomes whose pairwise ANI value is greater than or equal to this threshold. Defaults to 95. |
graphopt_charge |
Charge parameter passed to layout_with_graphopt function in the igraph package. Defaults to 0.02. |
graphout_niter |
Number of iterations to perform for layout_with_graphopt funtion in the igraph package. Defaults to 500. |
edge_color |
Color of edges in graph. Defaults to gray, specifically hcl(h = 168, c = 5, l = 58, alpha = 0.1). |
metadata |
Named vector, where names correspond to node names, and vector elements correspond to metadata to map to nodes (e.g., species name). Vector names must match node names exactly. Defaults to NULL (no metadata stupplied). |
color_palette |
Vector of colors to apply to nodes. Defaults to one color (using the plasma color scale) per unique metadata value, i.e., plasma(n = length(unique(metadata))). |
node_size |
Size of nodes in graph. Defaults to 3. |
show_legend |
Display legend (True or False). Defaults to True. |
legend_pos_x |
x coordinate used to position the legend. Default is -2. |
legend_pos_y |
y coordinate used to position the legend. Default is 1. |
legend_cex |
Character expansion factor relative to current “‘par("cex")“' to pass to R’s “'legend“' function. Defaults to 0.5. |
legend_ncol |
Number of columns to display in legend. Defaults to 1. |
A plot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.