Hi Johanna,
Yes you can retrieve the SNP and the sequence around this SNP with
biomaRt. However you have to switch of the checking of filter
validity in the getBM function. You want to retrieve for example 10bp
upstream and downstream of the SNP. Upstream and downstream flanks
are attributes in the SNP BioMart but here they have to be used as
filters as we want to be able to give them a value namely 10bp.
Here's how to do your query:
snp = useMart("snp",dataset="hsapiens_snp")
getBM(c("refsnp_id","snp"),filters=c("refsnp","downstream_flank","upst
ream_flank"),values=list(c("rs1134195","rs4046274"),10,10),mart=snp,
checkFilters=FALSE)
It should give:
V1 V2
1 CTTGTCTTTT%G/T%GTTCTCTTAA rs1134195
2 CTTGTCTTTT%T/G%GTTCTCTTAA rs1134195
3 TTAAGAGAAC%C/A%AAAAGACAAG rs4046274
Cheers,
Steffen
Hello!
I am wondering if there is any easy way of retrieving the sequence of
a SNP
using getSNP and/or getSequence, kind of like the result output in
SNPdb? Or
more preferably, including the SNP, and 40 bases upstream and 40 bases
downstream from the SNP.
Thank you in advance,
Kindest regards,
Johanna