Bio-DB-Das-Chado
view release on metacpan or search on metacpan
lib/Bio/DB/Das/Chado.pm view on Meta::CPAN
-start =>$start,
-end =>$end,
);
return @features;
}
sub get_seq_stream {
my $self = shift;
#warn "get_seq_stream args:@_";
my ($type,$types,$callback,$attributes,$iterator,$feature_id,$seq_id,$start,$end) =
$self->_rearrange([qw(TYPE TYPES CALLBACK ATTRIBUTES ITERATOR FEATURE_ID SEQ_ID START END)],
@_);
my @features = $self->_segclass->features(-type => $type,
-attributes => $attributes,
-callback => $callback,
-iterator => $iterator,
-factory => $self,
-feature_id=>$feature_id,
-seq_id =>$seq_id,
-start =>$start,
-end =>$end,
);
return Bio::DB::Das::ChadoIterator->new(\@features);
}
=head2 types
Title : types
Usage : $db->types(@args)
Function: return list of feature types in database
Returns : a list of Bio::Das::FeatureTypeI objects
Args : see below
This routine returns a list of feature types known to the database. It
is also possible to find out how many times each feature occurs.
Arguments are -option=E<gt>value pairs as follows:
-enumerate if true, count the features
The returned value will be a list of Bio::Das::FeatureTypeI objects
(see L<Bio::Das::FeatureTypeI>.
If -enumerate is true, then the function returns a hash (not a hash
reference) in which the keys are the stringified versions of
Bio::Das::FeatureTypeI and the values are the number of times each
feature appears in the database.
NOTE: This currently raises a "not-implemented" exception, as the
BioSQL API does not appear to provide this functionality.
=cut
sub types {
my $self = shift;
my ($enumerate) = $self->_rearrange([qw(ENUMERATE)],@_);
$self->throw_not_implemented;
#if lincoln didn't need to implement it, neither do I!
}
=head2 get_feature_by_alias, get_features_by_alias
Title : get_features_by_alias
Usage : $db->get_feature_by_alias(@args)
Function: return list of feature whose name or synonyms match
Returns : a list of Bio::Das::Chado::Segment::Feature objects
Args : See below
This method finds features matching the criteria outlined by the
supplied arguments. Wildcards (*) are allowed. Valid arguments are:
=over
=item -name
=item -class
=item -ref (refrence sequence)
=item -start
=item -end
=back
=cut
sub get_feature_by_alias {
my $self = shift;
my @args = @_;
if ( @args == 1 ) {
@args = (-name => $args[0]);
}
push @args, -operation => 'by_alias';
return $self->_by_alias_by_name(@args);
}
*get_features_by_alias = \&get_feature_by_alias;
=head2 get_feature_by_name, get_features_by_name
Title : get_features_by_name
Usage : $db->get_features_by_name(@args)
Function: return list of feature whose names match
Returns : a list of Bio::Das::Chado::Segment::Feature objects
Args : See below
This method finds features matching the criteria outlined by the
supplied arguments. Wildcards (*) are allowed. Valid arguments are:
=over
=item -name
( run in 2.890 seconds using v1.01-cache-2.11-cpan-0bb4e1dffa6 )