[Bioperl-l] Sub Seq Feature help

Marc Logghe Marc.Logghe at devgen.com
Fri Feb 6 05:50:33 EST 2004



> -----Original Message-----
> From: michael watson (IAH-C) [mailto:michael.watson at bbsrc.ac.uk]
> Sent: Friday, February 06, 2004 11:32 AM
> To: bioperl-l at bioperl.org
> Subject: [Bioperl-l] Sub Seq Feature help
> 
> 
> Hello
> 
> I want to manipulate the start and end position of a CDS 
> feature that looks like this:
> 
> FT	CDS	join(2307..3221,1..1623)
> 
> I have tried:
> 
> my @features = $seq->get_all_SeqFeatures;
> foreach $f (@features) {
> 	my @subs = $f->sub_SeqFeature;
> 	foreach $s (@subs) {
> 		print $s->start, "-", $s->end, "\n";
> 	}
> }
> 
Actually you are not dealing with sub_features here. Just a plain feature. What you really are looking for is sub_locations.
When you envoke the method 
my $location = $f->location;
you will get a Location object. In the specific case you showed, you will get a  Bio::Location::Split object.
There you will find the appropiate methods to achieve what you want (e.g. each_Location(), sub_Location)

HTH,
Marc



More information about the Bioperl-l mailing list