fix_proxy_alleles: Since proxies are provided with a "Correlated_Alleles" column...

Description Usage Arguments Value Examples

Description

Since proxies are provided with a "Correlated_Alleles" column that links the old alleles to the new alleles. This method converts the alleles accordingly

Usage

1
fix_proxy_alleles(proxies, reverse_direction = FALSE)

Arguments

proxies

the dataframe containing (at least) the following columns EA, NEA (alleles), Correlated_Alleles

reverse_direction

a flag indicating that the replacement should occur in the reverse direction

Value

the same dataframe with the alleles in EA and NEA replaced according to Correlated_Alleles column

Examples

1
2
3
4
5
6
7
8
demo_data
fix_proxy_alleles(data.frame(demo_data,
                             Correlated_Alleles=c("G=G,A=T",
                                                  "C=G,G=C",
                                                  "A=G,G=T",
                                                  "C=T,T=A",
                                                  "C=C,A=T",
                                                  "A=T,G=C")))

richardslab/MRutils documentation built on Dec. 22, 2021, 4 p.m.