adjAF {Summix} | R Documentation |
Adjusts allele frequencies for heterogeneous populations in genetic data given proportion of reference ancestry groups
adjAF(data, reference, observed, pi.target, pi.observed)
data |
dataframe of unadjusted allele frequency for observed group, K-1 reference ancestry allele frequencies for N SNPs |
reference |
character vector of the column names for K-1 reference ancestry groups. The name of the last reference ancestry group is not included as that group is not used to estimate the adjusted allele frequencies. |
observed |
character value for the column name of observed data group |
pi.target |
numeric vector of the mixture proportions for K reference ancestry groups in the target sample or subject. The order must match the order of the reference columns with the last entry matching the missing reference group. |
pi.observed |
numeric vector of the mixture proportions for K reference ancestry groups for the observed group. The order must match the order of the reference columns with the last entry matching the missing reference group. |
pi: table of input reference ancestry groups, pi.observed, and pi.target
observed.data: name of the data column for the observed group from which adjusted ancestry allele frequency is estimated
Nsnps: number of SNPs for which adjusted AF is estimated
adjusted.AF: data frame of original data with an appended column of adjusted allele frequencies
Gregory Matesi, gregory.matesi@ucdenver.edu
Audrey Hendricks, audrey.hendricks@ucdenver.edu
summix
for estimating the proportion of reference ancestry groups and https://github.com/hendriau/Summix for further documentation
data(ancestryData) tmp.aa<-adjAF(data = ancestryData, reference = c("ref_AF_eur_1000G"), observed = "gnomad_AF_afr", pi.target = c(0, 1), pi.observed = c(.15, .85)) tmp.aa$adjusted.AF[1:5,]