<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<div><font class="Apple-style-span" face="Tahoma" size="2">Hello People, </font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">I am trying to retrieve the exon structure for a list of genes that i have stored in a file.</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">So I am now trying to do it for just one gene so, then I can read my gene list element by element and retrieve all the exons for each one.</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">I have the following code. But I am not understanding the use of the slice and adaptors so I cannot adapt the code for my problem.</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Can anybody help me? Below I paste the code that does what i want to do for all the genes in a chromosome.</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><div>#!/usr/bin/perl -w</div><div><br></div><div>use Bio::EnsEMBL::Feature;</div><div>use Bio::EnsEMBL::Registry;</div><div>use Bio::EnsEMBL::DBSQL::GeneAdaptor;</div><div><br></div><div>my $registry = 'Bio::EnsEMBL::Registry';</div><div><br></div><div><br></div><div><br></div><div>sub feature2string</div><div>{</div><div>    my $feature = shift;</div><div><br></div><div>    my $stable_id  = $feature->stable_id();</div><div>    my $seq_region = $feature->slice->seq_region_name();</div><div>    my $start      = $feature->start();</div><div>    my $end        = $feature->end();</div><div>    my $strand     = $feature->strand();</div><div><br></div><div>    return sprintf( "%s: %s:%d-%d (%+d)",</div><div>        $stable_id, $seq_region, $start, $end, $strand );</div><div>}</div><div><br></div><div>$registry->load_registry_from_db(</div><div>    -host => 'ensembldb.ensembl.org',</div><div>    -user => 'anonymous'</div><div>);</div><div><br></div><div><div>my $slice_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Slice' );</div><div>my $slice = $slice_adaptor->fetch_by_region( 'chromosome', 'X', 1e6, 10e6 );</div><div><br></div><div><b>#my $slice = $slice_adaptor->fetch_by_gene_stable_id( 'ENSG00000099889', 5e3 ); // I have read that i can change the last line for this one here.. but i don't know how to do the following step in whis i get the information from the gene..</b></div><div><br></div><div>my $genes = $slice->get_all_Genes();</div><div><br></div><div>my $gene = shift @{$genes};</div><div>    my $gstring = feature2string($gene);</div><div>    print "$gstring\n";</div><div><br></div><div>    my $transcripts = $gene->get_all_Transcripts();</div></div></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div>                                      </body>
</html>