calc_dist: Calculates isolate group membership

View source: R/calc_dist.R

calc_distR Documentation

Calculates isolate group membership

Description

This function calculates the euclidean distance from ancestry matrices (Q). It assigns isolates to groups using a pairwise distance of 0 (+/- 1 SD). These membership groups are then plotted (if plot = TRUE) as a network and output as a membership table at each specified K value.

Usage

calc_dist(K, plot = TRUE)

Arguments

K

The K value (or range) used to calculate ancestry matrix

plot

TRUE/FALSE: Plots relationships between isolates visually

Value

membership.txt file containing membership assignments at each K value

Kplot.tiff TIFF file containing network plot at specified K value

Examples

calc_dist(K = 4)
calc_dist(K = 2:20, plot = FALSE)

gnrobinson/cloneR documentation built on Feb. 8, 2024, 7:46 a.m.