<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi all,<br>
      <br>
      thanks Bert and Dan for your replies.<br>
      <br>
      I see.. I just think that this is confusing and I don't see the
      benefits of having the strand as a parameter in the
      "$slice_adaptor->fetch_by_region" method if it always returns
      both strands.<br>
      <br>
      It would be more explicit if you would put the actual strand that
      you are looking for and in case you are interested in both strands
      call the method twice, once for the positive and one for the
      negative. in my opinion of course...<br>
      <br>
      thanks for you input<br>
      <br>
      cheers,<br>
      Electra<br>
      <br>
      On 02/05/13 16:15, Daniel Hughes wrote:<br>
    </div>
    <blockquote
cite="mid:CAP8X9uJZGbAMzSdOSLSP8gHMGnw5g3LzetkoyLdRjS3NLtM1jg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>The strand should be refer to the local orientation of your
          slice object relative to the reference genome and not a
          specific strand of the underlying sequence. <br>
          <br>
        </div>
        Dan.<br>
      </div>
      <div class="gmail_extra">
        <br clear="all">
        <div><br clear="all">
          <div>Daniel S. T. Hughes M.Biochem (Hons; Oxford), Ph.D
            (Cambridge)<br>
-------------------------------------------------------------------------------------<br>
            <a moz-do-not-send="true" href="mailto:dsth@cantab.net">dsth@cantab.net</a><br>
            <a moz-do-not-send="true" href="mailto:dsth@cpan.org">dsth@cpan.org</a></div>
        </div>
        <br>
        <br>
        <div class="gmail_quote">2013/5/2 Bert Overduin <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:bert@ebi.ac.uk"
              target="_blank">bert@ebi.ac.uk</a>></span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hello Electra,
              <div><br>
              </div>
              <div>I don't think this is wrong / a bug as, as far as I
                know, a slice always encompasses both strands. So, you
                should do the filtering for features that are located on
                the forward or reverse strand after retrieving them from
                the slice.</div>
              <div><br>
              </div>
              <div>But maybe I'm wrong .... </div>
              <div><br>
              </div>
              <div>Cheers,</div>
              <div>Bert</div>
              <div><br>
              </div>
              <div><br>
              </div>
            </div>
            <div class="gmail_extra">
              <div>
                <div class="h5"><br>
                  <br>
                  <div class="gmail_quote">
                    On Thu, May 2, 2013 at 4:04 PM, Electra Tapanari <span
                      dir="ltr"><<a moz-do-not-send="true"
                        href="mailto:et3@sanger.ac.uk" target="_blank">et3@sanger.ac.uk</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <br>
                      <br>
                      <br>
                      Hi all,<br>
                      <br>
                      I came across a problem when using the ensembl
                      core API.<br>
                      <br>
                      When I am getting a slice where I define
                      chromosome, start, end and<br>
                      strand and then I get objects from the slice ie,<br>
                      genes/transcripts/introns etc it returns me
                      objects from both strands.<br>
                      <br>
                      <br>
                      I used this code to test this:<br>
                      <br>
                        use strict;<br>
                        use Gencode::Default;<br>
                      <br>
                      <br>
                        #connect to database<br>
                        my $db = Gencode::Default->dbconnect("ens-livemirror",
                      3306,<br>
                      "homo_sapiens_core_71_37", "ensro", undef);<br>
                      <br>
                        my $sa = $db->get_SliceAdaptor();<br>
                      <br>
                        my $slice=$sa->fetch_by_region('chromosome',"3",20000,600000,-1)
                      or<br>
                      die "\n 1.Couldn't get slice\n";<br>
                      <br>
                        foreach my $gene (@{$slice->get_all_Genes}){<br>
                      <br>
                            $gene=$gene->transform('chromosome');<br>
                            print $gene->stable_id."\t".$gene->strand."\n";<br>
                      <br>
                         }<br>
                      <br>
                      <br>
                      This is the output:<br>
                      <br>
                      ENSG00000223587    1<br>
                      ENSG00000224918    -1<br>
                      ENSG00000224318    -1<br>
                      ENSG00000134121    1<br>
                      ENSG00000252017    -1<br>
                      ENSG00000231660    -1<br>
                      ENSG00000234661    -1<br>
                      ENSG00000224957    1<br>
                      <br>
                      <br>
                      Isn't this wrong? that it returns me genes from
                      both strands since I am<br>
                      defining that I am interested in the slice of the
                      negative strand only?<br>
                      <br>
                      many thanks in advance,<br>
                      Electra<br>
                      <br>
                      -- <br>
                      Electra Tapanari<br>
                      Bioinformatician-Gencode Data Coordinator<br>
                      Havana Group<br>
                      Morgan Building<br>
                      Wellcome Trust Sanger Institute<br>
                      Wellcome Trust Genome Campus<br>
                      Hinxton<br>
                      Cambridgeshire<br>
                      CB10 1HH<br>
                      <br>
                      E: <a moz-do-not-send="true"
                        href="mailto:electra.tapanari@sanger.ac.uk"
                        target="_blank">electra.tapanari@sanger.ac.uk</a><br>
                      T: <a moz-do-not-send="true"
                        href="tel:%2B44%201223%20496827"
                        value="+441223496827" target="_blank">+44 1223
                        496827</a><br>
                      <br>
                      <br>
                      <br>
                      <br>
                      _______________________________________________<br>
                      Dev mailing list    <a moz-do-not-send="true"
                        href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
                      Posting guidelines and subscribe/unsubscribe info:
                      <a moz-do-not-send="true"
                        href="http://lists.ensembl.org/mailman/listinfo/dev"
                        target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
                      Ensembl Blog: <a moz-do-not-send="true"
                        href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <div><br>
                  </div>
                </div>
              </div>
              -- <br>
              Bert Overduin, Ph.D.<br>
              Vertebrate Genomics Team<br>
              <br>
              EMBL - European Bioinformatics Institute<br>
              Wellcome Trust Genome Campus<br>
              Hinxton, Cambridge CB10 1SD<br>
              United Kingdom<br>
              <br>
              <a moz-do-not-send="true"
                href="http://www.ebi.ac.uk/%7Ebert" target="_blank">http://www.ebi.ac.uk/~bert</a>
              <div>
                <p style="margin-bottom:0in;margin-bottom:.0001pt">
                  <font face="Arial">
                  </font></p>
                <p
