[Bioperl-l] return type of $feature->seq() (comments on a commit [bioperl/bioperl-live fcd90e0])

Hilmar Lapp hlapp at gmx.net
Tue May 25 21:10:42 UTC 2010


I'm a little concerned that this discussion is disconnected from the  
list and so misses a lot of possible input. Are we moving our  
development discussion to IRC or github commit comments?

Regarding $feature->seq(), the API documentation expressly states that  
the return type is Bio::PrimarySeqI, as it does for $feature- 
 >entire_seq().

The original rationale for that was to avoid circular references.  
Bio::SeqI objects contain references to attached features, which in  
turn contain a reference to the seq object they are attached to.  A  
Bio::SeqI object holds the basic sequence properties (everything  
except annotation and feature objects) in a Bio::PrimarySeq delegate,  
which is what a feature keeps a reference to, not the containing  
Bio::SeqI object.

It's possible that S::U::weaken() can solve the circular reference  
problem, but this fact should be tested. I.e., attach a feature with a  
SeqI-reference to a SeqI, dispose the SeqI, and then test that the  
feature has lost the reference to the SeqI too.

This still leaves the issue though that then you have a SeqFeatureI  
object with a dangling reference to a sequence object. If you have  
those SeqFeatureI objects stored in a feature store, this may wreak  
havoc. I'd like to see convincing arguments that it doesn't.

Bottom line - just forking on git and committing a change isn't a  
substitute for bringing up an issue and possible solutions on the  
list, and the vetting of pull requests can fall upon only one or two  
core developers. Two eyeballs often spot a lot less than a hundred.

	-hilmar

On May 25, 2010, at 2:02 PM, GitHub wrote:

> Ah, but my link's old, forget it.  This one is better: http://book.git-scm.com/4_undoing_in_git_-_reset,_checkout_and_revert.html
>
> From: cjfields
> View this commit online: http://github.com/bioperl/bioperl-live/commit/fcd90e0f2fa94b61ff8351157129678417c32991

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================








More information about the Bioperl-l mailing list