Learn R Programming

starmie (version 0.1.2)

plotMDS: Plot principal coordinates from Q-matrix, struct or admix objects

Description

Plot principal coordinates from Q-matrix, struct or admix objects

Usage

plotMDS(x, method = NULL)

Arguments

x
a Q-matrix of probability memberships, or struct or admix object
method
(default = NULL) string either 'nnd' or 'jsd' valid only for struct objects

Details

"nnd" uses the nucleotide distance matrix estimated by STRUCTURE to construct the principal coordinates, sizing the points by the expected heterozygosity within a cluster. "jsd" produces a principal coordinates from the Jensen Shannon Divergence metric as used by the 'ldavis' package and is the default for Q-matrix or admix objects. By default using plotMDS on a struct object will produce principal coordinates on the clusters themselves rather than within samples.

Examples

Run this code
# struct example
k6_data <- exampleStructure("barplot")
plotMDS(k6_data)
plotMDS(k6_data, method = "jsd")
# admix example
k3_data <- exampleAdmixture()[[3]]
plotMDS(k3_data)

Run the code above in your browser using DataLab