expected_variants: Combines Number of Variants and AFS functions

View source: R/expected_variants.R

expected_variantsR Documentation

Combines Number of Variants and AFS functions

Description

This function combines the Number of Variants and AFS functions to produces the expected number of variants per Kb in each MAC bin

Usage

expected_variants(Total_num_var, mac_bin_prop)

Arguments

Total_num_var

estimated total number of variants in the region of interest

mac_bin_prop

The MAC bins to use, with three columns: Lower, Upper, and Prop. Lower and Upper define the MAC bins boundaries and Prop is the proportion of variants in each respective bin. Only define for rare variants

Value

data frame with the MAC bins and expected variants

Examples

 data('afs_afr')
 mac <- afs_afr[,c(1:2)]
 expected_variants(Total_num_var = 19.029*nvariant(pop='AFR', N = 8128),
 mac_bin_prop = afs(mac_bins = mac, pop = 'AFR'))


meganmichelle/RAREsim documentation built on June 11, 2022, 7:34 p.m.