<font size="2">Hello Andrea,<br><br>You should be able to map the individual exons to the clone using the project method. Here is an example script:<br><br><span style="font-family: courier new,monospace;">#!/usr/bin/perl</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">use strict;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">use warnings;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">use Bio::EnsEMBL::Registry;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">my $registry = "Bio::EnsEMBL::Registry";</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$registry->load_registry_from_db( -host => '<a href="http://ensembldb.ensembl.org">ensembldb.ensembl.org</a>',</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">-user => 'anonymous' );</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">my $exon_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Exon' );</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">my $exon = $exon_adaptor->fetch_by_stable_id( 'ENSE00001184784' );</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">my $projection = $exon->project( 'clone' );</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">foreach my $segment ( @{$projection} ) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        my $to_slice = $segment->to_Slice;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        print</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                $exon->stable_id, ":",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">                $segment->from_start, "-",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                $segment->from_end, " projects to ",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">                $to_slice->coord_system_name, " ",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                $to_slice->seq_region_name, ":",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">                $to_slice->start, "-",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                $to_slice->end, "[",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">                $to_slice->strand, "]\n";<br><br>farm2-head3 /~/scripts/ perl <a href="http://test.pl">test.pl</a><br>ENSE00001184784:1-194 projects to clone AL445212.9:83662-83855[1]<br>
</span></font><br>Hope this helps.<br><br>Cheers,<br>Bert<br><br><div class="gmail_quote">On Mon, Nov 8, 2010 at 6:49 PM, Andrea Edwards <span dir="ltr"><<a href="mailto:edwardsa@cs.man.ac.uk">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;">Hi<br>
<br>
I was trying to find the sequence of a gene and its exons in the underlying clone using the ensembl api and not getting very far. I was doing this to get used to the api more than anything else and trying to map between a gene which is on the reverse strand, and a clone containing the forward strand.<br>

<br>
I was able to retrieve the coordinates of the exons in the genomic sequence.<br>
<br>
exon 1<br>
start: 128,684,354<br>
end: 128,684,488<br>
<br>
exon 2<br>
start: 128,664,422<br>
end: 128,664,818<br>
<br>
I have to flip the start and end round in my head<br>
<br>
forward  5' ===========================================3'<br>
reverse  3' ===========================================5'<br>
<br>
                 126,664,422-128,664,818    128,684,354 -128,684,488<br>
<=========E2 <=============E1<br>
<br>
But i then was lost how to map these to a clone. I looked for something equivalent to the TranscriptMapper but couldn't find anything.<br>
<br>
The total length of the sequence (including the intron in the middle is):<br>
128,684,488 - 126,664,422 = 202066 bases<br>
<br>
I then want to find out how these entire region maps to the underlying clone (AC112484.8). I would then like to print out, from the clone, the appropriate subsequence in both the forward and the reverse direction.<br>
<br>
I hope that makes sense. I don't think it should be difficult but I can't find the appropriate methods<br>
<br>
Many thanks<br>
<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br>Bert Overduin, Ph.D.<br>PANDA Coordination & Outreach<br><br>EMBL - European Bioinformatics Institute<br>Wellcome Trust Genome Campus<br>Hinxton, Cambridge CB10 1SD<br>
United Kingdom<br><br><a href="http://www.ebi.ac.uk/%7Ebert" target="_blank">http://www.ebi.ac.uk/~bert</a><br>