<br><br><div class="gmail_quote">On Mon, Nov 1, 2010 at 1:46 PM, Andrea Edwards <span dir="ltr"><<a href="mailto:edwardsa@cs.man.ac.uk" target="_blank">edwardsa@cs.man.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



  

    
  
  <div bgcolor="#ffffff" text="#000000">
    Hi<br>
    <br>
    I'm a bit confused by the transcript mapper. The docs say about the
    cdna2genomic method<br>
    <br>
    <table width="100%">
      <tbody>
        <tr>
          <td>
            <pre>  Arg [1]    : $start
               The start position in cdna coordinates
  Arg [2]    : $end
               The end position in cdna coordinates
  Example    : @cdna_coords = $transcript_mapper->cdna2genomic($start, $end);
  Description: Converts cdna coordinates to genomic coordinates.  The
               return value is a list of coordinates and gaps.
  Returntype : list of Bio::EnsEMBL::Mapper::Coordinate and
               Bio::EnsEMBL::Mapper::Gap objects
  Exceptions : throws if no start or end
  Caller     : general
  Status     : Stable</pre>
          </td>
        </tr>
      </tbody>
    </table>
    <br>
    <br>
    What would/could the gaps be in a transcript? <br></div></blockquote><div>The gaps here will be either at the start or the end depending on the values of the start and end values past. So if you pass an end value past the end of the cdna then a gap object will be the last element of the array.<br>

<br> <br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#ffffff" text="#000000">
    <br>
    If your transcript did contain gaps would the return value be an
    array which contained both refs to coordinate objects and gap
    objects and you would have to iterate over the array and determine
    the type of the ref at each position?<br></div></blockquote><br>Yes exactly so do something like:-<br>  <br>my @coords=$trmapper->cdna2genomic($pos1,$pos2);<br><br>  foreach my $coord (@coords) {<br>    if ($coord->isa("Bio::EnsEMBL::Mapper::Coordinate")){<br>
      print "genomic start is ".$coord->start." and ends at ".$coord->end."\n";<br>    }<br>    else{<br>      print "GAP from".$coord->start." to ".$coord->end."\n";;<br>
    }<br>  }<br><br>HTH,<br>Ian Longden.<br><br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#ffffff" text="#000000">
    <br>
    thanks<br>
  </div>

<br>_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
<a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
<br></blockquote></div><br>