ancestr: Hidden Ancestries function

Description Usage Arguments Value Author(s) Examples

View source: R/ancestr.R

Description

Estimates ancestry proportions in heterogeneous allele frequency data

Usage

1
ancestr(data = NULL, k = c(NA), t = NA, x0 = NULL)

Arguments

data

Dataframe: This dataframe should be in the format described in our data formatting document.

k

Vector of character strings: Column names of reference ancestries to be included in the model.

t

Character sting: column name of the observe ancestry.

x0

Numeric vector: x_0 is the starting guess for the SLSQP algorithm.

Value

Estimated ancestry proportions

Author(s)

Gregory Matesi, gregory.matesi@ucdenver.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# load the data
data("ancestryData")

# Estimate 5 reference ancestry proportion values for the gnomAD african american ancestry group
# using a starting guess of .2 for each ancestry proportion.
ancestr( data = ancestryData, 
    k=c("ref_AF_afr_1000G", 
        "ref_AF_eur_1000G", 
        "ref_AF_sas_1000G", 
        "ref_AF_iam_1000G", 
        "ref_AF_eas_1000G"), 
    t="gnomAD_AF_afr", 
    x0 = c(.2, .2, .2, .2, .2) )

GregoryMatesi/RHiddenAncestries documentation built on July 9, 2020, 7:58 a.m.