annotate_with_nearest_gene() Annotate the variant/snp with their nearest gene Required parameters is a dataframe of SNPs (with the columns CHROM and POS)

annotate_with_nearest_gene(variants, protein_coding_only = FALSE, build = 38)

Arguments

variants

a dataframe of variant positions (CHROM and POS)

protein_coding_only

Logical, if set to TRUE only annotate with protein coding genes (the default value is FALSE)

build

A number representing the genome build. Set to 37 to change to build (GRCh37). The default is build 38 (GRCh38).

Value

the input dataframe with Gene_Symbol as an additional column

Examples

variants <-get_lead_snps(CD_UKBB)
annotate_with_nearest_gene(variants)
#> # A tibble: 9 × 10
#>   CHROM       POS ID       REF   ALT          P    OR     AF Gene_Symbol biotype
#>   <chr>     <int> <chr>    <chr> <chr>    <dbl> <dbl>  <dbl> <chr>       <chr>  
#> 1 chr6   31660620 rs14884… T     A     1.47e-24 2.43  0.0103 C6orf47     protei…
#> 2 chr16  50729867 rs20668… G     GC    7.37e-24 2.14  0.0159 NOD2        protei…
#> 3 chr1   67216513 rs11576… G     A     8.04e-20 0.777 0.441  C1orf141    protei…
#> 4 chr16  50485831 rs76176… A     G     8.18e-16 1.75  0.0227 NKD1        protei…
#> 5 chr6   32708532 rs14461… A     C     1.28e-15 1.80  0.0200 MTCO3P1     unproc…
#> 6 chr7   50274703 rs22193… T     G     8.52e-14 1.23  0.593  IKZF1       protei…
#> 7 chr9    4984530 rs18874… G     C     5.04e-11 0.833 0.633  JAK2        protei…
#> 8 chr5   40439961 rs77132… C     T     7.43e-11 1.20  0.602  TTC33       protei…
#> 9 chr2  233237298 rs13418… A     C     1.70e- 9 1.18  0.506  ATG16L1     protei…