Bio::DB::GFF ID_Iterator
Other packages in the module: Bio::DB::GFF
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
Bio::Root::Root
Inherit
Bio::Root::Root
Synopsis
No synopsis!
Description
No description!
Methods
new
No description
Code
next_seq
No description
Code
Methods description
None available.
Methods code
newdescriptionprevnextTop
sub new {
  my $class            = shift;
  my ($db,$ids,$type)  = @_;
  return bless {ids=>$ids,db=>$db,type=>$type},$class;
}
next_seqdescriptionprevnextTop
sub next_seq {
  my $self = shift;
  my $next = shift @{$self->{ids}};
  return unless $next;
  my $name = ref($next) eq 'ARRAY' ? Bio::DB::GFF::Featname->new(@$next) : $next;
  my $segment = $self->{type} eq 'name'      ? $self->{db}->segment($name)
                : $self->{type} eq 'feature' ? $self->{db}->fetch_feature_by_id($name)
                : $self->{type} eq 'group'   ? $self->{db}->fetch_feature_by_gid($name)
                : $self->throw("Bio::DB::GFF::ID_Iterator called to fetch an unknown type of identifier");
  $self->throw("id does not exist") unless $segment;
  return $segment;
}

1;

__END__
}
General documentation
BUGSTop
Features can only belong to a single group at a time. This must be
addressed soon.
Start coordinate can be greater than stop coordinate for relative
addressing. This breaks strict BioPerl compatibility and must be
fixed.
SEE ALSOTop
bioperl,
Bio::DB::GFF::RelSegment,
Bio::DB::GFF::Aggregator,
Bio::DB::GFF::Feature,
Bio::DB::GFF::Adaptor::dbi::mysqlopt,
Bio::DB::GFF::Adaptor::dbi::oracle,
Bio::DB::GFF::Adaptor::memory
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.