This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to query ensembl sql database - to check if a snp (name = rs...) is in an intron ?

how to query ensembl sql database - to check if a snp (name = rs...) is in an intron ?

I would like to use mysql to do that

Thanks, pini.

ensembl mysql intron snp

2 answers

mysql -h ensembldb.ensembl.org -u anonymous -P 5306
use homo_sapiens_variation_79_38;
select variation.name, variation_feature.consequence_types from variation, variation_feature where variation.variation_id = variation_feature.variation_id and variation.name = "rs...";

Note that e80 is in the process of coming out so if you want the most recent data, wait a few hours and make it:

use homo_sapiens_variation_80_38;

The schema is at http://www.ensembl.org/info/docs/api/variation/variation_schema.html. Note that that link won't work right now (e80 coming out) so give it a couple of hours.

I have this code to query dbSNP IDs

https://gist.github.com/0a55c78739e9890e5dc9

Is there a way of doing this if you do NOT have the SNP name you want, but do have the chr / pos / a1 / a0? So I would like to find out what the possible SNPs could be using this info. Is there a way of doing this? Thanks!

Log in to answer this question.