[Bioperl-l] SeqFeatureI.pm: get all starts and ends from 'join'

Marc Logghe Marc.Logghe at devgen.com
Mon Jun 7 08:56:14 EDT 2004


Hi Jan,

> -----Original Message-----
> From: Jan Aerts [mailto:jan.aerts at wur.nl]
> Sent: maandag 7 juni 2004 14:44
> To: bioperl-l at portal.open-bio.org
> Subject: [Bioperl-l] SeqFeatureI.pm: get all starts and ends 
> from 'join'
> 
> 
> Hi all,
> 
> I'm trying to extract all exon boundaries from a genbank file. The
> relevant feature of the file looks like this:
> mRNA   complement(join(1..238,718..763,1552..1677,1925..2004))
> 
> Using $feat->start and $feat->end, I can get the numbers 1 
> and 2004, but
> I can't seem to get hold of the other exon/intron boundaries? 
> Can anyone
> tell me how to get to these numbers?
#You can get to the location object with
my $loc = $feat->location;
#In this specific case it will be a split location object
foreach my $sloc ($loc->sub_Location)
{
  print join( ',', $loc->start, $loc->end), "\n";
}

But it is all better explained in the howto you can find at:
http://bioperl.org/HOWTOs/html/Feature-Annotation.html#location

HTH,
Marc




More information about the Bioperl-l mailing list