<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks for the feedback. I have read the tutorial and understood most of it (at least this is what I think!). The main manual which contains all class names and member functions is comprehensive though and need more elaboration...<br><br>What $brca_gene->seq prints is not the same as the website. That perl command prints GGGCTTGTGGC.... however the sequence section of the web frontend (<a href="http://grch37.ensembl.org/Homo_sapiens/Gene/Sequence?db=core;g=ENSG00000139618;r=13:32889611-32973805">http://grch37.ensembl.org/Homo_sapiens/Gene/Sequence?db=core;g=ENSG00000139618;r=13:32889611-32973805</a>) starts with<span class="gmail-adorn gmail-adorn-0 gmail-_seq"> TACCAAGCCC</span>...<br></div><div class="gmail_extra"><br><br><div style="font-family:tahoma,sans-serif" class="gmail_default">​I have to say that ​GGGCTTGTGGC.... is the start of an exon which is inside the printed sequence from the web page. <br></div><br><div style="font-family:tahoma,sans-serif" class="gmail_default">​I also double checked with<br><br>my $slice = $slice_adaptor->fetch_by_gene_stable_id( 'ENSG00000139618');<br>my $sequence = $slice->seq();<br>print $sequence, "\n";<br></div><br><div style="font-family:tahoma,sans-serif" class="gmail_default">​and it was not the same as the web's output. Is seq() the same as Gene/Sequence?db=core in the URL?​</div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><font face="tahoma,sans-serif">Regards,<br>Mahmood</font><br><br><br></div></div></div>
<br><div class="gmail_quote">On Thu, Jun 29, 2017 at 12:38 PM, mag <span dir="ltr"><<a href="mailto:mr6@ebi.ac.uk" target="_blank">mr6@ebi.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    Hi Mahmood,<br>
    <br>
    To access all genes in a species, you can use directly the
    GeneAdaptor.<br>
    This will allow you to loop through all the genes without having to
    retrieve the chromosomes first.<br>
    <br>
    Additionally, there is a method called fetch_all_by_external_name<br>
<a class="gmail-m_3568198557353766854moz-txt-link-freetext" href="http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1DBSQL_1_1GeneAdaptor.html#a940d6dc7e9273ad373a23eb563a455e6" target="_blank">http://www.ensembl.org/info/<wbr>docs/Doxygen/core-api/<wbr>classBio_1_1EnsEMBL_1_1DBSQL_<wbr>1_1GeneAdaptor.html#<wbr>a940d6dc7e9273ad373a23eb563a45<wbr>5e6</a><br>
    which allows you to retrieve all Gene objects for a gene symbol.<br>
    <br>
    An example script would look like:<br>
    $registry->load_registry_from_<wbr>db(<br>
      -host => '<a href="http://ensembldb.ensembl.org" target="_blank">ensembldb.ensembl.org</a>',<br>
      -user => 'anonymous',<br>
      -port => 3337<br>
    );<br>
    my $gene_adaptor = $registry->get_adaptor('human'<wbr>, 'core',
    'Gene');<br>
    my @genes = @{ $gene_adaptor->fetch_all() };<br>
    my @brca_genes = @{
    $gene_adaptor->fetch_all_by_<wbr>external_name('BRCA2') };<br>
    while (my $brca_gene = shift @brca_genes) {<br>
      print ">" . $brca_gene->stable_id . " " .
    $brca_gene->display_xref-><wbr>display_id . "\n";<br>
      print $brca_gene->seq . "\n";<br>
    }<br>
    <br>
    I would recommend looking through our API course to get more
    familiar with it.<br>
    We have slides from our in-person workshops<br>
    <a class="gmail-m_3568198557353766854moz-txt-link-freetext" href="https://github.com/Ensembl/ensembl-presentation/tree/master/API/Core" target="_blank">https://github.com/Ensembl/<wbr>ensembl-presentation/tree/<wbr>master/API/Core</a><br>
    a tutorial<br>
    <a class="gmail-m_3568198557353766854moz-txt-link-freetext" href="http://www.ensembl.org/info/docs/api/core/core_tutorial.html" target="_blank">http://www.ensembl.org/info/<wbr>docs/api/core/core_tutorial.<wbr>html</a><br>
    and videos<br>
<a class="gmail-m_3568198557353766854moz-txt-link-freetext" href="http://www.ebi.ac.uk/training/online/course/ensembl-filmed-api-workshop" target="_blank">http://www.ebi.ac.uk/training/<wbr>online/course/ensembl-filmed-<wbr>api-workshop</a><br>
    <br>
    <br>
    Hope that helps,<br>
    Magali<div><div class="gmail-h5"><br></div></div></div></blockquote></div><br></div></div>