[ensembl-dev] error in getting EntrezGene IDs from Ensembl $gene

Jerry Li jli94080 at gmail.com
Thu Aug 30 04:24:38 BST 2012


Hi All,
Sorry to bother you all on this topic but I can really use some advice.

Based on an example I found in the email archive
http://lists.ensembl.org/pipermail/dev/2010-September/005130.html
I put together the following code to retrieve the EntrezGene IDs based on
Ensembl $gene.  However, no result was returned.
The database I accessed was homo_sapiens_rnaseq_68_37, and logic_name is
ovary_rnaseq.
Can anyone provide some pointer on how I can get this data?

foreach my $slice (@$slices) {
  # fetch genes from rnaseq
  my $genes = $slice->get_all_Genes($logic_name);
  foreach my $gene (@$genes) {
       foreach my $dbes ($gene->get_all_DBLinks("EntrezGene")){
            foreach my $dbe (@{$dbes}){
                print $dbe->primary_id(), "\t";
            }
        }
   }
}


Thanks,
Jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20120829/a0693081/attachment.html>


More information about the Dev mailing list