Search
Question: Retrieve SNP flanking sequences in biomaRt
0
gravatar for anajacintafernandes
12 months ago by
CBMR, Portugal
anajacintafernandes0 wrote:

Hi, 

I can't retrieve the flanking regions of my snps.

I used:

snpmart<- useMart("ENSEMBL_MART_SNP",dataset = "hsapiens_snp")

TEST<- getBM(attributes = c("refsnp_id","upstream_flank","downstream_flank"), filters = c("snp_filter","upstream_flank","downstream_flank"), checkFilters = FALSE, values = list(proxy_list,20,20), mart = snpmart)

where proxy_list is a list of several snps

and it gave me this error:

Error in getBM(attributes = c("refsnp_id", "upstream_flank", "downstream_flank"),  : 
  Query ERROR: caught BioMart::Exception: non-BioMart die(): Can't use an undefined value as an ARRAY reference at /ensemblweb/wwwmart/www_86/biomart-perl/lib/BioMart/Dataset/GenomicSequence.pm line 396.

sessionInfo()

R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS

 

Hope you can help me out

cheers, 

ana

ADD COMMENTlink modified 12 months ago by Mike Smith2.1k • written 12 months ago by anajacintafernandes0
1
gravatar for Mike Smith
12 months ago by
Mike Smith2.1k
EMBL Heidelberg / de.NBI
Mike Smith2.1k wrote:

This is all very opaque, but you don't need to specify that you want to retrieve the flanking sequences in the attributes arguments.  However you do need to include something called 'snp' which will contain both the variant in question and the sequence on each side.  This code gives an example for two SNPs.

snp_list <- list("rs25", "rs16944")

snp_sequence <- getBM(attributes = c("refsnp_id", "snp"), 
                filters = c("snp_filter", "upstream_flank", "downstream_flank"), 
                checkFilters = FALSE, 
                values = list(snp_list, 20, 20), 
                mart = snpmart, 
                bmHeader = TRUE)
> snp_sequence
                               Variant sequence Variant Name
1 TGGGTGCTGTTCTCTGCCTC%A/G%GGAGCTCTCTGTCAATTGCA      rs16944
2 ACTATCAAATTCCAATTGCA%T/C%AGGATTGCATGCAGAAGCTC         rs25

I'll take a look at adding this example to the vignette, since I couldn't find any working examples of how to do this in the documentation.

ADD COMMENTlink modified 12 months ago • written 12 months ago by Mike Smith2.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 129 users visited in the last hour