[Bioperl-l] Compliance of Bio::Seq add_SeqFeature() method
florent.angly at gmail.com
Wed Mar 7 00:00:50 EST 2012
On 05/03/12 12:13, Fields, Christopher J wrote:
> Actually, I misread Florent's original post, I was thinking that FeatureHolderI was the outlier here, but it is Bio::Seq. Yes, I think Bio::Seq is abusing the FeatureHolderI interface, it should just be for a single feature (it can safely ignore the 'EXPAND' option). However, use of 'EXPAND' assumes the FeatureHolderI is also a Bio::RangeI (must have a start and end to expand), something that is not mentioned in the interface as a requirement and is not guaranteed, for instance Bio::Seq is not Bio::RangeI.
Ok, I have:
1/ clarified in Bio::FeatureHolderI that there is no guarantee that
'EXPAND' will be honored
2/ made Bio::Seq comply to Bio::FeatureHolderI by accepting the 'EXPAND'
keyword (but do nothing about it)
3/ deprecated the use of passing multiple features to add_SeqFeature()
4/ updated documentation and code that relied on passing multiple features
That should take care of the issue at hand. See this commit:
Note that there are still some modules (e.g. Bio::DB::SeqFeature::Store,
Bio::DB::SeqFeature, Bio::Search::Tiling::MapTileUtils) that have an
add_SeqFeature() method that accepts an array of features but they are
not Bio::FeatureHolderI, so that's ok. Maybe they should be
Bio::FeatureHolderI but that's another story.
However, I have found that Bio::SimpleAlign is a Bio::FeatureHolderI and
is not compliant. I fixed it here:
More information about the Bioperl-l