updateAF: update allele frequencies function

Description Usage Arguments Value Author(s) Examples

View source: R/updateAF.R

Description

updates allele frequency data in heterogeneous genetic variant data

Usage

1
2
3
4
5
6
7
8
updateAF(
  data,
  reference,
  observed,
  pi_target,
  pi_observed = c(NA),
  panel = c("None")
)

Arguments

data

dataframe

reference

Array of character strings. Column names for the ancestries used in the model

observed

Character string. Column name of observed ancestry

pi_target

Numeric vector. Ancestry proportion values for the target ancestry

pi_observed

Numeric vector. Ancestry proportion values for the observed ancestry.

panel

array of character strings. The reference ancestry to be used in the ancestr() function If the user does not have pi_observed values already.

Value

data.frame data with an additional column at the end containing updated allele frequencies.

Author(s)

Gregory Matesi, gregory.matesi@ucdenver.edu

Examples

1
2
3
4
5
6
data(ancestryData)
updateAF(data   = ancestryData,
    reference   = c("ref_AF_eur_1000G", "gnomAD_AF_afr"),
    observed    = "gnomAD_AF_afr",
    pi_target   = c(1,0),
    pi_observed = c(.15,.18))

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