adjAF_calc | R Documentation |
Helper function for calculating allele frequencies for heterogeneous populations in genetic data given proportion of reference groups
adjAF_calc(data, reference, observed, pi.target, pi.observed)
data |
dataframe of unadjusted allele frequency for observed group, K-1 reference group allele frequencies for N SNPs |
reference |
character vector of the column names for K-1 reference groups. The name of the last reference 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 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 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 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.