From pjotr2006 at thebird.nl Thu Jan 12 07:26:07 2006 From: pjotr2006 at thebird.nl (Pjotr Prins) Date: Thu Jan 12 07:44:41 2006 Subject: [BioRuby] Unit tests Message-ID: <20060112122607.GA13071@tm2.nmi-agro.nl> When I run the Bioruby unit tests many of them are failing. What is the policy here? Aren't people supposed to keep unit tests up-to-date? I have a problem with FASTA and thought of adding a unit test - but this is kinda discouraging. I'll have to ask the FASTA author to look at failing test 64, or something ;-) Pj. From ktym at hgc.jp Thu Jan 12 08:56:04 2006 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu Jan 12 09:13:44 2006 Subject: [BioRuby] Unit tests In-Reply-To: <20060112122607.GA13071@tm2.nmi-agro.nl> References: <20060112122607.GA13071@tm2.nmi-agro.nl> Message-ID: <414BC4A6-97B1-48C7-8E6E-6DC037A0F7DA@hgc.jp> On 2006/01/12, at 21:26, Pjotr Prins wrote: > When I run the Bioruby unit tests many of them are failing. What is > the policy here? Aren't people supposed to keep unit tests up-to-date? What version of the Ruby/BioRuby have you tried? BioRuby 0.7.0 release with Ruby 1.8.2 or later should pass all tests, although the CVS version often breaks. Note that I have reported a serious bug in db.rb of BioRuby 0.7.0, which is developmental series, I'll release 0.7.1 soon. BioRuby 0.6.4 is still a stable release. Toshiaki Katayama From ktym at hgc.jp Thu Jan 12 09:47:31 2006 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu Jan 12 09:44:05 2006 Subject: [BioRuby] bioruby genome browser? In-Reply-To: <43A38B69.7070605@duke.edu> References: <43A38B69.7070605@duke.edu> Message-ID: <6F5BEFBE-4D41-4905-9729-138749440C2C@hgc.jp> Dear Todd, Sorry for my delay in responding. http://gb.bioruby.org/ is defunct as the backend server crashed in 2003 (or was 2002?). It was written in Ruby using BioRuby, GD, libplot libraries and all the GenBank data was stored in MySQL with a original schema. After that, I'm using GBrowse for my site at http://das.hgc.jp/ for this purpose. I'm still interested in to have genome visualization functionality in BioRuby or in the BioRuby shell, however, it would need some time to implement. It would also be nice to utilize DAS sources and/or BioPerl's GFF schema in it, but it should also have unique characteristics compared with GBrowse to find a niche. Regards, Toshiaki Katayama On 2005/12/17, at 12:52, Todd Wasson wrote: > I'm looking into easy to use generic genome representation and browser packages, and I'm curious if bioruby has any kind of browser capability akin to what Lincoln Stein's GBrowse is for bioperl. Googling digs up some old links to a now seemingly defunct http://gb.bioruby.org/ site, but that's not much help any more. Is something like this out there somewhere? Is it actually in bioruby and I just haven't managed to uncover it yet? If not, are there plans or this? I suspect it would be no minor task for me to implement myself, just to get where GBrowse is, so I'm really hoping something is available... > > Thanks for any information you can provide! > > > Todd > _______________________________________________ > BioRuby mailing list > BioRuby@open-bio.org > http://portal.open-bio.org/mailman/listinfo/bioruby From trevor at corevx.com Thu Jan 12 17:40:50 2006 From: trevor at corevx.com (Trevor Wennblom) Date: Thu Jan 12 18:04:06 2006 Subject: [BioRuby] New version announcement? Was: Unit tests In-Reply-To: <414BC4A6-97B1-48C7-8E6E-6DC037A0F7DA@hgc.jp> References: <20060112122607.GA13071@tm2.nmi-agro.nl> <414BC4A6-97B1-48C7-8E6E-6DC037A0F7DA@hgc.jp> Message-ID: <43C6DAF2.6020204@corevx.com> Toshiaki Katayama wrote: > BioRuby 0.7.0 release with Ruby 1.8.2 or later should pass all tests, > although the CVS version often breaks. I was a bit surprised to read this. I see 0.7.0 is available at http://bioruby.org/archive/ , but as far as I know there was never an announcement on the mailing list and the main webpage has no mention of 0.7.0. Trevor From jan.aerts at bbsrc.ac.uk Mon Jan 16 08:46:12 2006 From: jan.aerts at bbsrc.ac.uk (jan aerts (RI)) Date: Mon Jan 16 08:49:05 2006 Subject: [BioRuby] concatenate two EMBL sequence files Message-ID: <84DA9D8AC9B05F4B889E7C70238CB45101FD65B1@rie2ksrv1.ri.bbsrc.ac.uk> Hello all, I'm trying to concatenate two EMBL files (_with_ features) into one larger sequence. Of course, positions of features of the second sequence have to recalculated in the new sequence. e.g.: sequence 1 = 100 bp feature A: 5..10 sequence 2 = 200 bp feature B: 15..20 => concatenated sequence 3 = 300 bp feature A: 5..10 feature B: 115..120 I'd like to write out the new sequence as an EMBL file. Can anyone point me in the right direction? Many thanks. A possible perl-convert, Jan Aerts, PhD Bioinformatics Group Roslin Institute Roslin Scotland, UK From ktym at hgc.jp Mon Jan 16 10:29:24 2006 From: ktym at hgc.jp (Toshiaki Katayama) Date: Mon Jan 16 10:26:25 2006 Subject: [BioRuby] concatenate two EMBL sequence files In-Reply-To: <84DA9D8AC9B05F4B889E7C70238CB45101FD65B1@rie2ksrv1.ri.bbsrc.ac.uk> References: <84DA9D8AC9B05F4B889E7C70238CB45101FD65B1@rie2ksrv1.ri.bbsrc.ac.uk> Message-ID: <9029376D-5C5C-4967-92B4-13A46839CB88@hgc.jp> Hello, For your purpose, using BioPerl would be straight forward. BioRuby doesn't have feature re-location mechanism and no one is working on writing out in EMBL format for now. I might consider to do the similar job by converting both sequence to GFF. By the way, having Bio::Locations#shift(slide_length) method would be helpful. Regards, Toshiaki Katayama On 2006/01/16, at 22:46, jan aerts (RI) wrote: > Hello all, > > I'm trying to concatenate two EMBL files (_with_ features) into one larger sequence. Of course, positions of features of the second sequence have to recalculated in the new sequence. > e.g.: > sequence 1 = 100 bp > feature A: 5..10 > sequence 2 = 200 bp > feature B: 15..20 > => concatenated sequence 3 = 300 bp > feature A: 5..10 > feature B: 115..120 > > I'd like to write out the new sequence as an EMBL file. > > Can anyone point me in the right direction? Many thanks. > > A possible perl-convert, > Jan Aerts, PhD > Bioinformatics Group > Roslin Institute > Roslin > Scotland, UK > > _______________________________________________ > BioRuby mailing list > BioRuby@open-bio.org > http://portal.open-bio.org/mailman/listinfo/bioruby From ktym at hgc.jp Mon Jan 16 10:13:36 2006 From: ktym at hgc.jp (Toshiaki Katayama) Date: Mon Jan 16 18:32:33 2006 Subject: [BioRuby] New version announcement? Was: Unit tests In-Reply-To: <43C6DAF2.6020204@corevx.com> References: <20060112122607.GA13071@tm2.nmi-agro.nl> <414BC4A6-97B1-48C7-8E6E-6DC037A0F7DA@hgc.jp> <43C6DAF2.6020204@corevx.com> Message-ID: <5F725032-8690-4552-BEB4-F53FF7539EFA@hgc.jp> On 2006/01/13, at 7:40, Trevor Wennblom wrote: > Toshiaki Katayama wrote: >> BioRuby 0.7.0 release with Ruby 1.8.2 or later should pass all tests, >> although the CVS version often breaks. > > I was a bit surprised to read this. I see 0.7.0 is available at http://bioruby.org/archive/ , but as far as I know there was never an announcement on the mailing list and the main webpage has no mention of 0.7.0. Sorry, it was my fault. I supposed that 0.7 series are not yet stable and released for developers, but I should make an announcement on the list. 0.7 includes many improvements - loading time made 30x faster than 0.6 (using autoload instead of require) - a new bioruby shell (command line interface for BioRuby) - many documents have been converted to RDoc format - many unit tests have been added - many fixes However, there are some backward incompatibilities, for example, BioRuby 0.7 may not run with Ruby 1.6.*. See doc/Changes-0.7.rd file for more details. Regards, Toshiaki Katayama From jan.aerts at bbsrc.ac.uk Tue Jan 17 11:55:54 2006 From: jan.aerts at bbsrc.ac.uk (jan aerts (RI)) Date: Tue Jan 17 11:52:22 2006 Subject: [BioRuby] schema of objects and relationships Message-ID: <84DA9D8AC9B05F4B889E7C70238CB45101FD65B5@rie2ksrv1.ri.bbsrc.ac.uk> Is there a schema somewhere that illustrates properties and/or relationships between bioruby objects? Thanks, Jan Aerts From jan.aerts at bbsrc.ac.uk Wed Jan 18 03:30:02 2006 From: jan.aerts at bbsrc.ac.uk (jan aerts (RI)) Date: Wed Jan 18 03:29:13 2006 Subject: [BioRuby] concatenate two EMBL sequence files References: <84DA9D8AC9B05F4B889E7C70238CB451030DAB1A@rie2ksrv1.ri.bbsrc.ac.uk> <87FFF965-3F20-4A17-8ABC-FE5519A90A7E@hgc.jp> Message-ID: <84DA9D8AC9B05F4B889E7C70238CB45101FD65B6@rie2ksrv1.ri.bbsrc.ac.uk> Just for future reference (including myself): the code to shift features in a GenBank sequence. It might be improved on (a lot?), but it works for me... jan. #!/usr/bin/ruby require 'bio' module Bio class Location def shift!(slide_length) @from += slide_length.to_i @to += slide_length.to_i end def to_s output = '' if @lt from_str = '<' + @from.to_s else from_str = @from.to_s end if @gt to_str = '>' + @to.to_s else to_str = @to.to_s end output = from_str + '..' + to_str if @strand == -1 output = 'complement(' + output + ')' end return output end end class Locations def shift!(slide_length) @locations.each do |x| x.shift!(slide_length) end end def to_s output = '' if @locations.length == 1 output = @locations[0].to_s else parts = Array.new() @locations.each do |loc| parts.push(loc.to_s) end output = 'join(' + parts.join(',') + ')' end return output end end class Feature def shift!(slide_length) locations = Locations.new(@position) locations.shift!(slide_length) @position = locations.to_s end end end ff = Bio::FlatFile.open(Bio::GenBank, "M33388.gb") ff.each_entry do |gb| gb.features.each do |feature| puts "BEFORE: " + feature.position feature.shift!(5) puts "AFTER: " + feature.position end end ff.close -----Original Message----- From: Toshiaki Katayama [mailto:ktym@hgc.jp] Sent: Tue 1/17/2006 2:16 PM To: jan aerts (RI) Subject: Re: [BioRuby] concatenate two EMBL sequence files Hello, On 2006/01/17, at 21:57, jan aerts (RI) wrote: > I've tried BioPerl, but it gets pretty difficult when you want to shift > features that have positions like > "join(<5..10,complement(55..70),13..14)"... I have never tried but I believed that BioPerl is good for these situation as it seems to have various sequence and location models... Note that, the location including '<' notation is not well supported in BioRuby. Please keep in mind that '<5..10' will be treated as '5..10'. In your case, I suppose you understand what you are doing. :) > It was _really_ straightforward to add such a Bio::Locations#shift > method to my bioruby installation as you suggested, but now I'm trying > to figure out where to add the code for exporting to EMBL format. There > is a to_fasta method in bio/sequence.rb, but a newly added to_embl > method in that file can not be found by my script. Can anyone tell me > where I should add such a method? > > My code to read a genbank file, shift all features by 5 and print in > EMBL format: > $ ff = Bio::FlatFile.new(Bio::GenBank, ARGF) > $ ff.each_entry do |gb| > $ gb.features.each do |feature| > $ locs = Bio::Locations.new(feature.position) > $ locs.shift(5) ####Uses new method to shift all locs by 5 I realized, after I hit send button, that the 'shift' method should be added to Bio::Features class to shift all the features of the sequence. gb2 = gb.features.shift(5) gb2.features.each ... or gb.features.each do |feature| feature.shift!(5) end puts gb.to_embl However, ideally, having a rich sequence model like BioPerl which converts sequence with annotations from any sequence entry (GenBank, EMBL etc.), would give more sophisticated solution. If you have two genbank entries in variables gb1 and gb2, and if there were a 'to_richseq' method which converts Bio::GenBank data model to Bio::RichSeq or something, seq = gb1.to_richseq + gb2.to_richseq.shift(5) will give you a new sequence which has a merged sequence with shifted annotations. > $ end > $ puts gb.to_embl ####Doesn't work yet!! Where do I > put the to_embl method? > $ end > > Two problems still exist: > (1) in what file from the bioruby libs should I put the to_embl code? In Ruby, classes are open, so you can put module Bio class GenBank def to_embl ... end end end before you use the 'to_embl' method against your Bio::GenBank object (say, on top of your script). Again, I think it would be better to have this method in the new not-yet-implemented Bio::RichSeq class. The Bio::Sequence#to_fasta method should also be moved to this class. I don't like the name 'RichSeq', though. > (2) I suppose that, in the code above, the features themselves don't get > shifted (the locs object has been detached from the gb object). How can > I do that? Yes, as I mentioned above, my previous suggestion was not good. The new shift/shift! methods should be in Bio::Features or Bio::Feature (or in Bio::RichSeq would be better). > Many thanks, > Jan Aerts Good luck! Thanks, Toshiaki Katayama > >> -----Original Message----- >> From: bioruby-bounces@portal.open-bio.org >> [mailto:bioruby-bounces@portal.open-bio.org] On Behalf Of >> Toshiaki Katayama >> Sent: 16 January 2006 15:29 >> To: BioRuby ML Discussion List Project >> Subject: Re: [BioRuby] concatenate two EMBL sequence files >> >> Hello, >> >> For your purpose, using BioPerl would be straight forward. >> >> BioRuby doesn't have feature re-location mechanism and no one >> is working on writing out in EMBL format for now. >> >> I might consider to do the similar job by converting both >> sequence to GFF. >> By the way, having Bio::Locations#shift(slide_length) method >> would be helpful. >> >> Regards, >> Toshiaki Katayama >> >> On 2006/01/16, at 22:46, jan aerts (RI) wrote: >> >>> Hello all, >>> >>> I'm trying to concatenate two EMBL files (_with_ features) >> into one larger sequence. Of course, positions of features of >> the second sequence have to recalculated in the new sequence. >>> e.g.: >>> sequence 1 = 100 bp >>> feature A: 5..10 >>> sequence 2 = 200 bp >>> feature B: 15..20 >>> => concatenated sequence 3 = 300 bp >>> feature A: 5..10 >>> feature B: 115..120 >>> >>> I'd like to write out the new sequence as an EMBL file. >>> >>> Can anyone point me in the right direction? Many thanks. >>> >>> A possible perl-convert, >>> Jan Aerts, PhD >>> Bioinformatics Group >>> Roslin Institute >>> Roslin >>> Scotland, UK >>> >>> _______________________________________________ >>> BioRuby mailing list >>> BioRuby@open-bio.org >>> http://portal.open-bio.org/mailman/listinfo/bioruby >> >> _______________________________________________ >> BioRuby mailing list >> BioRuby@open-bio.org >> http://portal.open-bio.org/mailman/listinfo/bioruby >> From ngoto at gen-info.osaka-u.ac.jp Wed Jan 18 06:11:10 2006 From: ngoto at gen-info.osaka-u.ac.jp (GOTO Naohisa) Date: Wed Jan 18 06:20:58 2006 Subject: [BioRuby] concatenate two EMBL sequence files In-Reply-To: <84DA9D8AC9B05F4B889E7C70238CB45101FD65B6@rie2ksrv1.ri.bbsrc.ac.uk> References: <84DA9D8AC9B05F4B889E7C70238CB451030DAB1A@rie2ksrv1.ri.bbsrc.ac.uk> <87FFF965-3F20-4A17-8ABC-FE5519A90A7E@hgc.jp> <84DA9D8AC9B05F4B889E7C70238CB45101FD65B6@rie2ksrv1.ri.bbsrc.ac.uk> Message-ID: <200601181111.k0IBBLlg020543@idns103.gen-info.osaka-u.ac.jp> On Wed, 18 Jan 2006 08:30:02 -0000 "jan aerts \(RI\)" wrote: > Just for future reference (including myself): the code to shift features in a GenBank sequence. It might be improved on (a lot?), but it works for me... In your Locations#to_s, complement(join(10..20,30..40)) will be changed to join(complement(30..40),complement(10..20)) I think this might be something wrong. Because Bio::Locations doesn't record some information, we cannot reproduce a complete location string from a Bio::Locations object. I recently wrote routines to convert GenBank <=> EMBL features. I attached a file in this mail. I hope it will help you. It was not incoorporated into BioRuby because I had no idea about entry output framework (counterpart of Bio::FlatFile ???). In my Locations#to_s routine, "complement(join(10..20,30..40))" will be correct, but "complement(join(10000..12000,1..100))" for a circular sequence will still be changed to "join(complement(1..100),complement(10000..12000))". This is limitation of Bio::Locations that losts information. -- Naohisa GOTO ngoto@gen-info.osaka-u.ac.jp Department of Genome Informatics, Genome Information Research Center, Research Institute for Microbial Diseases, Osaka University, Japan -------------- next part -------------- # require 'bio' module Bio class Feature def formatted_string(style = 'GenBank') style = style.to_s case style when /GenBank/i, /NCBI/i, /DDBJ/i style = :genbank when /EMBL/i style = :embl else raise ArgumentError, "unknown style" end case style when :genbank head = ' ' * 5 head2 = head + ' ' * 16 width = 79 - head2.length first = head + sprintf("%-16s", self.feature) when :embl head = 'FT ' head2 = head + ' ' * 16 width = 80 - head2.length first = head + sprintf("%-16s", self.feature) end res = first h = '' #position_string = self.position position_string = self.locations.to_s str_wrap(position_string, width).each_line do |x| res << h << x h = head2 end self.qualifiers.each do |q| if q.value.is_a?(Integer) or q.qualifier == 'transl_table' or q.value == true then val = q.value.to_s else # http://www.ncbi.nlm.nih.gov/collab/FT/index.html # 3.3.3.1 val = q.value.gsub(/"/, '""') #val.delete!("\x00-\x1f\x7f-\xff") val = '"' + val + '"' end if q.value == true then w = str_wrap('/' + q.qualifier, width) elsif q.qualifier == 'translation' then w = str_wrap_force('/' + q.qualifier + '=' + val, width) else w = str_wrap('/' + q.qualifier + '=' + val, width) end w.each_line do |x| res << head2 << x end end res end def str_wrap_force(str, width) str.gsub(Regexp.new("(.{1,#{width}})"), "\\1\n") end private :str_wrap_force def str_wrap(str, width) res = '' while str and str.length > width do r = nil width.downto(1) do |i| if str[i..i] == ' ' or /[,;]/ =~ str[(i-1)..(i-1)] then r = str[0..(i-1)].sub(/ +\z/, '') str = str[i..-1].sub(/\A +/, '') break end end if r == nil then r = str[0..(width-1)] str = str[width..-1] end res << r << "\n" end res << str << "\n" if str res end private :str_wrap end #class Feature class Features def formatted_string(*arg) self.features.collect do |x| x.formatted_string(*arg) end.join('') end end #class Features class Locations def to_s case self.locations.size when 0 return '' when 1 return self.locations[0].to_s end r = [] clocs = [] self.locations.each do |loc| raise "Locations#to_s does not support @sequence" if loc.sequence raise "Locations#to_s does not support @xref_id" if loc.xref_id if loc.strand < 0 unless clocs.size > 0 and clocs[-1].to > loc.from then r << format_complement_join_and_clear(clocs) if clocs.size > 0 end clocs << loc else r << format_complement_join_and_clear(clocs) if clocs.size > 0 r << loc.to_s end end r << format_complement_join_and_clear(clocs) if clocs.size > 0 if r.size <= 0 then '' elsif r.size == 1 then r[0] else "join(#{r.join(',')})" end end def format_complement_join_and_clear(ary) r = format_complement_join(ary) ary.clear r end private :format_complement_join_and_clear def format_complement_join(ary) return '' if ary.size <= 0 return ary[0].to_s if ary.size == 1 a = ary.collect do |loc| "#{loc.lt ? '<' : ''}#{loc.from}..#{loc.gt ? '>' : ''}#{loc.to}" end a.reverse! "complement(join(#{a.join(',')}))" end private :format_complement_join end #class Locations class Location def to_s raise "Location#to_s does not support @sequence" if @sequence raise "Location#to_s does not support @xref_id" if @xref_id r = "#{@lt ? '<' : ''}#{@from}..#{@gt ? '>' : ''}#{@to}" @strand < 0 ? "complement(#{r})" : r end end #class Location end #module Bio From ktym at hgc.jp Thu Jan 19 08:35:22 2006 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu Jan 19 08:31:49 2006 Subject: [BioRuby] schema of objects and relationships In-Reply-To: <84DA9D8AC9B05F4B889E7C70238CB45101FD65B5@rie2ksrv1.ri.bbsrc.ac.uk> References: <84DA9D8AC9B05F4B889E7C70238CB45101FD65B5@rie2ksrv1.ri.bbsrc.ac.uk> Message-ID: <00364263-ECE4-4095-A06A-97C7887F5997@hgc.jp> On 2006/01/18, at 1:55, jan aerts (RI) wrote: > Is there a schema somewhere that illustrates properties and/or relationships between bioruby objects? I have updated BioRuby's rdoc with --diagram option at http://bioruby.org/rdoc/ so you will find a auto-generated graphical schema on each page. http://bioruby.org/rdoc/classes/Bio.html Another schema diagram, manually drawn with dia, is still available at http://bioruby.org/archive/doc/ClassHierarchy.gif but it is very old and not updated. Toshiaki From ktym at hgc.jp Fri Jan 20 09:48:46 2006 From: ktym at hgc.jp (Toshiaki Katayama) Date: Fri Jan 20 09:45:17 2006 Subject: [BioRuby] BioRuby 0.7.1 released Message-ID: Hi, I just put BioRuby 0.7.1 at http://bioruby.org/archive/bioruby-0.7.1.tar.gz This is a bug fix release and still for developers. Please read ChangeLog and doc/Changes-0.7.rd file if you try. P.S. Pjotr, I'm sorry that the unit tests in 0.7.0 release was also broken. I thought I have removed tests which couldn't pass in that release but I have forgotten. I have improved the situation in 0.7.1, but you may still see some errors. P.S. 2 I'll make big changes on sequence.rb to make Bio::Sequence can be used as a rich sequence (sequence with annotation) on CVS. Thanks, Toshiaki Katayama From trevor at corevx.com Tue Jan 24 20:21:29 2006 From: trevor at corevx.com (Trevor Wennblom) Date: Tue, 24 Jan 2006 19:21:29 -0600 Subject: [BioRuby] BioRubyDoc Message-ID: <43D6D299.50003@corevx.com> I've created a new MediaWiki instance to help document the ongoing BioRuby efforts. This is meant to serve as a supplement to the already great resources at bioruby.org and wiki.bioruby.org BioRubyDoc is available at http://bioruby-doc.org/ Initially I just wanted a MediaWiki setup to help myself with project management in BioRuby, but it seemed like it could be a decent public resource with just a little bit more effort. There's not much content at the moment, but the structure is in place and it's fully usable if anyone would like to contribute anything to it. If anyone has suggestions or comments they'd be well received. Trevor From n at bioruby.org Fri Jan 27 02:26:33 2006 From: n at bioruby.org (Mitsuteru NAKAO) Date: Fri, 27 Jan 2006 16:26:33 +0900 (JST) Subject: [BioRuby] BioRubyDoc In-Reply-To: <43D6D299.50003@corevx.com> References: <43D6D299.50003@corevx.com> Message-ID: <20060127.162633.87266233.cortel@machina.localizome.net> Great job! > Trevor. > If anyone has suggestions or comments they'd be well received. Where is RSS feed for the wiki ? Thanks Mitsuteru - Mitsuteru NAKAO Mitsuteru Nakao Sequence Analysis Team Compuational Biology Research Center (CBRC) National Institute of Advanced Industrial Science and Technology (AIST) BioRuby Project b-Src From mmhohman at northwestern.edu Sun Jan 29 18:22:49 2006 From: mmhohman at northwestern.edu (Moses Hohman) Date: Sun, 29 Jan 2006 17:22:49 -0600 Subject: [BioRuby] BioRubyDoc In-Reply-To: <20060127.162633.87266233.cortel@machina.localizome.net> References: <43D6D299.50003@corevx.com> <20060127.162633.87266233.cortel@machina.localizome.net> Message-ID: Hi Mitsuteru, I believe MediaWikis don't have links to their feeds from the front page; you have to navigate to Recent Changes first, and then look for the rss and atom links in the lower left corner. To save you time: http://bioruby-doc.org/index.php?title=Special:Recentchanges&feed=rss Moses Moses M. Hohman, Ph.D. Assoc. Director of Bioinformatics, Center for Functional Genomics Assoc. Director of Bioinformatics and Software Engineering, Robert H. Lurie Comprehensive Cancer Center Northwestern University http://www.neuromice.org/ http://www.moseshohman.com/blog/ On Jan 27, 2006, at 1:26 AM, Mitsuteru NAKAO wrote: > > Great job! > Trevor. > >> If anyone has suggestions or comments they'd be well received. > > Where is RSS feed for the wiki ? > Thanks > > Mitsuteru > - > Mitsuteru NAKAO > > Mitsuteru Nakao mitsuteru at aist.go.jp> > 7Enakao/> > Sequence Analysis Team seq.cbrc.jp> > Compuational Biology Research Center (CBRC) www.cbrc.jp> > National Institute of Advanced Industrial Science and Technology > (AIST) > > > BioRuby Project > b-Src > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From pjotr2006 at thebird.nl Tue Jan 31 02:30:57 2006 From: pjotr2006 at thebird.nl (Pjotr Prins) Date: Tue, 31 Jan 2006 08:30:57 +0100 Subject: [BioRuby] (no subject) Message-ID: <20060131073057.GA15105@thebird.nl> Dear all, In the tutorial we write: So when using String methods, you should subtract 1 from positions conventionally used in biology. (subseq method returns nil if you specify positions smaller than or equal to 0 for either one of the "from" or "to".) and I added: (EDITOR'S NOTE: should 'subseq' not throw an exception instead?) Can someone state what is the preferred design? I personally think an exception should be thrown to warn a programmer something is wrong - i.e. this is an exceptional situation ;-). Returning a nil may lead to nicer looking loops, but it does not help writing good programs. Regarding the exception vs return code issue, I think Martin Fowler's Refactoring says all that need to be said : - Returning an error code to indicate an error is a code smell because you could miss the error checking (http://www.refactoring.com/catalog/...hException.html) - Throwing an exception on a condition the caller could have checked first is another code smell because it makes the caller code hard to read (http://www.refactoring.com/catalog/...onWithTest.html) Pj. From mmhohman at northwestern.edu Tue Jan 31 12:25:56 2006 From: mmhohman at northwestern.edu (Moses Hohman) Date: Tue, 31 Jan 2006 11:25:56 -0600 Subject: [BioRuby] (no subject) In-Reply-To: <20060131073057.GA15105@thebird.nl> References: <20060131073057.GA15105@thebird.nl> Message-ID: Hi Pjotr, I completely agree. We should throw an exception. Moses On Jan 31, 2006, at 1:30 AM, Pjotr Prins wrote: > Dear all, > > In the tutorial we write: > > So when using String methods, you should subtract 1 from positions > conventionally used in biology. (subseq method returns nil if you > specify positions smaller than or equal to 0 for either one of the > "from" or "to".) > > and I added: > > (EDITOR'S NOTE: should 'subseq' not throw an exception instead?) > > Can someone state what is the preferred design? I personally think an > exception should be thrown to warn a programmer something is wrong - > i.e. this is an exceptional situation ;-). Returning a nil may lead to > nicer looking loops, but it does not help writing good programs. > > Regarding the exception vs return code issue, I think Martin Fowler's > Refactoring says all that need to be said : > > - Returning an error code to indicate an error is a code smell because > you could miss the error checking > (http://www.refactoring.com/catalog/...hException.html) > > - Throwing an exception on a condition the caller could have checked > first is another code smell because it makes the caller code hard > to read > (http://www.refactoring.com/catalog/...onWithTest.html) > > Pj. > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From trevor at corevx.com Wed Jan 25 01:21:29 2006 From: trevor at corevx.com (Trevor Wennblom) Date: Tue, 24 Jan 2006 19:21:29 -0600 Subject: [BioRuby] BioRubyDoc Message-ID: <43D6D299.50003@corevx.com> I've created a new MediaWiki instance to help document the ongoing BioRuby efforts. This is meant to serve as a supplement to the already great resources at bioruby.org and wiki.bioruby.org BioRubyDoc is available at http://bioruby-doc.org/ Initially I just wanted a MediaWiki setup to help myself with project management in BioRuby, but it seemed like it could be a decent public resource with just a little bit more effort. There's not much content at the moment, but the structure is in place and it's fully usable if anyone would like to contribute anything to it. If anyone has suggestions or comments they'd be well received. Trevor From n at bioruby.org Fri Jan 27 07:26:33 2006 From: n at bioruby.org (Mitsuteru NAKAO) Date: Fri, 27 Jan 2006 16:26:33 +0900 (JST) Subject: [BioRuby] BioRubyDoc In-Reply-To: <43D6D299.50003@corevx.com> References: <43D6D299.50003@corevx.com> Message-ID: <20060127.162633.87266233.cortel@machina.localizome.net> Great job! > Trevor. > If anyone has suggestions or comments they'd be well received. Where is RSS feed for the wiki ? Thanks Mitsuteru - Mitsuteru NAKAO Mitsuteru Nakao Sequence Analysis Team Compuational Biology Research Center (CBRC) National Institute of Advanced Industrial Science and Technology (AIST) BioRuby Project b-Src From mmhohman at northwestern.edu Sun Jan 29 23:22:49 2006 From: mmhohman at northwestern.edu (Moses Hohman) Date: Sun, 29 Jan 2006 17:22:49 -0600 Subject: [BioRuby] BioRubyDoc In-Reply-To: <20060127.162633.87266233.cortel@machina.localizome.net> References: <43D6D299.50003@corevx.com> <20060127.162633.87266233.cortel@machina.localizome.net> Message-ID: Hi Mitsuteru, I believe MediaWikis don't have links to their feeds from the front page; you have to navigate to Recent Changes first, and then look for the rss and atom links in the lower left corner. To save you time: http://bioruby-doc.org/index.php?title=Special:Recentchanges&feed=rss Moses Moses M. Hohman, Ph.D. Assoc. Director of Bioinformatics, Center for Functional Genomics Assoc. Director of Bioinformatics and Software Engineering, Robert H. Lurie Comprehensive Cancer Center Northwestern University http://www.neuromice.org/ http://www.moseshohman.com/blog/ On Jan 27, 2006, at 1:26 AM, Mitsuteru NAKAO wrote: > > Great job! > Trevor. > >> If anyone has suggestions or comments they'd be well received. > > Where is RSS feed for the wiki ? > Thanks > > Mitsuteru > - > Mitsuteru NAKAO > > Mitsuteru Nakao mitsuteru at aist.go.jp> > 7Enakao/> > Sequence Analysis Team seq.cbrc.jp> > Compuational Biology Research Center (CBRC) www.cbrc.jp> > National Institute of Advanced Industrial Science and Technology > (AIST) > > > BioRuby Project > b-Src > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From pjotr2006 at thebird.nl Tue Jan 31 07:30:57 2006 From: pjotr2006 at thebird.nl (Pjotr Prins) Date: Tue, 31 Jan 2006 08:30:57 +0100 Subject: [BioRuby] (no subject) Message-ID: <20060131073057.GA15105@thebird.nl> Dear all, In the tutorial we write: So when using String methods, you should subtract 1 from positions conventionally used in biology. (subseq method returns nil if you specify positions smaller than or equal to 0 for either one of the "from" or "to".) and I added: (EDITOR'S NOTE: should 'subseq' not throw an exception instead?) Can someone state what is the preferred design? I personally think an exception should be thrown to warn a programmer something is wrong - i.e. this is an exceptional situation ;-). Returning a nil may lead to nicer looking loops, but it does not help writing good programs. Regarding the exception vs return code issue, I think Martin Fowler's Refactoring says all that need to be said : - Returning an error code to indicate an error is a code smell because you could miss the error checking (http://www.refactoring.com/catalog/...hException.html) - Throwing an exception on a condition the caller could have checked first is another code smell because it makes the caller code hard to read (http://www.refactoring.com/catalog/...onWithTest.html) Pj. From mmhohman at northwestern.edu Tue Jan 31 17:25:56 2006 From: mmhohman at northwestern.edu (Moses Hohman) Date: Tue, 31 Jan 2006 11:25:56 -0600 Subject: [BioRuby] (no subject) In-Reply-To: <20060131073057.GA15105@thebird.nl> References: <20060131073057.GA15105@thebird.nl> Message-ID: Hi Pjotr, I completely agree. We should throw an exception. Moses On Jan 31, 2006, at 1:30 AM, Pjotr Prins wrote: > Dear all, > > In the tutorial we write: > > So when using String methods, you should subtract 1 from positions > conventionally used in biology. (subseq method returns nil if you > specify positions smaller than or equal to 0 for either one of the > "from" or "to".) > > and I added: > > (EDITOR'S NOTE: should 'subseq' not throw an exception instead?) > > Can someone state what is the preferred design? I personally think an > exception should be thrown to warn a programmer something is wrong - > i.e. this is an exceptional situation ;-). Returning a nil may lead to > nicer looking loops, but it does not help writing good programs. > > Regarding the exception vs return code issue, I think Martin Fowler's > Refactoring says all that need to be said : > > - Returning an error code to indicate an error is a code smell because > you could miss the error checking > (http://www.refactoring.com/catalog/...hException.html) > > - Throwing an exception on a condition the caller could have checked > first is another code smell because it makes the caller code hard > to read > (http://www.refactoring.com/catalog/...onWithTest.html) > > Pj. > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby >