Bio::DB::GFF Feature
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Summary
Bio::DB::GFF::Feature -- A relative segment identified by a feature type
Package variables
Privates (from "my" definitions)
%CONSTANT_TAGS = (method=>1, source=>1, score=>1, phase=>1, notes=>1, id=>1, group=>1)
Included modules
Bio::DB::GFF::Featname
Bio::DB::GFF::Homol
Bio::DB::GFF::RelSegment
Bio::DB::GFF::Typename
Bio::DB::GFF::Util::Rearrange
Bio::Root::Root
Bio::SeqFeatureI
Inherit
Bio::DB::GFF::RelSegment Bio::Root::Root Bio::SeqFeatureI
Synopsis
See Bio::DB::GFF.
Description
Bio::DB::GFF::Feature is a stretch of sequence that corresponding to a
single annotation in a GFF database. It inherits from
Bio::DB::GFF::RelSegment, and so has all the support for relative
addressing of this class and its ancestors. It also inherits from
Bio::SeqFeatureI, and so has the familiar start(), stop(),
and primary_tag() methods.
Bio::DB::GFF::Feature adds new methods to retrieve the annotation's
type, group, and other GFF attributes. Annotation types are
represented by Bio::DB::GFF::Typename objects, a simple class that has
two methods called method() and source(). These correspond to the
method and source fields of a GFF file.
Annotation groups serve the dual purpose of giving the annotation a
human-readable name, and providing higher-order groupings of
subfeatures into features. The groups returned by this module are
objects of the Bio::DB::GFF::Featname class.
Bio::DB::GFF::Feature inherits from and implements the abstract
methods of Bio::SeqFeatureI, allowing it to interoperate with other
Bioperl modules.
Generally, you will not create or manipulate Bio::DB::GFF::Feature
objects directly, but use those that are returned by the
Bio::DB::GFF::RelSegment->features() method. If features are derived from segments that use relative addressing
(which is the default), then start() will be less than end() if the
feature is on the opposite strand from the reference sequence. This
breaks Bio::SeqI compliance, but is necessary to avoid having the real
genomic locations designated by start() and end() swap places when
changing reference points.
To avoid this behavior, call $segment->absolute(1) before fetching
features from it. This will force everything into absolute
coordinates.
For example:
 my $segment = $db->segment('CHROMOSOME_I');
 $segment->absolute(1);
 my @features = $segment->features('transcript');
Methods
new_from_parentDescriptionCode
newDescriptionCode
typeDescriptionCode
methodDescriptionCode
sourceDescriptionCode
scoreDescriptionCode
phaseDescriptionCode
strandDescriptionCode
groupDescriptionCode
targetDescriptionCode
idDescriptionCode
group_idDescriptionCode
cloneDescriptionCode
sub_SeqFeatureDescriptionCode
add_subfeatureDescriptionCode
merged_segmentsDescriptionCode
sub_typesDescriptionCode
attributesDescriptionCode
notesDescriptionCode
aliasesDescriptionCode
all_tags
No description
Code
has_tag
No description
Code
each_tag_value
No description
Code
AUTOLOAD
No description
Code
adjust_boundsDescriptionCode
aggregated
No description
Code
sort_featuresDescriptionCode
asStringDescriptionCode
name
No description
Code
gff_string
No description
Code
Methods description
new_from_parentcode    nextTop
 Title   : new_from_parent
 Usage   : $f = Bio::DB::GFF::Feature->new_from_parent(@args);
 Function: create a new feature object
 Returns : new Bio::DB::GFF::Feature object
 Args    : see below
 Status  : Internal
This method is called by Bio::DB::GFF to create a new feature using
information obtained from the GFF database. It is one of two similar
constructors. This one is called when the feature is generated from a
RelSegment object, and should inherit that object's coordinate system.
The 13 arguments are positional (sorry):
  $parent       a Bio::DB::GFF::RelSegment object (or descendent)
  $start        start of this feature
  $stop         stop of this feature
  $method       this feature's GFF method
  $source       this feature's GFF source
  $score	this feature's score
  $fstrand      this feature's strand (relative to the source
                      sequence, which has its own strandedness!)
  $phase        this feature's phase
  $group        this feature's group (a Bio::DB::GFF::Featname object)
  $db_id        this feature's internal database ID
  $group_id     this feature's internal group database ID
  $tstart       this feature's target start
  $tstop        this feature's target stop
