biomart.SNP.rsID: Fetches the rs SNP IDs given the chromosomal coordinates and...

View source: R/biomart_queries.R

biomart.SNP.rsIDR Documentation

Fetches the rs SNP IDs given the chromosomal coordinates and alleles

Description

Uses biomaRt function to fetch the rs SNP ID for the given chromosoma coordinates and alleles. If no SNP is found in that position with those alleles NA is returned. It uses the given BioMart database.

Usage

biomart.SNP.rsID(
  chr,
  ps,
  allele0,
  allele1,
  mart,
  with.position = FALSE,
  with.alleles = FALSE
)

Arguments

chr

chromosome number (1, 2, ...)

ps

position (bp)

allele0

alternate allele

allele1

reference allele

mart

BioMart database

with.position

whether including chromosome name and start and end position (default: false)

with.alleles

whether including variant alleles (default: false, if with.position==TRUE is forced to TRUE)

Value

reference SNP IDs, or reference SNP IDs plus genomic coordinates and alleles

Author(s)

Alessia Visconti, Niccolo' Rossi

Examples

mybiomart <- biomart.fetch.SNP.grch37.mart()
biomart.SNP.rsID(7, 24966446, "C", "A", mybiomart)
biomart.SNP.rsID(17, 75020291, "A", "G", mybiomart)
biomart.SNP.rsID(7, 24966446, "C", "A", mybiomart, with.position=TRUE)
biomart.SNP.rsID(17, 75020291, "A", "G", mybiomart, with.alleles=TRUE)
biomart.SNP.rsID(5, 70119760, "A", "G", mybiomart, with.alleles=TRUE)

alesssia/timesaveR documentation built on Jan. 26, 2024, 5:21 p.m.