Description Usage Arguments Value
View source: R/helperFunctions.R
A function to reorder the data to make the populations appear in the same order as the latent clusters. Takes an admixture matrix and reorders the rows according to a desired vector of population names. It then reorders the columns so that the latent clusters are ordered similarly to the labels.
1 |
Q |
A matrix of admixture estimates for each individual |
ids |
A data frame containing 2 or more columns. The first are individual identifiers, the second are population identifiers. Any further columns are ignored. NB: Chromopainter excludes individuals in the third column that have a 0; you are advised to do this before passing to this function. |
poporder |
A list of the order that we want populations to appear in. If NULL, populations will be ordered as they appear in the data |
thresh |
A threshold for the admixture memberships when counting how to order columns of Q |
A reordered matrix of the Q values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.