tstart and tstop aren't used for anything at the moment, since the
information is embedded in the group object.
newcodeprevnextTop
 Title   : new
 Usage   : $f = Bio::DB::GFF::Feature->new(@args);
 Function: create a new feature object
 Returns : new Bio::DB::GFF::Feature object
 Args    : see below
 Status  : Internal
This method is called by Bio::DB::GFF to create a new feature using
information obtained from the GFF database. It is one of two similar
constructors. This one is called when the feature is generated
without reference to a RelSegment object, and should therefore use its
default coordinate system (relative to itself).
The 11 arguments are positional:
  $factory      a Bio::DB::GFF adaptor object (or descendent)
  $srcseq       the source sequence
  $start        start of this feature
  $stop         stop of this feature
  $method       this feature's GFF method
  $source       this feature's GFF source
  $score	this feature's score
  $fstrand      this feature's strand (relative to the source
                      sequence, which has its own strandedness!)
  $phase        this feature's phase
  $group        this feature's group
  $db_id        this feature's internal database ID
typecodeprevnextTop
 Title   : type
 Usage   : $type = $f->type([$newtype])
 Function: get or set the feature type
 Returns : a Bio::DB::GFF::Typename object
 Args    : a new Typename object (optional)
 Status  : Public
This method gets or sets the type of the feature. The type is a
Bio::DB::GFF::Typename object, which encapsulates the feature method
and source.
The method() and source() methods described next provide shortcuts to
the individual fields of the type.
methodcodeprevnextTop
 Title   : method
 Usage   : $method = $f->method([$newmethod])
 Function: get or set the feature method
 Returns : a string
 Args    : a new method (optional)
 Status  : Public
This method gets or sets the feature method. It is a convenience
feature that delegates the task to the feature's type object.
sourcecodeprevnextTop
 Title   : source
 Usage   : $source = $f->source([$newsource])
 Function: get or set the feature source
 Returns : a string
 Args    : a new source (optional)
 Status  : Public
This method gets or sets the feature source. It is a convenience
feature that delegates the task to the feature's type object.
scorecodeprevnextTop
 Title   : score
 Usage   : $score = $f->score([$newscore])
 Function: get or set the feature score
 Returns : a string
 Args    : a new score (optional)
 Status  : Public
This method gets or sets the feature score.
phasecodeprevnextTop
 Title   : phase
 Usage   : $phase = $f->phase([$phase])
 Function: get or set the feature phase
 Returns : a string
 Args    : a new phase (optional)
 Status  : Public
This method gets or sets the feature phase.
strandcodeprevnextTop
 Title   : strand
 Usage   : $strand = $f->strand
 Function: get the feature strand
 Returns : +1, 0 -1
 Args    : none
 Status  : Public
Returns the strand of the feature. Unlike the other methods, the
strand cannot be changed once the object is created (due to coordinate
considerations).
groupcodeprevnextTop
 Title   : group
 Usage   : $group = $f->group([$new_group])
 Function: get or set the feature group
 Returns : a Bio::DB::GFF::Featname object
 Args    : a new group (optional)
 Status  : Public
This method gets or sets the feature group. The group is a
Bio::DB::GFF::Featname object, which has an ID and a class.
targetcodeprevnextTop
 Title   : target
 Usage   : $target = $f->target([$new_target])
 Function: get or set the feature target
 Returns : a Bio::DB::GFF::Featname object
 Args    : a new group (optional)
 Status  : Public
This method works like group(), but only returns the group if it
implements the start() method. This is typical for
similarity/assembly features, where the target encodes the start and stop
location of the alignment.
idcodeprevnextTop
 Title   : id
 Usage   : $id = $f->id
 Function: get the feature ID
 Returns : a database identifier
 Args    : none
 Status  : Public
