summaryLDna | R Documentation |
Creates a data frame with summary information of LD clusters extracted by function extractBranches
summaryLDna(ldna, clusters, LDmat)
ldna |
Output from |
clusters |
Output from |
LDmat |
a matrix of pairwise LD values used for |
Returns a data frame with each row corresponding to a cluster, in decreasing order with respect to highest LD threshold value at which they are present. Column "Merge.at" specfies the LD threshold for cluster merger. "Median.LD" gives the median LD of all pairwise values between loci in a cluster, and "MAD.LD" gives their unscaled median absolute deviation.
Petri Kemppainen petrikemppainen2@gmail.com
extractBranches
, LDnaRaw
and plotLDnetwork
# Simple upper diagonal LD matrix
LDmat <- structure(c(NA, 0.84, 0.64, 0.24, 0.2, 0.16, 0.44, 0.44, NA, NA, 0.8, 0.28, 0.4, 0.36, 0.36, 0.24, NA, NA, NA, 0.48, 0.32, 0.2, 0.36, 0.2, NA, NA, NA, NA, 0.76, 0.56, 0.6, 0.2, NA, NA, NA, NA, NA, 0.72, 0.68, 0.24, NA, NA, NA, NA, NA, NA, 0.44, 0.24, NA, NA, NA, NA, NA, NA, NA, 0.2, NA, NA, NA, NA, NA, NA, NA, NA), .Dim = c(8L, 8L), .Dimnames = list(c("L1", "L2", "L3", "L4", "L5", "L6", "L7", "L8"), c("L1", "L2", "L3", "L4", "L5", "L6", "L7", "L8")))
# Produce neccesary data for LDna
ldna <- LDnaRaw(LDmat)
# Extract clusters and plot graphs, for this small example min.edges is set to zero such that each tip clade corresponds to an individual locus
clusters <- extractBranches(ldna, min.edges=0,merge.min = 0.6)
summary <- summaryLDna(ldna, clusters, LDmat)
summary
## example with baimaii data set
data(LDna)
ldna <- LDnaRaw(r2.baimaii_subs)
clusters <- extractBranches(ldna, min.edges=20,merge.min = 0.6)
summary <- summaryLDna(ldna, clusters, r2.baimaii_subs)
summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.