Bio-FeatureIO
view release on metacpan or search on metacpan
lib/Bio/FeatureIO.pm view on Meta::CPAN
Returns : a Bio::SeqFeatureI feature object
Args : none
See L<Bio::Root::RootI>, L<Bio::SeqFeatureI>
=cut
sub next_feature {
my ($self, $seq) = @_;
$self->throw_not_implemented;
}
=head2 write_feature
Title : write_feature
Usage : $stream->write_feature($feature)
Function: writes the $feature object into the stream
Returns : 1 for success and 0 for error
Args : Bio::SeqFeature object
=cut
sub write_feature {
my ($self, $seq) = @_;
$self->throw_not_implemented();
}
=head2 _load_format_module
Title : _load_format_module
Usage : *INTERNAL FeatureIO stuff*
Function: Loads up (like use) a module at run time on demand
Example :
Returns :
Args :
lib/Bio/FeatureIO/gff.pm view on Meta::CPAN
=cut
sub next_feature_group {
my $self = shift;
my $feat;
my %seen_ids;
my @all_feats;
my @toplevel_feats;
$self->{group_not_done} = 1;
while ($self->{group_not_done} && ($feat = $self->next_feature()) && defined($feat)) {
# we start by collecting all features in the group and
# memorizing those which have an ID attribute
my $anno_ID = $feat->get_Annotations('ID');
if(ref($anno_ID)) {
my $attr_ID = $anno_ID->value;
$self->throw("Oops! ID $attr_ID exists more than once in your file!")
if (exists($seen_ids{$attr_ID}));
$seen_ids{$attr_ID} = $feat;
}
push(@all_feats, $feat);
lib/Bio/FeatureIO/gff.pm view on Meta::CPAN
}
elsif($directive eq 'FASTA' or $directive =~ /^>/){
#next_seq() will take care of this.
$self->fasta_mode(1);
return;
}
elsif($directive eq '#'){
#all forward references resolved
$self->{group_not_done} = 0;
}
elsif($directive eq 'organism') {
my $organism = $arg[0];
$self->organism($organism);
}
else {
$self->throw("don't know what do do with directive: '##".$directive."'");
}
lib/Bio/FeatureIO/ptt.pm view on Meta::CPAN
Title : write_feature
Usage : $io->write_feature($feature)
Function: write a Bio::SeqFeatureI object in PTT format
Example :
Args : Bio::SeqFeatureI object
Returns :
=cut
sub write_feature {
shift->throw_not_implemented;
}
=head2 description
Title : description
Usage : $obj->description($newval)
Function: set/get the PTT file description for/from line one
Example :
Returns : value of description (a scalar)
Args : on set, new value (a scalar or undef, optional)
lib/Bio/FeatureIO/vecscreen_simple.pm view on Meta::CPAN
Title : write_feature
Usage : $io->write_feature($feature)
Function: write a Bio::SeqFeatureI object in vecscreen -f 3 format
Example :
Args : Bio::SeqFeatureI object
Returns :
=cut
sub write_feature {
shift->throw_not_implemented;
}
###
1;#do not remove
###
lib/Bio/SeqFeature/Annotated.pm view on Meta::CPAN
}
############################################################
=head1 INTERFACE METHODS FOR Bio::AnnotatableI
=cut
=head2 annotation()
Usage : $obj->annotation($annot_obj)
Function: Get/set the annotation collection object for annotating this
feature.
Returns : A Bio::AnnotationCollectionI object
Args : newvalue (optional)
=cut
sub annotation {
my ($obj,$value) = @_;
( run in 0.979 second using v1.01-cache-2.11-cpan-0a987023a57 )