None available.
sub new
{ my $class = shift;
my ($db,$ids,$type) = @_;
return bless {ids=>$ids,db=>$db,type=>$type},$class; } |
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__ } |
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.
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.