[Bioperl-l] change the location coordinates of a Bio::SeqFeat ureI object

Hilmar Lapp hlapp at gmx.net
Wed Jul 2 06:43:30 EDT 2003


Ignore if this has already been answered.

On Thursday, June 26, 2003, at 10:46  PM, Peili Zhang wrote:

>
>> We separated Locations from SeqFeature a while a go so you can whole
>> replace the location object for a feature
>> $sf->location( $newlocation )
>> or manipulate the fields directly, etc...
>> $sf->location->start($newstart);
>
> I understand this will work just fine for features with simple 
> locations.
>

It will also work for fuzzy locations, but for split locations you're 
going to get an exception if you try to set start/end on the container 
location.

>
> this changes the $sl object. does it change $loc, $sf->location, and 
> the
> Bio::Seq object ($seq) hosting $sf? seems to me $sf is a separate 
> object from
> $seq. so is $loc from $sf, and $sl from $loc. it seems to me that even 
> if I can
> change the derived objects any way I want, the objects I'm deriving 
> from just
> stay intact. this is why I asked my question at the first place. do I 
> get it
> wrong completely?
>

SeqFeature::Generic delegates location calls to the location object, so 
if you change the latter you will also change start/end of the feature. 
Seq objects don't have a location. If you change the sub-locations of a 
split location, you will also change the range covered by all 
sub-locations and hence the overall start/end (which is what the 
container location object will return).

	-hilmar
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------



More information about the Bioperl-l mailing list