This method retrieves the database identifier for the feature. It
cannot be changed.
group_idcodeprevnextTop
 Title   : group_id
 Usage   : $id = $f->group_id
 Function: get the feature ID
 Returns : a database identifier
 Args    : none
 Status  : Public
This method retrieves the database group identifier for the feature.
It cannot be changed. Often the group identifier is more useful than
the feature identifier, since it is used to refer to a complex object
containing subparts.
clonecodeprevnextTop
 Title   : clone
 Usage   : $feature = $f->clone
 Function: make a copy of the feature
 Returns : a new Bio::DB::GFF::Feature object
 Args    : none
 Status  : Public
This method returns a copy of the feature.
sub_SeqFeaturecodeprevnextTop
 Title   : sub_SeqFeature
 Usage   : @feat = $feature->sub_SeqFeature([$method])
 Function: get subfeatures
 Returns : a list of Bio::DB::GFF::Feature objects
 Args    : a feature method (optional)
 Status  : Public
This method returns a list of any subfeatures that belong to the main
feature. For those features that contain heterogeneous subfeatures,
you can retrieve a subset of the subfeatures by providing a method
name to filter on.
For AcePerl compatibility, this method may also be called as
segments().
add_subfeaturecodeprevnextTop
 Title   : add_subfeature
 Usage   : $feature->add_subfeature($feature)
 Function: add a subfeature to the feature
 Returns : nothing
 Args    : a Bio::DB::GFF::Feature object
 Status  : Public
This method adds a new subfeature to the object. It is used
internally by aggregators, but is available for public use as well.
merged_segmentscodeprevnextTop
 Title   : merged_segments
 Usage   : @segs = $feature->merged_segments([$method])
 Function: get merged subfeatures
 Returns : a list of Bio::DB::GFF::Feature objects
 Args    : a feature method (optional)
 Status  : Public
This method acts like sub_SeqFeature, except that it merges
overlapping segments of the same time into contiguous features. For
those features that contain heterogeneous subfeatures, you can
retrieve a subset of the subfeatures by providing a method name to
filter on.
A side-effect of this method is that the features are returned in
sorted order by their start tposition.
sub_typescodeprevnextTop
 Title   : sub_types
 Usage   : @methods = $feature->sub_types
 Function: get methods of all sub-seqfeatures
 Returns : a list of method names
 Args    : none
 Status  : Public
For those features that contain subfeatures, this method will return a
unique list of method names of those subfeatures, suitable for use
with sub_SeqFeature().
attributescodeprevnextTop
 Title   : attributes
 Usage   : @attributes = $feature->attributes($name)
 Function: get the "attributes" on a particular feature
 Returns : an array of string
 Args    : feature ID
 Status  : public
Some GFF version 2 files use the groups column to store a series of
attribute/value pairs. In this interpretation of GFF, the first such
pair is treated as the primary group for the feature; subsequent pairs
are treated as attributes. Two attributes have special meaning:
"Note" is for backward compatibility and is used for unstructured text
remarks. "Alias" is considered as a synonym for the feature name.
 @gene_names = $feature->attributes('Gene');
 @aliases    = $feature->attributes('Alias');
If no name is provided, then attributes() returns a flattened hash, of
attribute=>value pairs. This lets you do:
  %attributes = $db->attributes;
notescodeprevnextTop
 Title   : notes
 Usage   : @notes = $feature->notes
 Function: get the "notes" on a particular feature
 Returns : an array of string
 Args    : feature ID
 Status  : public
Some GFF version 2 files use the groups column to store various notes
and remarks. Adaptors can elect to store the notes in the database,
or just ignore them. For those adaptors that store the notes, the
notes() method will return them as a list.
aliasescodeprevnextTop
 Title   : aliases
 Usage   : @aliases = $feature->aliases
 Function: get the "aliases" on a particular feature
 Returns : an array of string
 Args    : feature ID
 Status  : public
