convert_loc_to_rs: Convert CHR:BP locations to rs ids.

View source: R/convert_rs_to_loc.R

convert_loc_to_rsR Documentation

Convert CHR:BP locations to rs ids.

Description

Function will convert genomic co-ordinates to rs ids.

Usage

convert_loc_to_rs(df, dbSNP)

Arguments

df

dataframe. Dataframe containing SNPs as genomic locations. Must contain 2 columns labelled CHR and BP, with chromosome and base pair positions, respectively. If the dataframe contains additional columns included these will be preserved.

dbSNP

BS genome reference snps (choose appropriate dbSNP build dependent on genome build).

Value

Dataframe with rs ids and CHR:BP locations.

Warning

  • Some CHR:BP locations have more than one associated rs id, thus some filtering for duplicates may have to occur after conversion. We leave this to the user to decide how they wish to filter.

  • Some CHR:BP locations may not have an associated rs id – these will be represented by NA in the SNP column after conversion.


RHReynolds/colochelpR documentation built on June 18, 2022, 5:53 a.m.