<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Mahmood<br>
<br>
The gene sequence page displays 600 bp upstream and downstream of
the gene. You can get this extra 600 bp by altering your slice
adapter call to:<br>
my $slice = $slice_adaptor->fetch_by_gene_stable_id(
'ENSG00000139618', 600);<br>
<br>
This is described in the docs here:<br>
<a class="moz-txt-link-freetext" href="http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1DBSQL_1_1SliceAdaptor.html#a744a0044ea95082ce090e31007417d60">http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1DBSQL_1_1SliceAdaptor.html#a744a0044ea95082ce090e31007417d60</a><br>
<br>
All the best<br>
<br>
Emily<br>
<br>
<div class="moz-cite-prefix">On 29/06/2017 10:42, Mahmood Naderan
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADa2P2UKNePPWK2sb-dKxJcesPdxCMvN_cF80bFyuO4-8vpJxw@mail.gmail.com">
<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"
moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Dev mailing list <a class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a class="moz-txt-link-freetext" href="http://www.ensembl.info/">http://www.ensembl.info/</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Dr Emily Perry (Pritchard)
Ensembl Outreach Project Leader
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge
CB10 1SD
UK </pre>
</body>
</html>