<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Pengfei,<br>
    <br>
    I am not entirely sure which data you are looking at, but depending
    on the databases, not all genes will have a description or an
    external_name.<br>
    <br>
    For a given gene, we assign a display xref if we find an external
    reference from a trusted source matching the ensembl gene.<br>
    That xref (external reference) is then used to assign a display name
    to the gene.<br>
    If there is no such external reference, the gene will have no
    display name and we will use the ensembl stable id instead.<br>
    <br>
    A similar rule applies to assigning descriptions.<br>
    <br>
    <br>
    Hope that helps,<br>
    Magali<br>
    <br>
    <div class="moz-cite-prefix">On 10/02/2014 05:22, 刘鹏飞 wrote:<br>
    </div>
    <blockquote
cite="mid:CAH_jMvv+z1G21GfqObhLsTdpuqEvGgEUjx-PnNBwY7w1W0Y6Jw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi Magali and <br>
        </div>
        <div>Hi all,<br>
          <br>
        </div>
        <div>I use following code to fetch all information of genes for
          a bacteria, but get some errors (althouth I could get all data
          I wanted), but I could not figure out where goes wrong,
          thanks:<br>
        </div>
        <div>errors:<br>
          Use of uninitialized value in print at HZ254_genedata.pl line
          20.<br>
          <br>
          scripts:<br>
          # methanocella_conradii_hz254 <br>
          #HZ254_genedata.pl<br>
          #!/usr/bin/perl<br>
          use strict;<br>
          use warnings;<br>
          use Bio::EnsEMBL::LookUp;<br>
          # load the lookup from the main Ensembl Bacteria public server<br>
          my $lookup = Bio::EnsEMBL::LookUp->new(<br>
            -URL => "<a moz-do-not-send="true"
            href="http://bacteria.ensembl.org/registry.json">http://bacteria.ensembl.org/registry.json</a>",<br>
            -NO_CACHE => 1<br>
          );<br>
          # find the correct database adaptor using a unique name<br>
          my ($dba) = @{$lookup->get_by_name_exact(<br>
            'methanocella_conradii_hz254'<br>
          )};<br>
          my $genes = $dba->get_GeneAdaptor()->fetch_all(); <br>
          # get all gene infomation<br>
          open (MYFILE, '>>HZ254gene_data.txt');<br>
          foreach my $gene (@$genes){<br>
          print $gene->stable_id,"\t", <br>
          $gene->display_id,"\t",<br>
          $gene->description,"\t", <br>
          $gene->start, " - ", <br>
          $gene->end, "\t", <br>
          $gene->external_name, "\t",<br>
          $gene->length,"\n";<br>
          };<br>
          close (MYFILE);<br>
        </div>
        <div>##API version 74<br>
          <br>
        </div>
        <div>
          <div>
            <div><br>
              -- <br>
              <div>Pengfei Liu, PhD Candidate<br>
                <br>
                Lab of Microbial Ecology<br>
                College of Resources and Environmental Sciences<br>
                China Agricultural University<br>
                No.2 Yuanmingyuanxilu, Beijing, 100193<br>
                P.R. China<br>
                <br>
                Tel: +86-10-62731358<br>
                Fax: +86-10-62731016<br>
                 <br>
                E-mail: <a moz-do-not-send="true"
                  href="mailto:liupfskygre@gmail.com" target="_blank">liupfskygre@gmail.com</a></div>
              <div> </div>
              <div>If you are afraid of tomorrow, how can you enjoy
                today! </div>
              <div>Keep hungry, Keep foolish! </div>
              <div>Moving forward!</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>