Models target as a mixture of left populations, and outgroup right populations. Uses Lazaridis method based non-negative least squares of f4 matrix.
lazadm(data, left, right, target, boot = FALSE, constrained = TRUE)
The input data in the form of:
A 3d array of blocked f2 statistics, output of f2_from_precomp
or extract_f2
A directory with f2 statistics
The prefix of a genotype file
Left populations (sources)
Right populations (outgroups)
Target population
If FALSE
(the default), block-jackknife resampling will be used to compute standard errors.
Otherwise, block-bootstrap resampling will be used to compute standard errors. If boot
is an integer, that number
will specify the number of bootstrap resamplings. If boot = TRUE
, the number of bootstrap resamplings will be
equal to the number of SNP blocks.
Constrain admixture weights to be non-negative
lazadm
returns a data frame with weights and standard errors for each left population
Patterson, N. et al. (2012) Ancient admixture in human history. Genetics
Haak, W. et al. (2015) Massive migration from the steppe was a source for Indo-European languages in Europe. Nature (SI 9)
target = 'Denisova.DG'
left = c('Altai_Neanderthal.DG', 'Vindija.DG')
right = c('Chimp.REF', 'Mbuti.DG', 'Russia_Ust_Ishim.DG', 'Switzerland_Bichon.SG')
lazadm(example_f2_blocks, left, right, target)
#> # A tibble: 2 × 5
#> target left weight se z
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 Denisova.DG Altai_Neanderthal.DG 1.00e+ 0 1.94e-13 5.17e12
#> 2 Denisova.DG Vindija.DG 2.49e-12 1.93e-13 1.29e 1
lazadm(example_f2_blocks, left, right, target, constrained = FALSE)
#> # A tibble: 2 × 5
#> target left weight se z
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 Denisova.DG Altai_Neanderthal.DG 4.79 6.69 0.716
#> 2 Denisova.DG Vindija.DG -3.79 6.69 -0.567