find_nearest_genes: Find the nearest genes for top SNPs in each locus.

View source: R/gene_mapping.R

find_nearest_genesR Documentation

Find the nearest genes for top SNPs in each locus.

Description

Find the nearest genes for top SNPs in each locus.

Usage

find_nearest_genes(
  top.snps,
  genes,
  dist.to = c("genebody", "tss"),
  cols.to.keep = c("snp", "chr", "pos", "nearest_gene")
)

Arguments

top.snps

A GRanges object of the GWAS summary statistics for the top SNPs

genes

A GRanges object of gene information

dist.to

Find nearest genes by distance to gene body or TSS

cols.to.keep

columns to keep in the result

Value

A data frame with SNP locations and nearest genes.


kevinlkx/mapgen documentation built on March 31, 2024, 11:03 p.m.