style="margin-top:.1pt;margin-right:0in;margin-bottom:0in;margin-left:0in;margin-bottom:.0001pt"><font
                    face="Arial"><span
                      style="font-size:10.0pt;font-family:Arial">Ensembl
                      browser: <a moz-do-not-send="true"
                        href="http://www.ensembl.org/" target="_blank"><span
                          style="color:blue">http://www.ensembl.org</span></a></span><span
                      style="font-size:10.0pt;font-family:Arial"></span></font></p>
                <font face="Arial">
                  <p
style="margin-top:.1pt;margin-right:0in;margin-bottom:0in;margin-left:0in;margin-bottom:.0001pt"><span
                      style="font-size:10.0pt;font-family:Arial">Mailing
                      lists: </span><span
                      style="font-size:10.0pt;font-family:Arial;color:blue"><a
                        moz-do-not-send="true"
                        href="http://www.ensembl.org/info/about/contact/mailing.html"
                        target="_blank"><span style="color:blue">http://www.ensembl.org/info/about/contact/mailing.html</span></a></span><span
                      style="font-size:10.0pt;font-family:Arial"></span></p>
                  <p
style="margin-top:.1pt;margin-right:0in;margin-bottom:0in;margin-left:0in;margin-bottom:.0001pt"><span
                      style="font-size:10.0pt;font-family:Arial">Blog: </span><span
style="font-size:10.0pt;font-family:Arial;color:blue"><a
                        moz-do-not-send="true"
                        href="http://www.ensembl.info/" target="_blank"><span
                          style="color:blue">http://www.ensembl.info</span></a></span><span
                      style="font-size:10.0pt;font-family:Arial"></span></p>
                  <p
style="margin-top:.1pt;margin-right:0in;margin-bottom:0in;margin-left:0in;margin-bottom:.0001pt"><span
                      style="font-size:10.0pt;font-family:Arial">YouTube: </span><span
style="font-size:10.0pt;font-family:Arial;color:#000099"><a
                        moz-do-not-send="true"
                        href="http://www.youtube.com/user/EnsemblHelpdesk"
                        target="_blank"><span style="color:blue">http://www.youtube.com/user/EnsemblHelpdesk</span></a></span><span
                      style="font-size:10.0pt;font-family:Arial"><br>
                      Facebook: </span><span
                      style="font-size:10.0pt;font-family:Arial;color:blue"><a
                        moz-do-not-send="true"
                        href="http://www.facebook.com/Ensembl.org"
                        target="_blank"><span style="color:blue">http://www.facebook.com/Ensembl.org</span></a></span><span
                      style="font-size:10.0pt;font-family:Arial"><br>
                      Twitter: </span><span
                      style="font-size:10.0pt;font-family:Arial;color:blue"><a
                        moz-do-not-send="true"
                        href="http://twitter.com/Ensembl"
                        target="_blank"><span style="color:blue">http://twitter.com/Ensembl</span></a> </span><span
                      style="font-size:10.0pt;font-family:Arial"></span></p>
                </font><font face="Arial">
                </font>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Dev mailing list    <a moz-do-not-send="true"
              href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
            Posting guidelines and subscribe/unsubscribe info: <a
              moz-do-not-send="true"
              href="http://lists.ensembl.org/mailman/listinfo/dev"
              target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
            Ensembl Blog: <a moz-do-not-send="true"
              href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </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>
    <br>
    <pre class="moz-signature" cols="72">-- 
Electra Tapanari
Bioinformatician-Gencode Data Coordinator
Havana Group
Morgan Building
Wellcome Trust Sanger Institute
Wellcome Trust Genome Campus
Hinxton
Cambridgeshire
CB10 1HH

E: <a class="moz-txt-link-abbreviated" href="mailto:electra.tapanari@sanger.ac.uk">electra.tapanari@sanger.ac.uk</a>
T: +44 1223 496827

</pre>
  </body>
</html>