[Bioperl-l] SeqFeature: Documentation gap?

Hilmar Lapp hlapp@gnf.org
Tue, 5 Nov 2002 17:10:24 -0800


Our convention is that interfaces by default don't require an implementation to allow modification of the value of a property. We've been sloppy at stating the recommended way to implement changing a value.

As a general rule, unless stated otherwise, an implementation that allows modification will take as argument the same type that it returns. For array properties with names like (each|get)_<Objects> implementations that let you change that array will have methods add_<Object> and remove_<Objects> (note singular and plural). The caveat is that this is bioperl with in some areas the naming as diverse as the contributors. E.g., you may find flush_<Objects> instead of remove. We're in the process of weeding out these inconsistencies.

	-hilmar

> -----Original Message-----
> From: Stefan Kirov [mailto:skirov@utk.edu]
> Sent: Tuesday, November 05, 2002 1:31 PM
> To: bioperl-l@bioperl.org
> Subject: [Bioperl-l] SeqFeature: Documentation gap?
> 
> 
> I have a question regarding the way the Location is set in a 
> SeqFeature
> object. Obviously one way to do it is through new(). But I 
> needed to use
> a Location object, so I just passed it as in
> $seq->location($locationobj). It worked at this case.
> Is this the right way to do it? Also the documentation states that
> $seq->location returns a location object, but gets no arguments. Is it
> just a gap, or this is not recommended for some reason?
> Thanks!
> Stefan
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>