How can I get the flanking (1 bp) sequence of a set of SNP positions. I tried to do this with Ensembl but I couldn't figure out how to do this.
Maybe It is still possible with Ensembl but I missed the option. Otherwise what is a easy way with a tool, scripts or api to get the flanking positions?
2 answers
Looks like it's easy with bed tools:
Flank the snp with extra nucleotide in the bed file: http://bedtools.readthedocs.org/en/latest/content/tools/slop.html
Get the fasta regions based on the bed file http://bedtools.readthedocs.org/en/latest/content/tools/getfasta.html
Hi William
It really depends how many you have and how comfortable you are with Perl.
If you've got <1000 ish and you're not keen on using Perl, you can get this data via BioMart. There's a video on using BioMart here:
Use the Short Variation (SNPs and Indels) dataset, then filter by your variant IDs. In attributes, select Sequences and choose how large a flank you'd like.
If you've more than 1000 and are happy with Perl, you can use the Ensembl API. Installation, installation video, core tutorial, variation tutorial, core documentation and variation documentation respectively here.
- http://www.ensembl.org/info/docs/api/core/core_tutorial.html
- http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html
- http://www.ensembl.org/info/docs/Doxygen/core-api/index.html
- http://www.ensembl.org/info/docs/Doxygen/variation-api/index.html
You can extract the variants from the database using the Variation_adaptor. Then you can use the Variation module to get the 5' and 3' flank.
Let me know if you need any help with this
Emily
Log in to answer this question.