[ensembl-dev] connect ensembl ID and vega ID

Andreas Kusalananda Kähäri ak4 at sanger.ac.uk
Wed Jul 25 10:17:46 BST 2012


For someone intent on not using the API, this is some SQL that might be
helpful:

  SELECT  g.stable_id       AS ensembl_gene_stable_id,
          x.dbprimary_acc   AS havane_gene_stable_id
  FROM    external_db edb
    JOIN  xref x USING (external_db_id)
    JOIN  object_xref ox USING (xref_id)
    JOIN  gene g ON (ox.ensembl_id = g.gene_id)
  WHERE   ox.ensembl_object_type = 'Gene'
    AND   edb.db_name = 'OTTG'
    AND   g.stable_id = 'ENSG00000139618'

To get all genes, remove that last line.



Cheers,
A


On Wed, Jul 25, 2012 at 10:02:47AM +0100, Andy Yates wrote:
> Hi,
> 
> The Ensembl genes are linked to an vega entry via the DBEntry/Cross reference system. Using the API & a gene you can do the following:
> 
> ####################################
> 
> use strict;
> use warnings;
> 
> use Bio::EnsEMBL::Registry;
> Bio::EnsEMBL::Registry->load_registry_from_db(
> -HOST => 'ensembldb.ensembl.org',
> -PORT => 5306,
> -USER => 'anonymous',
> -VERBOSE => 0,
> -DB_VERSION => 67
> );
> 
> my $dba = Bio::EnsEMBL::Registry->get_DBAdaptor('human', 'core');
> my $gene = $dba->get_GeneAdaptor()->fetch_by_stable_id('ENSG00000139618');
> my $vegas = $gene->get_all_DBEntries('OTTG');
> printf("%s -> %s\n", $gene->stable_id(), $_->primary_id()) for @{$vegas};
> 
> ####################################
> 
> For release 67 this gives the following information:
> 
> ENSG00000139618 -> OTTHUMG00000017411
> 
> Mirroring what you see on the gene summary page:
> 
> http://www.ensembl.org/Homo_sapiens/Gene/Summary?g=ENSG00000139618
> 
> Best regards,
> 
> Andy
> 
> Andrew Yates                   Ensembl Core Software Project Leader
> EMBL-EBI                       Tel: +44-(0)1223-492538
> Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468
> Cambridge CB10 1SD, UK         http://www.ensembl.org/
> 
> On 25 Jul 2012, at 09:28, ???? wrote:
> 
> > Hi All
> > 
> > I try to connect ensemb ID and vega ID with the relationships:
> > 
> > core.gene.seq_region_start=vega.gene.seq_region_start
> > core.gene.seq_region_end=vega.gene.seq_region_end
> > 
> > Am I right ? If you have better solution please tell me.
> > 
> > Thanks 
> > 
> > -- 
> > Gang Chen
> > TILSI
> > Taicang Institute For Life Science Information
> > Address: A2/162, Renmin South Road, Taicang, 215400, Jiangsu Province, P.R.China
> > Phone:??+86??512-82782588
> > 
> > _______________________________________________
> > Dev mailing list    Dev at ensembl.org
> > List admin (including subscribe/unsubscribe): http://lists.ensembl.org/mailman/listinfo/dev
> > Ensembl Blog: http://www.ensembl.info/
> 
> 
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> List admin (including subscribe/unsubscribe): http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

-- 
Andreas Kusalananda Kähäri
Ensembl Gene Annotation Team

Sent from the tips of my fingers




More information about the Dev mailing list