[BioRuby] Preparing for 1.1 release

Mikael Borg mikael.borg at utoronto.ca
Mon Jul 9 20:00:47 UTC 2007


On Mon, 2007-09-07 at 20:57 +0900, Toshiaki Katayama wrote:
> Hi all,
> 
> Finally, I'm preparing for the BioRuby 1.1 release.
> 
> Developers, are you ready for the next release?
> 
> * If you have modules still working on, please let me know ASAP.
>   - Which module should be excluded in the next release?
>   - When will you finish and commit the final version?
> 
> * If you have not filled the ChangeLog file, please document it now.
> 
> I hope to pack this weekend.
> 
> Regards,
> Toshiaki
> 
> 
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby

There are still a few bugs in the pdb parser. I have tried to correct
the ones I've found (see below), but as I find the original code
difficult to understand, I might have introduced new bugs. Maybe you can
have a look and either use my suggested changes, or come up with other
solutions?

Cheers,

Mikael

1. empty records causes parser to crash through
Bio::PDB::Record.Pdb_LString(nil).
Solution: if empty record, make empty string String.new('').

2. if calling method sheet (Bio::PDB) for a Bio::PDB structure that
doesn't contain any sheets, the parser crashes.
Solution: return nil if there are no sheets in structure

# diff -u ~mborg/tmp/bioruby-1.1.0-pre4/lib/bio/db/pdb/pdb.rb pdb.rb
--- /home/mborg/tmp/bioruby-1.1.0-pre4/lib/bio/db/pdb/pdb.rb
2007-04-19 09:59:29.000000000 -0400
+++ pdb.rb      2007-07-09 14:44:01.000000000 -0400
@@ -119,7 +119,11 @@
           m
         end
         def self.new(str)
-          String.new(str)
+         if str.nil?
+           String.new('')
+         else
+           String.new(str)
+         end
         end
       end
 
@@ -1755,6 +1759,7 @@
     # If <em>sheetID</em> is given, it returns an array of
     # <code>Bio::PDB::Record::SHEET</code> instances.
     def sheet(sheetID = nil)
+      return nil unless @sheet
       unless defined?(@sheet)
         @sheet = make_grouping(self.record('SHEET'), :sheetID)
       end





More information about the BioRuby mailing list