The Bio::DB::SeqFeature object is the default SeqFeature class stored in Bio::DB::SeqFeature databases. It implements both the Bio::DB::SeqFeature::NormalizedFeatureI and Bio::DB::SeqFeature::NormalizedTableFeatureI interfaces, which means that its subfeatures, if any, are stored in the database in a normalized fashion, and that the parent/child hierarchy of features and subfeatures are also stored in the database as set of tuples. This provides efficiencies in both storage and retrieval speed.

Typically you will not create Bio::DB::SeqFeature directly, but will ask the database to do so on your behalf, as described in Bio::DB::SeqFeature::Store.

Title : new
Usage : $feature = Bio::DB::SeqFeature::NormalizedFeature->new(@args)
Function: create a new feature
Returns : the new seqfeature
Args : see below
Status : public

This method creates and, if possible stores into a database, a new Bio::DB::SeqFeature::NormalizedFeature object using the specialized Bio::DB::SeqFeature class.

The arguments are the same to Bio::SeqFeature::Generic->new() and Bio::Graphics::Feature->new(). The most important difference is the -store option, which if present creates the object in a Bio::DB::SeqFeature::Store database, and the -index option, which controls whether the feature will be indexed for retrieval (default is true). Ordinarily, you would only want to turn indexing on when creating top level features, and off only when storing subfeatures. The default is on.

Arguments are as follows:

-seq_id the reference sequence
-start the start position of the feature
-end the stop position of the feature
-display_name the feature name (returned by seqname)
-primary_tag the feature type (returned by primary_tag)
-source the source tag
-score the feature score (for GFF compatibility)
-desc a description of the feature
-segments a list of subfeatures (see Bio::Graphics::Feature)
-subtype the type to use when creating subfeatures
-strand the strand of the feature (one of -1, 0 or +1)
-phase the phase of the feature (0..2)
-url a URL to link to when rendered with Bio::Graphics
-attributes a hashref of tag value attributes, in which the key is the tag
and the value is an array reference of values
-store a previously-opened Bio::DB::SeqFeature::Store object
-index index this feature if true

Aliases:

-id an alias for -display_name
-seqname an alias for -display_name
-display_id an alias for -display_name
-name an alias for -display_name
-stop an alias for end
-type an alias for primary_tag

Add one or more subfeatures to the feature. For best results, subfeatures should be of the same class as the parent feature (i.e. do not try mixing Bio::DB::SeqFeature::NormalizedFeature with other feature types).

This method extends the Bio::SeqFeatureI get_SeqFeatures() slightly by allowing you to pass a list of primary_tags, in which case only subfeatures whose primary_tag is contained on the list will be returned. Without any types passed all subfeatures are returned.

This method will get or set the Bio::DB::SeqFeature::Store object that is associated with the feature. After changing the store, you should probably unset the primary_id() of the feature and call update() to ensure that the object is written into the database as a new feature.

For convenience, when objects of this class are stringified, they are represented in the form "primary_tag(display_name)". To turn this feature off, call overloaded_names() with a false value. You can invoke this on an individual feature object or on the class:

If you use an unknown method that begins with a capital letter, then the feature autogenerates a call to get_SeqFeatures() using the lower-cased method name as the primary_tag. In other words $feature->Exon is equivalent to:

This method gets or sets the primary ID of the feature in the underlying Bio::DB::SeqFeature::Store database. If you change this field and then call update(), it will have the effect of making a copy of the feature in the database under a new ID.