motifbreakR (version 1.2.2)

snps.from.rsid: Import SNPs from rsid for use in motifbreakR

Description

Import SNPs from rsid for use in motifbreakR

Usage

snps.from.rsid(rsid = NULL, dbSNP = NULL, search.genome = NULL)

Arguments

rsid
Character; a character vector of rsid values from dbSNP
dbSNP
an object of class SNPlocs to lookup rsids; see availible.SNPs in injectSNPs to check for availible SNPlocs
search.genome
an object of class BSgenome for the species you are interrogating; see available.genomes for a list of species

Value

  • a GRanges object containing:
  • SNP_idThe rsid of the snp with the "rs" portion stripped
  • alleles_as_ambigTHE IUPAC ambiguity code between the reference and alternate allele for this SNP
  • REFThe reference allele for the SNP
  • ALTThe alternate allele for the SNP

Details

snps.from.rsid take an rsid, or character vector of rsids and generates the required object to input into motifbreakR

See Also

See motifbreakR for analysis; See snps.from.file for an alternate method for generating a list of variants.

Examples

Run this code
library(BSgenome.Hsapiens.UCSC.hg19)
 library(SNPlocs.Hsapiens.dbSNP.20120608)
 snps.file <- system.file("extdata", "pca.enhancer.snps", package = "motifbreakR")
 snps <- as.character(read.table(snps.file)[,1])
 snps.mb <- snps.from.rsid(snps,
                           dbSNP = SNPlocs.Hsapiens.dbSNP.20120608,
                           search.genome = BSgenome.Hsapiens.UCSC.hg19)

Run the code above in your browser using DataLab