This method will return a list of attributes of type 'Alias'.
adjust_boundscodeprevnextTop
 Title   : adjust_bounds
 Usage   : $feature->adjust_bounds
 Function: adjust the bounds of a feature
 Returns : ($start,$stop,$strand)
 Args    : none
 Status  : Public
This method adjusts the boundaries of the feature to enclose all its
subfeatures. It returns the new start, stop and strand of the
enclosing feature.
sort_featurescodeprevnextTop
 Title   : sort_features
 Usage   : $feature->sort_features
 Function: sort features
 Returns : nothing
 Args    : none
 Status  : Public
This method sorts subfeatures in ascending order by their start
position. For reverse strand features, it sorts subfeatures in
descending order. After this is called sub_SeqFeature will return the
features in order.
This method is called internally by merged_segments().
asStringcodeprevnextTop
 Title   : asString
 Usage   : $string = $feature->asString
 Function: return human-readabled representation of feature
 Returns : a string
 Args    : none
 Status  : Public
This method returns a human-readable representation of the feature and
is called by the overloaded "" operator.
Methods code
new_from_parentdescriptionprevnextTop
sub new_from_parent {
  my $package   = shift;
  my ($parent,
      $start,$stop,
      $method,$source,$score,
      $fstrand,$phase,
      $group,$db_id,$group_id,
      $tstart,$tstop) = @_;

  ($start,$stop) = ($stop,$start) if defined($fstrand) and $fstrand eq '-';
  my $class = $group ? $group->class : $parent->class;

  my $self =  bless {
		     factory   => $parent->{factory},
		     sourceseq => $parent->{sourceseq},
		     strand    => $parent->{strand},
		     ref       => $parent->{ref},
		     refstart  => $parent->{refstart},
		     refstrand => $parent->{refstrand},
		     absolute  => $parent->{absolute},
		     start     => $start,
		     stop      => $stop,
		     type      => Bio::DB::GFF::Typename->new($method,$source),
		     fstrand   => $fstrand,
		     score     => $score,
		     phase     => $phase,
		     group     => $group,
		     db_id     => $db_id,
		     group_id  => $group_id,
		     class     => $class,
		    },$package;
  $self;
}
newdescriptionprevnextTop
sub new {
  my $package = shift;
  my ($factory,
      $srcseq,
      $start,$stop,
      $method,$source,
      $score,$fstrand,$phase,
      $group,$db_id,$group_id,
      $tstart,$tstop) = @_;

  my $self = bless { },$package;
  ($start,$stop) = ($stop,$start) if defined($fstrand) and $fstrand eq '-';

  my $class =  $group ? $group->class : 'Sequence';

  @{$self}{qw(factory sourceseq start stop strand class)} =
    ($factory,$srcseq,$start,$stop,$fstrand,$class);

  # if the target start and stop are defined, then we use this information to create 
# the reference sequence
# THIS SHOULD BE BUILT INTO RELSEGMENT
if (0 && $tstart ne '' && $tstop ne '') { if ($tstart < $tstop) { @{$self}{qw(ref refstart refstrand)} = ($group,$start - $tstart + 1,'+'); } else { @{$self}{'start','stop'} = @{$self}{'stop','start'}; @{$self}{qw(ref refstart refstrand)} = ($group,$tstop + $stop - 1,'-'); } } else { @{$self}{qw(ref refstart refstrand)} = ($srcseq,1,'+'); } @{$self}{qw(type fstrand score phase group db_id group_id)} = (Bio::DB::GFF::Typename->new($method,$source),$fstrand,$score,$phase,$group,$db_id,$group_id); $self;
}
typedescriptionprevnextTop
sub type {
  my $self = shift;
  my $d = $self->{type};
  $self->{type} = shift if @_;
  $d;
}
methoddescriptionprevnextTop
sub method {
  my $self = shift;
  my $d = $self->{type}->method;
  $self->{type}->method(shift) if @_;
  $d;
}
sourcedescriptionprevnextTop
sub source {
  my $self = shift;
  my $d = $self->{type}->source;
  $self->{type}->source(shift) if @_;
  $d;
}
scoredescriptionprevnextTop
sub score {
  my $self = shift;
  my $d    = $self->{score};
  $self->{score} = shift if @_;
  $d;
}
phasedescriptionprevnextTop
sub phase {
  my $self = shift;
  my $d    = $self->{phase};
  $self->{phase} = shift if @_;
  $d;
}
stranddescriptionprevnextTop
sub strand {
  my $self = shift;
  return 0 unless $self->{fstrand};
  if ($self->absolute) {
    return Bio::DB::GFF::RelSegment::_to_strand($self->{fstrand});
  }
  return $self->SUPER::strand;
#  return 0 unless defined $self->{start};
# return $self->{start} < $self->{stop} ? '+1' : '-1';
}
groupdescriptionprevnextTop
sub group {
  my $self = shift;
  my $d    = $self->{group};
  $self->{group} = shift if @_;
  $d;
}
targetdescriptionprevnextTop
sub target {
  my $self = shift;
  my $group = $self->group or return;
  return unless $group->can('start');
  $group;
}
iddescriptionprevnextTop
sub id {
 shift->{db_id}
}
group_iddescriptionprevnextTop
sub group_id {
 shift->{group_id}
}
clonedescriptionprevnextTop
sub clone {
  my $self = shift;
  my $clone = $self->SUPER::clone;

  if (ref(my $t = $clone->type)) {
    my $type = $t->can('clone') ? $t->clone : bless {%$t},ref $t;
    $clone->type($type);
  }

  if (ref(my $g = $clone->group)) {
    my $group = $g->can('clone') ? $g->clone : bless {%$g},ref $g;
    $clone->group($group);
  }

  if (my $merged = $self->{merged_segs}) {
    $clone->{merged_segs} = { %$merged };
  }

  $clone;
}
sub_SeqFeaturedescriptionprevnextTop
sub sub_SeqFeature {
  my $self = shift;
  my $type = shift;
  my $subfeat = $self->{subfeatures} or return;
  $self->sort_features;
  if ($type) {
    my $features = $subfeat->{lc $type} or return;
    return @{$features};
  } else {
    return map {@{$_}} values %{$subfeat};
  }
}
add_subfeaturedescriptionprevnextTop
sub add_subfeature {
  my $self    = shift;
  my $feature = shift;
  my $type = $feature->method;
  my $subfeat = $self->{subfeatures}{lc $type} ||= [];
  push @{$subfeat},$feature;
}
merged_segmentsdescriptionprevnextTop
sub merged_segments {
  my $self = shift;
  my $type = shift;
  $type ||= '';    # prevent uninitialized variable warnings
my $truename = overload::StrVal($self); return @{$self->{merged_segs}{$type}} if exists $self->{merged_segs}{$type}; my @segs = sort { $a->start <=> $b->start || $a->type cmp $b->type } $self->sub_SeqFeature($type); # attempt to merge overlapping segments
my @merged = (); for my $s (@segs) { my $previous = $merged[-1] if @merged; if (defined($previous) && $previous->stop+1 >= $s->start){ $previous->{stop} = $s->{stop}; # fix up the target too
my $g = $previous->{group}; if ( ref($g) && $g->isa('Bio::DB::GFF::Homol')) { my $cg = $s->{group}; $g->{stop} = $cg->{stop}; } } elsif (defined($previous) && $previous->start == $s->start && $previous->stop == $s->stop) { next; } else { my $copy = $s->clone; push @merged,$copy; } } $self->{merged_segs}{$type} =\@ merged; @merged;
}
sub_typesdescriptionprevnextTop
sub sub_types {
  my $self = shift;
  my $subfeat = $self->{subfeatures} or return;
  return keys %$subfeat;
}
attributesdescriptionprevnextTop
sub attributes {
  my $self = shift;
  my $factory = $self->factory;
  defined(my $id = $self->id) or return;
  $factory->attributes($id,@_)
}
notesdescriptionprevnextTop
sub notes {
  my $self = shift;
  $self->attributes('Note');
}
aliasesdescriptionprevnextTop
sub aliases {
  my $self = shift;
  $self->attributes('Alias');
}
all_tagsdescriptionprevnextTop
sub all_tags {
  my $self = shift;
  my @tags = keys %CONSTANT_TAGS;
  # autogenerated methods
if (my $subfeat = $self->{subfeatures}) { push @tags,keys %$subfeat; } @tags;
}
has_tagdescriptionprevnextTop
sub has_tag {
  my $self = shift;
  my $tag  = shift;
  my %tags = map {$_=>1} $self->all_tags;
  return $tags{$tag};
}
each_tag_valuedescriptionprevnextTop
sub each_tag_value {
  my $self = shift;
  my $tag  = shift;
  return $self->$tag() if $CONSTANT_TAGS{$tag};
  $tag = ucfirst $tag;
  return $self->$tag();  # try autogenerated tag
}
AUTOLOADdescriptionprevnextTop
sub AUTOLOAD {
  my($pack,$func_name) = $AUTOLOAD=~/(.+)::([^:]+)$/;
  my $sub = $AUTOLOAD;
  my $self = $_[0];

  # ignore DESTROY calls
return if $func_name eq 'DESTROY'; # fetch subfeatures if func_name has an initial cap
# return sort {$a->start <=> $b->start} $self->sub_SeqFeature($func_name) if $func_name =~ /^[A-Z]/;
return $self->sub_SeqFeature($func_name) if $func_name =~ /^[A-Z]/; # error message of last resort
$self->throw(qq(Can't locate object method "$func_name" via package "$pack")); }#'
}
adjust_boundsdescriptionprevnextTop
sub adjust_bounds {
  my $self = shift;
  my $g = $self->{group};

  if (my $subfeat = $self->{subfeatures}) {
    for my $list (values %$subfeat) {
      for my $feat (@$list) {

	# fix up our bounds to hold largest subfeature
my($start,$stop,$strand) = $feat->adjust_bounds; $self->{fstrand} = $strand unless defined $self->{fstrand}; if ($start <= $stop) { $self->{start} = $start if !defined($self->{start}) || $start < $self->{start}; $self->{stop} = $stop if !defined($self->{stop}) || $stop > $self->{stop}; } else { $self->{start} = $start if !defined($self->{start}) || $start > $self->{start}; $self->{stop} = $stop if !defined($self->{stop}) || $stop < $self->{stop}; } # fix up endpoints of targets too (for homologies only)
my $h = $feat->group; next unless $h && $h->isa('Bio::DB::GFF::Homol'); next unless $g && $g->isa('Bio::DB::GFF::Homol'); ($start,$stop) = ($h->{start},$h->{stop}); if ($h->strand >= 0) { $g->{start} = $start if !defined($g->{start}) || $start < $g->{start}; $g->{stop} = $stop if !defined($g->{stop}) || $stop > $g->{stop}; } else { $g->{start} = $start if !defined($g->{start}) || $start > $g->{start}; $g->{stop} = $stop if !defined($g->{stop}) || $stop < $g->{stop}; } } } } ($self->{start},$self->{stop},$self->strand);
}
aggregateddescriptionprevnextTop
sub aggregated {
  my $self = shift;
  my $d = $self->{aggregated};
  $self->{aggregated} = shift if @_;
  $d;
}
sort_featuresdescriptionprevnextTop
sub sort_features {
  my $self = shift;
  return if $self->{sorted}++;
  my $strand = $self->strand or return;
  my $subfeat = $self->{subfeatures} or return;
  for my $type (keys %$subfeat) {
    $subfeat->{$type} = [sort {$a->start<=>$b->start} @{$subfeat->{$type}}] if $strand > 0;
    $subfeat->{$type} = [sort {$b->start<=>$a->start} @{$subfeat->{$type}}] if $strand < 0;
  }
}
asStringdescriptionprevnextTop
sub asString {
  my $self = shift;
  my $type = $self->type;
  my $name = $self->group;
  return "$type($name)" if $name;
  return $type;
#  my $type = $self->method;
# my $id = $self->group || 'unidentified';
# return join '/',$id,$type,$self->SUPER::asString;
}
namedescriptionprevnextTop
sub name {
  my $self =shift;
  return $self->group || $self->SUPER::name;
}
gff_stringdescriptionprevnextTop
sub gff_string {
  my $self = shift;
  my ($start,$stop) = ($self->start,$self->stop);

  # the defined() tests prevent uninitialized variable warnings, when dealing with clone objects
# whose endpoints may be undefined
($start,$stop) = ($stop,$start) if defined($start) && defined($stop) && $start > $stop; my ($class,$name) = ('',''); my @group; if (my $t = $self->target) { my $class = $t->class; my $name = $t->name; my $start = $t->start; my $stop = $t->stop; push @group,qq(Target "$class:$name" $start $stop); } elsif (my $g = $self->group) { $class = $g->class || ''; $name = $g->name || ''; push @group,"$class $name"; } push @group,map {qq(Note "$_")} $self->notes; my $group_field = join ' ; ',@group; my $strand = ('-','.','+')[$self->strand+1]; my $ref = $self->ref; my $n = ref($ref) ? $ref->name : $ref; my $phase = $self->phase; $phase = '.' unless defined $phase; return join("\t",$n,$self->source,$self->method,$start||'.',$stop||'.',$self->score||'.',$strand||'.',$phase,$group_field);
}
General documentation
APITop
The remainder of this document describes the public and private
methods implemented by this module.
infoTop
 Title   : info
 Usage   : $info = $f->info([$new_info])
 Function: get or set the feature group
 Returns : a Bio::DB::GFF::Featname object
 Args    : a new group (optional)
 Status  : Public
This method is an alias for group(). It is provided for AcePerl
compatibility.
Autogenerated MethodsTop
 Title   : AUTOLOAD
 Usage   : @subfeat = $feature->Method
 Function: Return subfeatures using autogenerated methods
 Returns : a list of Bio::DB::GFF::Feature objects
 Args    : none
 Status  : Public
Any method that begins with an initial capital letter will be passed
to AUTOLOAD and treated as a call to sub_SeqFeature with the method
name used as the method argument. For instance, this call:
  @exons = $feature->Exon;
is equivalent to this call:
  @exons = $feature->sub_SeqFeature('exon');
SeqFeatureI methodsTop
The following Bio::SeqFeatureI methods are implemented:
primary_tag(), source_tag(), all_tags(), has_tag(), each_tag_value().
A Note About SimilaritiesTop
The current default aggregator for GFF "similarity" features creates a
composite Bio::DB::GFF::Feature object of type "gapped_alignment".
The target() method for the feature as a whole will return a
RelSegment object that is as long as the extremes of the similarity
hit target, but will not necessarily be the same length as the query
sequence. The length of each "similarity" subfeature will be exactly
the same length as its target(). These subfeatures are essentially
the HSPs of the match.
The following illustrates this:
  @similarities = $segment->feature('similarity:BLASTN');
  $sim          = $similarities[0];

  print $sim->type;        # yields "gapped_similarity:BLASTN"

  $query_length  = $sim->length;
  $target_length = $sim->target->length;  # $query_length != $target_length

  @matches = $sim->Similarity;   # use autogenerated method
  $query1_length  = $matches[0]->length;
  $target1_length = $matches[0]->target->length; # $query1_length == $target1_length
If you merge segments by calling merged_segments(), then the length of
the query sequence segments will no longer necessarily equal the
length of the targets, because the alignment information will have
been lost. Nevertheless, the targets are adjusted so that the first
and last base pairs of the query match the first and last base pairs
of the target.
BUGSTop
This module is still under development.
SEE ALSOTop
bioperl, Bio::DB::GFF, Bio::DB::RelSegment
AUTHORTop
Lincoln Stein <lstein@cshl.org>.
Copyright (c) 2001 Cold Spring Harbor Laboratory.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.