| AdmixGlobal | R Documentation |
This function performs global admixture inference from discrete or continuous allele dosages
AdmixGlobal(
Geno,
K,
P = NULL,
ParamToUpdate = "both",
MaxIter = 200L,
MinIter = 10L,
MinParamBound = 1e-06,
LogLikThresh = 0.001,
PropInit = NULL,
FreqInit = NULL,
NbThreads = 0L,
Seed = 123L,
Verbose = TRUE
)
Geno |
List of genotying matrices of size |
K |
Number of ancestral groups (positive integer superior or equal to 2) |
P |
Ploidy level (positive integer), to be used when read depth ratios are
specified in |
ParamToUpdate |
Specify |
MaxIter |
Maximum number of iterations
(positive integer greater than or equal to |
MinIter |
Minimum number of iterations
(positive integer greater than or equal to 2 and smaller than or equal to |
MinParamBound |
Minimum value for admixture proportions and ancestral allele frequencies (positive numeric value) |
LogLikThresh |
Algorithm convergence criterion (positive numeric value) consisting of a log-likelihood difference value between two iterations |
PropInit |
Matrix of dimension |
FreqInit |
List of matrices of size |
NbThreads |
Number of threads to be used (positive integer) with a default value of 0 setting automatically all threads available |
Seed |
Seed for reproducible inference (integer) |
Verbose |
A boolean describing if detailed information should be printed |
The function AdmixGlobal() performs global (genome-wide) admixture inference
from genotyping data (Geno) formatted as a list of matrices (one for each marker),
by specifying the number of ancestral groups (K).
The inference is performed using an expectation-maximization (EM) algorithm whose
minimum (MinIter) and maximum (Maxiter) number of iterations can be fixed by
the user, as well as the log-likelihood convergence threshold (LogLikThresh).
A minimum value for admixture proportions ancestral allele frequencies
is set using MinParamBound, which should be above zero to prevent computational
issues. By default, all available threads/CPU cores are used but the number
can be chosen using NbThreads.
If allele dosages are used, the ploidy level (P) does not have to be
specified as it is automatically calculated from the dosages. However, it
must be specified if the genotypic data correspond to ratios constrained
between 0 and 1 (e.g. obtained from allele read depths).
By default, the EM algorithm is initialized with random parameter values but
admixture proportions and ancestral allele frequencies can be initialized
using PropInit and FreqInit, respectively.
By default, both types of parameters are updated by the EM, but only one of
them can be updated while the other is fixed using ParamToUpdate. This is
particularly interesting when allele frequencies have been estimated on a
reference panel (e.g. stored into a list FreqRef)
and are used to estimated the admixture proportions
of a new panel of individuals. This scenario can be implemented by
initializing allele frequencies (FreqInit=FreqRef) and specifying
to update only admixture proportions (ParamToUpdate=Prop).
A list of three items: a matrix of admixture proportions (Prop),
a list of matrices of allele frequencies in ancestral groups (Freq),
and a vector of log-likelihood values over iterations (LogLik)
SimulatePop() to simulate a polyploid admixed population.
AdmixLocal() to perform local admixture inference using the results from
the AdmixGlobal() function.
GlobalPlot() to generate an admixture barplot using the results from
the AdmixGlobal() function.
## Simulate a polyploid admixed population
DataSim <- SimulatePop(K=3L, N=10L, P=6L, M=50L, C=5L, L=10L, Seed=123, NbThreads=1)
## Perform global admixture inference
ResGlobalAdmix <- AdmixGlobal(Geno=DataSim$Geno, K=3, Verbose=FALSE, NbThreads=1)
## Estimated admixture proportions
head(ResGlobalAdmix$Prop)
## Estimated allele frequencies at first marker
ResGlobalAdmix$Freq[[1]]
## Log-likelihood over iterations
head(ResGlobalAdmix$LogLik)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.