[ensembl-dev] Gene and RS
Will McLaren
wm2 at ebi.ac.uk
Wed Apr 16 14:02:56 BST 2014
If you do want a quick way to get all rsIDs that fall in a gene, this query
should work:
SELECT vf.variation_name
FROM homo_sapiens_variation_75_37.variation_feature vf,
homo_sapiens_core_75_37.gene g
WHERE g.seq_region_id = vf.seq_region_id
AND vf.seq_region_end >= g.seq_region_start
AND vf.seq_region_start <= g.seq_region_end
AND vf.source_id = 1
AND g.stable_id = 'ENSG00000196218'
Replace ENSG00000196218 with the stable identifier of your gene of
interest. Remove "AND vf.source_id = 1" if you also want variation features
from sources that aren't dbSNP.
As Kieron says, we would encourage you to use our perl API, REST API or
BioMart, all of which can accomplish this same task without the risks of
schema changes.
The REST API is particularly suited to this sort of task; the following URL
retrieves all variants in a gene with ID ENSG00000157764:
http://beta.rest.ensembl.org/feature/id/ENSG00000157764?feature=variation;content-type=application/json
See http://beta.rest.ensembl.org/documentation/info/feature_id for more
details.
Regards
Will McLaren
Ensembl Variation
On 16 April 2014 13:46, Kieron Taylor <ktaylor at ebi.ac.uk> wrote:
> Ensembl has a table for each genetic feature type, hence we have a
> Transcript table, a Gene table, and one for each class of variation. Each
> table shares a common set of fields, plus more that are specific to that
> feature. This is slightly contrary to a traditionally normalised schema.
>
> It is not clear to me what you mean by "RS inside a Gene". If you wish to
> understand our schema, please take a look at the following link.
>
> http://www.ensembl.org/info/docs/api/core/core_schema.html
>
> I urge you to find another way to access our data if at all possible.
> Direct SQL queries against our schema is sometimes the right solution, but
> suffers when we have to make changes in later releases. Our API and other
> services insulate you from these changes. Also, some commonly required data
> is computed and therefore cannot be found in the database at all.
>
> Regards,
>
> Kieron Taylor
> Ensembl Core
>
>
> On 16/04/2014 13:17, Igo Medeiros wrote:
>
>> Hi,
>> how can I found relation, in DB, between Gene and all RS inside Gene?
>> there are columns like seq_region_start, seq_region_end ans
>> seq_region_id those repeat in three tables(variation_feature,
>> structural_variation_feature and phenotype_feature), what the diferent
>> between them?
>> Sorry for my english, its not so good. And thank you for help.
>>
>> --
>> Igo Paixão de Medeiros
>>
>>
>
> _______________________________________________
> Dev mailing list Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20140416/4ab50fd0/attachment.html>
More information about the Dev
mailing list