adjAF | R Documentation |
Adjusts allele frequencies for heterogeneous populations in genetic data given proportion of reference groups
adjAF(
data,
reference,
observed,
pi.target,
pi.observed,
adj_method = "average",
N_reference = NULL,
N_observed = NULL,
filter = TRUE
)
data |
dataframe of unadjusted allele frequency for observed group, K reference group allele frequencies for N SNPs |
reference |
character vector of the column names for K reference groups. |
observed |
character value for the column name of observed data group |
pi.target |
numeric vector of the mixture proportions for K reference groups in the target individual or group. |
pi.observed |
numeric vector of the mixture proportions for K reference groups in the observed group. |
adj_method |
user choice of method for the allele frequency adjustment: options "average" and "leave_one_out" are available. Defaults to "average". |
N_reference |
numeric vector of the sample sizes for each of the K reference groups. |
N_observed |
numeric value of the sample size of the observed group. |
filter |
sets adjusted allele frequencies equal to 1 if > 1, to 0 if > -.005 and < 0, and removes adjusted allele frequencies < -.005. |
pi: table of input reference groups, pi.observed, and pi.target
observed.data: name of the data column for the observed group from which adjusted 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
effective.sample.size: The sample size of individuals effectively represented by the adjusted allele frequencies
Adelle Price, adelle.price@cuanschutz.edu
Hayley Wolff, hayley.wolff@cuanschutz.edu
Audrey Hendricks, audrey.hendricks@cuanschutz.edu
https://github.com/hendriau/Summix2
https://github.com/hendriau/Summix2 for further documentation.
data(ancestryData)
adjusted_data<-adjAF(data = ancestryData,
reference = c("reference_AF_afr", "reference_AF_eur"),
observed = "gnomad_AF_afr",
pi.target = c(1, 0),
pi.observed = c(.85, .15),
adj_method = 'average',
N_reference = c(704,741),
N_observed = 20744,
filter = TRUE)
adjusted_data$adjusted.AF[1:5,]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.