[BioRuby-cvs] bioruby/lib/bio/db/genbank common.rb, 1.11.2.1, 1.11.2.2 genbank.rb, 0.40.2.1, 0.40.2.2

Naohisa Goto ngoto at dev.open-bio.org
Mon Mar 3 18:30:53 UTC 2008


Update of /home/repository/bioruby/bioruby/lib/bio/db/genbank
In directory dev.open-bio.org:/tmp/cvs-serv5128/lib/bio/db/genbank

Modified Files:
      Tag: BRANCH-biohackathon2008
	common.rb genbank.rb 
Log Message:
* lib/bio/db/genbank/common.rb
  * accessions method was broken
  * fixed a bug about embl_gb_record_number and sequence_position in references
* lib/bio/db/genbank/genbank.rb
  * fixed some mistaken variable names in to_biosequence() 


Index: genbank.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/genbank/genbank.rb,v
retrieving revision 0.40.2.1
retrieving revision 0.40.2.2
diff -C2 -d -r0.40.2.1 -r0.40.2.2
*** genbank.rb	14 Feb 2008 08:51:45 -0000	0.40.2.1
--- genbank.rb	3 Mar 2008 18:30:50 -0000	0.40.2.2
***************
*** 142,154 ****
  
      sequence.sequence_version = self.version
!     seq.date_created = nil #????
      sequence.date_modified = self.date
  
      sequence.keywords = self.keywords
      sequence.species = self.organism
!     sequence.classification = self.taxonomy
!     sequence.organnella = nil # not used
      sequence.comments = self.comment
      sequence.references = self.references
      return sequence
    end
--- 142,155 ----
  
      sequence.sequence_version = self.version
!     #sequence.date_created = nil #????
      sequence.date_modified = self.date
  
      sequence.keywords = self.keywords
      sequence.species = self.organism
!     sequence.classification = self.taxonomy.to_s.sub(/\.\z/, '').split(/\s*\;\s*/)
!     #sequence.organnella = nil # not used
      sequence.comments = self.comment
      sequence.references = self.references
+     sequence.features = self.features
      return sequence
    end

Index: common.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/genbank/common.rb,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -C2 -d -r1.11.2.1 -r1.11.2.2
*** common.rb	28 Feb 2008 05:54:51 -0000	1.11.2.1
--- common.rb	3 Mar 2008 18:30:50 -0000	1.11.2.2
***************
*** 45,49 ****
    # ACCESSION -- Returns contents of the ACCESSION record as an Array.
    def accessions
!     accession.split(/\s+/)
    end
  
--- 45,49 ----
    # ACCESSION -- Returns contents of the ACCESSION record as an Array.
    def accessions
!     field_fetch('ACCESSION').strip.split(/\s+/)
    end
  
***************
*** 141,148 ****
          subtag2array(ref).each do |field|
            case tag_get(field)
!           when /^\s*REFERENCE\s+(\d+)(\s+\(bases\s+(\d+)\s+to\s+(\d+)\))?/
!             hash['embl_gb_record_number'] = $1.to_i
!             if $2 then
!               hash['sequence_position'] = "#{$3}-#{$4}"
              end
            when /AUTHORS/
--- 141,154 ----
          subtag2array(ref).each do |field|
            case tag_get(field)
!           when /REFERENCE/
!             if /(\d+)(\s*\((.+)\))?/m =~ tag_cut(field) then
!               hash['embl_gb_record_number'] = $1.to_i
!               if $3 and $3 != 'sites' then
!                 seqpos = $3
!                 seqpos.sub!(/\A\s*bases\s+/, '')
!                 seqpos.gsub!(/(\d+)\s+to\s+(\d+)/, "\\1-\\2")
!                 seqpos.gsub!(/\s*\;\s*/, ', ')
!                 hash['sequence_position'] = seqpos
!               end
              end
            when /AUTHORS/




More information about the bioruby-cvs mailing list