LEAPFrOG: LEAPFrOG

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/LEAPFrOG.R

Description

Provides estimates of admixture proportions and parental divergence of these admixture proportions

Usage

1
LEAPFrOG(data,p,Nudge=0.001,NonLinCon=TRUE)

Arguments

data

Vector of allele counts: each element either 0,1,2 or NA.

p

Matrix of allele frequencies. Each row corresponds with a SNP. Number of rows must equal length of data. Each column is a population

Nudge

D for population 1 will be initialised at 0.5+Nudge. Nudge must be greater than 0. In theory the value for Nudge shouldn't affect the final optimum, but may influence the time to convergence. Default is 0.001.

NonLinCon

If TRUE (default), the auglag optimisation function is invoked with a nonlinear constraint imposed on D*m, preventing impossible admixture totals of >1 in the parents. We strongly advise this option

Details

Standard errors returned in the order P-1 m parameters followed by P-1 D parameters. m and D for the Pth population are not estimated directly and have no standard error.

Value

A list including elements

m

A vector of admixture proportions in the genotyped offspring, one proportion per population. These sum to 1.

D

A vector of parental divergence paramaters, one per population.

mse

A vector of length number of populations-. Standard errors for all m estimates save the last populaion

Dse

A vector of length number of populations-. Standard errors for all D estimates save the last populaion

P1

Admixture proportions for each population, for parent 'A', derived from the m and D estimates.

P2

Admixture proportions for each population, for parent 'B', derived from the m and D estimates

value

Value of the optimised likelihood function.

counts

Number of times the likelihood function and gradient function were called during optimisation.

Author(s)

Daniel Crouch & Michael Weale, Department of Medical and Molecular Genetics, King's College London

See Also

LEAPFrOG_plot,LEAPFrOG_EM,BEAPFrOG

Examples

1
2
3
4
5
6
#Example with nonsense data -
#10000 random SNP genotypes 
#...and uniform, random allele frequencies from two populations.
library(LEAPFrOG)
z1=LEAPFrOG(sample(0:2,10000,replace=TRUE),cbind(runif(10000,0,1),runif(10000,0,1)))
z1

LEAPFrOG documentation built on May 2, 2019, 12:38 p.m.