This object will efficiently allow one for query subsets of rangeswithin a large collection of sequence features (in fact the objectsjust have to be Bio::RangeI compliant). This is done by the creationof bins which are stored in order in a B-Tree data structure asprovided by the DB_File interface to the Berkeley DB.This is based on work done by Lincoln for storage in a mysql instance- this is intended to be an embedded in-memory implementation foreasily querying for subsets of a large range set.Collections can be made persistent by keeping the indexfile andpassing in the -keep flag like this:

Title : new Usage : my $obj = Bio::SeqFeature::Collection->new(); Function: Builds a new Bio::SeqFeature::Collection object Returns : Bio::SeqFeature::Collection Args :
-minbin minimum value to use for binning
(default is 100,000,000)
-maxbin maximum value to use for binning
(default is 1,000)
-file filename to store/read the
BTREE from rather than an in-memory structure
(default is false and in-memory).
-keep boolean, will not remove index file on
object destruction.
-features Array ref of features to add initially

Title : features_in_range Usage : my @features = $collection->features_in_range($range) Function: Retrieves a list of features which were contained or overlap the the requested range (see Args for way to specify overlap or only those containe)d Returns : List of Bio::SeqFeatureI objects Args : -range => Bio::RangeI object defining range to search, OR -start => start, -end => end, -strand => strand
-contain => boolean - true if feature must be completely
contained with range
OR false if should include features that simply overlap
the range. Default: true.
-strandmatch => 'strong', ranges must have the same strand
'weak', ranges must have the same
strand or no strand
'ignore', ignore strand information
Default. 'ignore'.

Title : remove_features Usage : $collection->remove_features(\@array) Function: Removes the requested sequence features (based on features which have the same location) Returns : Number of features removed Args : Arrayref of Bio::RangeI objects

my$obj = shift;
# we have to remove any cleanup methods here for Storableformy$funcref($obj->_cleanup_methods){$obj->_unregister_for_cleanup($funcref);
}# ... and the same for any contained features; hopefully any implementations# adhere to implementing Bio::SeqFeatureI::sub_SeqFeatureformy$contained($obj->sub_SeqFeature){_remove_cleanup_methods($contained);
}
1;

Please direct usage questions or support issues to the mailing list:bioperl-l@bioperl.orgrather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

Using code and strategy developed by Lincoln Stein (lstein@cshl.org)in Bio::DB::GFF implementation. Credit also to Lincoln for suggestingusing Storable to serialize features rather than my previous implementationwhich kept the features in memory.