find_nearest_gene: Annotates nearest gene for list of SNPs

Description Usage Arguments Value

View source: R/find-nearest-gene.R

Description

Finds the nearest gene for a list of markers. The input data expects a data frame with headers: rsid, chromosome, position. The list of annotations are obtained from PLINK documentation https://www.cog-genomics.org/plink/1.9/resources/

Usage

1
2
3
find_nearest_gene(data, flanking = 100, build = "hg19",
  collapse = TRUE, snp = "rsid", chr = "chromosome",
  bp = "position")

Arguments

data

dataframe with results

flanking

flanking distance (in kB) on each side (ie. 20kb = spans 40kb) defaults to 100kb (spans 200kb)

build

string specifying build (hg19 (default), hg18, hg38)

collapse

if TRUE (default) collapses nearest genes into single commasep. line. If FALSE returns all annotated genes on separate lines with a 'distance' column showing how many bp upstream (+) or downstream(-) the SNP is located

snp

snp column name in input data

chr

chromosome column name in input data

bp

position/bp column name in input data

Value

data frame with nearest gene specified per marker


oyhel/vautils documentation built on Nov. 14, 2019, 4:38 p.m.