EAFs can range between 0 and 1 and is tied to a phenotype ("effect", the frequency of the effect allele in a specific dataset). Compared to that, MAFs represent the frequency of the minor allele, hence it ranges between 0 and 0.5. All EAFs with a value larger than 0.5 are turned into MAFs by subtracting them from 1.

eaf2maf(eaf = NULL)

Arguments

eaf

effect allele frequecy, numeric value between 0 and 1.

Value

numeric maf vector, same length as eaf

Details

To turn MAFs into EAFs knowledge about the effect allele is needed.

Examples

eaf2maf(0.7)
#> [1] 0.3
eaf2maf(c(0.78, 0.32))
#> [1] 0.22 0.32