[Bioperl-guts-l] bioperl-live/Bio/DB/SeqFeature NormalizedFeature.pm, 1.13, 1.13.4.1 Store.pm, 1.21, 1.21.4.1

Senduran Balasubramaniam sendu at dev.open-bio.org
Sat Sep 2 09:26:04 EDT 2006


Update of /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature
In directory dev.open-bio.org:/tmp/cvs-serv14753/Bio/DB/SeqFeature

Modified Files:
      Tag: branch-1-5-2
	NormalizedFeature.pm Store.pm 
Log Message:
merge from HEAD, server problems should skip and pass in test suite

Index: Store.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store.pm,v
retrieving revision 1.21
retrieving revision 1.21.4.1
diff -C2 -d -r1.21 -r1.21.4.1
*** Store.pm	6 Jul 2006 21:51:52 -0000	1.21
--- Store.pm	2 Sep 2006 13:26:02 -0000	1.21.4.1
***************
*** 90,93 ****
--- 90,101 ----
                                   -end        => 11000);
  
+   # load an entire GFF3 file, using the GFF3 loader...
+   my $loader = Bio::DB::SeqFeature::Store::GFF3Loader->new(-store    => $db,
+ 							   -verbose  => 1,
+ 							   -fast     => 1);
+ 
+   $loader->load('./my_genome.gff3');
+ 
+ 
  
  =head1 DESCRIPTION
***************
*** 183,188 ****
  =head2 Loaders and Normalized Features
  
! The Bio::DB::SeqFeature::GFF3Loader parses a GFF3-format file and
! loads the annotations and sequence data into the database of your
  choice. The script bp_seqfeature_load.pl (found in the
  scripts/Bio-SeqFeature-Store/ subdirectory) is a thin front end to the
--- 191,196 ----
  =head2 Loaders and Normalized Features
  
! The Bio::DB::SeqFeature::Store::GFF3Loader parses a GFF3-format file
! and loads the annotations and sequence data into the database of your
  choice. The script bp_seqfeature_load.pl (found in the
  scripts/Bio-SeqFeature-Store/ subdirectory) is a thin front end to the
***************
*** 292,296 ****
   -dumpdir           The path to a temporary directory that will be
                      used during "fast" loading. See
! 		    L<Bio::DB::SeqFeature::GFF3Loader> for a
  		    description of this. Default is the current
                      directory.
--- 300,304 ----
   -dumpdir           The path to a temporary directory that will be
                      used during "fast" loading. See
! 		    L<Bio::DB::SeqFeature::Store::GFF3Loader> for a
  		    description of this. Default is the current
                      directory.
