Retrieve SNP flanking sequences in biomaRt
1
2
Entering edit mode
@anajacintafernandes-11899
Last seen 6.6 years ago
CBMR, Portugal

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

biomart snp upstream_flank downstream_flank • 2.2k views
ADD COMMENT
1
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 2 hours ago
EMBL Heidelberg

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 COMMENT
0
Entering edit mode

Hi Mike,

This is great, thanks very useful. I was wondering is there also an option to do this for chr:bp format? Some of my variants do not have an rsid....

ADD REPLY
0
Entering edit mode

Might be best to start a new question with an example of the data you have and what you're trying to get out.

ADD REPLY

Login before adding your answer.

Traffic: 787 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6