qpadm_p: Faster version of 'qpadm' with reduced output

qpadm_pR Documentation

Faster version of qpadm with reduced output

Description

Models target as a mixture of left populations, given a set of outgroup right populations. Can be used to estimate admixture proportions, and to estimate the number of independent admixture events.

Usage

qpadm_p(
  f2_data,
  left,
  right,
  target = NULL,
  fudge = 1e-04,
  boot = FALSE,
  constrained = FALSE,
  rnk = length(setdiff(left, target)) - 1,
  cpp = TRUE,
  weights = FALSE,
  f4blocks = NULL
)

Arguments

left

Left populations (sources)

right

Right populations (outgroups)

target

Target population

fudge

Value added to diagonal matrix elements before inverting

boot

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.

constrained

Constrain admixture weights to be non-negative

rnk

Rank of f4-matrix. Defaults to one less than full rank.

cpp

Use C++ functions. Setting this to FALSE will be slower but can help with debugging.

weights

Return weights (default = FALSE)

f4blocks

Instead of f2 blocks, f4 blocks can be supplied. This is used by qpadm_multi

Value

Data frame with f4rank, dof, chisq, p, feasible

See Also

qpadm

Examples

left = c('Altai_Neanderthal.DG', 'Vindija.DG')
right = c('Chimp.REF', 'Mbuti.DG', 'Russia_Ust_Ishim.DG', 'Switzerland_Bichon.SG')
target = 'Denisova.DG'
qpadm_p(example_f2_blocks, left, right, target)

uqrmaie1/admixtools documentation built on Nov. 3, 2024, 12:56 a.m.