***************
*** 303,312 ****
  sub new {
    my $self      = shift;
!   my ($adaptor,$serializer,$index_subfeatures,$cache,$compress,$debug,$args);
    if (@_ == 1) {
      $args = {DSN => shift}
    }
    else {
!     ($adaptor,$serializer,$index_subfeatures,$cache,$compress,$debug,$args) =
        rearrange(['ADAPTOR',
  		 'SERIALIZER',
--- 311,320 ----
  sub new {
    my $self      = shift;
!   my ($adaptor,$serializer,$index_subfeatures,$cache,$compress,$debug,$create,$args);
    if (@_ == 1) {
      $args = {DSN => shift}
    }
    else {
!     ($adaptor,$serializer,$index_subfeatures,$cache,$compress,$debug,$create,$args) =
        rearrange(['ADAPTOR',
  		 'SERIALIZER',
***************
*** 315,321 ****
--- 323,332 ----
  		 'COMPRESS',
  		 'DEBUG',
+ 		 'CREATE',
  		], at _);
    }
    $adaptor ||= 'DBI::mysql';
+   $args->{WRITE}++  if $create;
+   $args->{CREATE}++ if $create;
  
    my $class = "Bio::DB::SeqFeature::Store::$adaptor";
***************
*** 1265,1269 ****
  updates are to be performed, and activate certain optimizations. These
  methods are called automatically by the
! Bio::DB::SeqFeature::GFF3Loader module.
  
  Example:
--- 1276,1280 ----
  updates are to be performed, and activate certain optimizations. These
  methods are called automatically by the
! Bio::DB::SeqFeature::Store::GFF3Loader module.
  
  Example:
***************
*** 2310,2315 ****
  
  L<bioperl>,
- L<Bio::DB::SeqFeature::GFF3Loader>,
  L<Bio::DB::SeqFeature>,
  L<Bio::DB::SeqFeature::Segment>,
  L<Bio::DB::SeqFeature::Store::DBI::mysql>,
--- 2321,2326 ----
  
  L<bioperl>,
  L<Bio::DB::SeqFeature>,
+ L<Bio::DB::SeqFeature::Store::GFF3Loader>,
  L<Bio::DB::SeqFeature::Segment>,
  L<Bio::DB::SeqFeature::Store::DBI::mysql>,

Index: NormalizedFeature.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/NormalizedFeature.pm,v
retrieving revision 1.13
retrieving revision 1.13.4.1
diff -C2 -d -r1.13 -r1.13.4.1
*** NormalizedFeature.pm	19 Jun 2006 22:07:02 -0000	1.13
--- NormalizedFeature.pm	2 Sep 2006 13:26:02 -0000	1.13.4.1
***************
*** 60,64 ****
  use base 'Bio::Graphics::FeatureBase';
  use base 'Bio::DB::SeqFeature::NormalizedFeatureI';
! use overload '""' => \&as_string;
  
  use vars '$AUTOLOAD';
--- 60,67 ----
  use base 'Bio::Graphics::FeatureBase';
  use base 'Bio::DB::SeqFeature::NormalizedFeatureI';
! use overload '""' => \&as_string,
!               eq  => \&eq,
!               ne  => \&ne,
!               fallback => 1;
  
  use vars '$AUTOLOAD';
***************
*** 170,174 ****
  
    if (my $store = $self->object_store) {
!     return Bio::PrimarySeq->new(-seq => $store->fetch_sequence($self->seq_id,$start,$end),
  				-id  => $self->display_name);
    } else {
--- 173,177 ----
  
    if (my $store = $self->object_store) {
!     return Bio::PrimarySeq->new(-seq => $store->fetch_sequence($self->seq_id,$start,$end) || '',
  				-id  => $self->display_name);
    } else {
***************
*** 355,358 ****
--- 358,367 ----
   @subfeature s= $feature->get_SeqFeatures('exon')
  
+ If you use an unknown method that begins with Tag_(tagname),
+ Att_(tagname) Is_(tagname), then it will be the same as calling the
+ each_tag_value() method with the tagname. In a list context, these
+ autogenerated procedures return the list of results. In scalar
+ context, they return the first item in the list!!
+ 
  =cut
  
***************
*** 366,371 ****
    return if $func_name eq 'DESTROY';
  
    # fetch subfeatures if func_name has an initial cap
!   return $self->get_SeqFeatures(lc $func_name) if $func_name =~ /^[A-Z]/;
  
    # error message of last resort
--- 375,388 ----
    return if $func_name eq 'DESTROY';
  
+   # call attributes if func_name begins with "Tag_" or "Att_":
+   if ($func_name =~ /^(Tag|Att|Is)_(\w+)/) {
+     my @result = $self->each_tag_value($2);
+     return wantarray ? @result : $result[0];
+   }
+ 
    # fetch subfeatures if func_name has an initial cap
!   if ($func_name =~ /^[A-Z]/) {
!     return $self->get_SeqFeatures(lc $func_name);
!   }
  
    # error message of last resort
***************
*** 621,624 ****
--- 638,654 ----
  }
  
+ sub eq {
+   my $self = shift;
+   my $b    = shift;
+   my $store1 = $self->object_store;
+   my $store2 = eval {$b->object_store} || '';
+   return $store1 eq $store2 && $self->primary_id eq $b->primary_id;
+ }
+ 
+ sub ne {
+   my $self = shift;
+   return !$self->eq(shift);
+ }
+ 
  # completely case insensitive
  sub type_match {



More information about the Bioperl-guts-l mailing list