afs | R Documentation |
The afs function calculates the proportion of variants in minor allele count (MAC) bins given parameters, as described in RAREsim.
afs(alpha = NULL, beta = NULL, b = NULL, mac_bins, pop = NULL)
alpha |
AFS function parameter alpha, does not need to be specified if default parameters are used |
beta |
AFS function parameter beta, does not need to be specified if default parameters are used |
b |
AFS function parameter b, does not need to be specified if default parameters are used |
mac_bins |
The rare MAC bins to use, with Lower and Upper boundaries defined |
pop |
The population: AFR, EAS, NFE or SAS - specified when using default parameters |
The default parameters will be used if an ancestrial population is specified: pop = 'AFR', 'EAS', 'NFE', or 'SAS'. Otherwise, the parameters alpha, beta, and b need to be provided. Alpha, beta, and b can be estimated from target data using the *Fit_afs* function. The MAC bins should be exhaustive, non-overlapping bins of rare allele counts with column names Lower and Upper.
data frame with the MAC bins provided and proportion of variants in each bin
data('afs_afr') mac <- afs_afr[,c(1:2)] afs(mac_bins = mac, pop = 'AFR') afs(alpha = 1.594622, beta = -0.2846474, b = 0.297495, mac_bins = mac)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.