T
timr
With every method call, the bioruby gem is surprising me with its
behavior--not pleasant surprises either (more like an unpleasant
kancho kind of surprise--hence the request to repay the authors).
For those who haven't been to Japan and are wondering what a kancho
is:
http://www.kancho.org/how_to_kancho.html
First, it has rather strange behavior when it comes to opening files.
For instance, when I try to open a genbank file like so:
=> #<Bio::FlatFile:0x11fa724 @raw=false, @firsttime_flag=true,
@splitter=#<Bio::FlatFile::Splitter:efault:0x11fa558
@delimiter_overrun=nil, @entry_pos_flag=nil,
@stream=#<Bio::FlatFile::BufferedInputStream:0x11fa6d4
@path="Ago2.seq", @io=#<File:Ago2.seq>, @buffer="">, @header="LOCUS ",
@delimiter="\n//\n">, @stream=#<Bio::FlatFile::BufferedInputStream:
0x11fa6d4 @path="Ago2.seq", @io=#<File:Ago2.seq>, @buffer="">,
@skip_leader_mode=:firsttime, @dbclass=Bio::GenBank>
#Surprise!!! I asked for a GenBank object and got a FlatFile object
back.
#Principle of least surprise would be Bio::GenBank.open =>
Bio::GenBank
=> ["@raw", "@firsttime_flag", "@splitter", "@stream",
"@skip_leader_mode", "@dbclass"]
#looking for my object by iterating through the gratuitous FlatFile
object.
=> ["@raw", "@firsttime_flag", "@splitter", "@stream",
"@skip_leader_mode", "@dbclass", "@entry"]
#Surprise!!! calling each on an object altered the object, by adding
an instance variable. #What?!!?! I have never seen a case where
calling each altered the object.
Kancho! Kancho! Kancho!
Tim
behavior--not pleasant surprises either (more like an unpleasant
kancho kind of surprise--hence the request to repay the authors).
For those who haven't been to Japan and are wondering what a kancho
is:
http://www.kancho.org/how_to_kancho.html
First, it has rather strange behavior when it comes to opening files.
For instance, when I try to open a genbank file like so:
=> #<Bio::FlatFile:0x11fa724 @raw=false, @firsttime_flag=true,
@splitter=#<Bio::FlatFile::Splitter:efault:0x11fa558
@delimiter_overrun=nil, @entry_pos_flag=nil,
@stream=#<Bio::FlatFile::BufferedInputStream:0x11fa6d4
@path="Ago2.seq", @io=#<File:Ago2.seq>, @buffer="">, @header="LOCUS ",
@delimiter="\n//\n">, @stream=#<Bio::FlatFile::BufferedInputStream:
0x11fa6d4 @path="Ago2.seq", @io=#<File:Ago2.seq>, @buffer="">,
@skip_leader_mode=:firsttime, @dbclass=Bio::GenBank>
#Surprise!!! I asked for a GenBank object and got a FlatFile object
back.
#Principle of least surprise would be Bio::GenBank.open =>
Bio::GenBank
=> ["@raw", "@firsttime_flag", "@splitter", "@stream",
"@skip_leader_mode", "@dbclass"]
#looking for my object by iterating through the gratuitous FlatFile
object.
=> ["@raw", "@firsttime_flag", "@splitter", "@stream",
"@skip_leader_mode", "@dbclass", "@entry"]
#Surprise!!! calling each on an object altered the object, by adding
an instance variable. #What?!!?! I have never seen a case where
calling each altered the object.
Kancho! Kancho! Kancho!
Tim