Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

qpAdm_rotation

Fit qpAdm models based on the rotation strategy described in Harney et al. 2020 (bioRxiv)


Description

Fit qpAdm models based on the rotation strategy described in Harney et al. 2020 (bioRxiv)

Usage

qpAdm_rotation(
  data,
  target,
  candidates,
  minimize = TRUE,
  nsources = 2,
  ncores = 1,
  fulloutput = FALSE
)

Arguments

data

EIGENSTRAT dataset

target

Target population that is modeled as admixed

candidates

Potential candidates for sources and outgroups

minimize

Test also all possible subsets of outgroups? (default TRUE)

nsources

Number of sources to pull from the candidates

ncores

Number of CPU cores to utilize for model fitting

fulloutput

Report also 'ranks' and 'subsets' analysis from qpAdm in addition to the admixture proportions results? (default FALSE)

Value

qpAdm list with proportions, ranks and subsets elements (as with a traditional qpAdm run) or just the proportions (determined by the value of the 'fulloutput' argument)

Examples

## Not run: # download an example genomic data set and prepare it for analysis
snps <- eigenstrat(download_data(dirname = tempdir()))

# find the set of most likely two-source qpAdm models of
# a French individual - produce only the 'proportions'
# qpAdm summary
models <- qpAdm_rotation(
    data = snps,
    target = "French",
    candidates = c("Dinka", "Mbuti", "Yoruba", "Vindija",
                   "Altai", "Denisova", "Chimp"),
    minimize = TRUE,
    nsources = 2,
    ncores = 2,
    fulloutput = FALSE
)

## End(Not run)

admixr

An Interface for Running 'ADMIXTOOLS' Analyses

v0.9.1
MIT + file LICENSE
Authors
Martin Petr [aut, cre] (<https://orcid.org/0000-0003-4879-8421>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.