From k at bioruby.org Wed Jan 7 15:27:10 2004 From: k at bioruby.org (Toshiaki Katayama) Date: Wed Jan 7 15:34:11 2004 Subject: [BioRuby] new BioRuby mail list at open-bio.org Message-ID: A happy new year! BioRuby server have been down for few months by RAID crush, however, thanks to the great staff of the Open Bio Foundation, we have immigrated our CVS repository, web pages and mail lists into the open-bio.org server. I have listed most of the new resources at http://bioruby.org/ so please check out the site for further information on the brand-new CVS, ML, Wiki pages, download site, other services like BioFetch etc... If you successfully receive this mail, you are ready for posting your message to this list . P.S. Try, http://bioruby.org/q--ple/ search with a keyword 'bioruby' :) Regards, Toshiaki Katayama From pjotr at pckassa.com Thu Jan 8 03:06:34 2004 From: pjotr at pckassa.com (pjotr@pckassa.com) Date: Thu Jan 8 03:13:33 2004 Subject: [BioRuby] Using CPAN Message-ID: <20040108080634.GA20911@team-machine.donck.com> Great! We are back on-line. I have a generic idea to write a module which would allow using CPAN from Ruby: The idea is to fire up a Perl XML/RPC or SOAP server from Ruby and use a simple interface for calling Perl. E.g. ~ perl = Perl.new # Invoke Perl server listening on XML/RPC port x = XMLRPC.new(perl.port) # or whatever x.eval "use Mail::Box; $m = new Mail::Box();" list = x.eval "$m->list();" list.each do | header | x.eval "print",header end ~~ The advantages: - One Perl instance per Ruby instance - Dynamic resolution - No name space problems therefore pretty generic. No linking of instances whatsoever. A ext::DL interface could be used too - if Perl sits in a library. Disadvantage: Slow, security can be a problem (network layer) and need to resolve multiple instances running at the same time (multiple servers). Also passing/returning non-standard types language types may be hard to achieve (meanwhile array, hash, etc should be straightforward). I have been thinking about this for years (off and on) and this looks like it may be feasible. The reason I am writing this to the list is if to see if there are other parties interested. Ruby RAA is quite good, but I am envious about some of the BioPerl facilities and modules like Mail::Box. I could help people choosing Ruby since it has BioPerl support(!). What do you think? Pj. From ktym at hgc.jp Sat Jan 10 16:56:31 2004 From: ktym at hgc.jp (Toshiaki Katayama) Date: Sat Jan 10 17:03:28 2004 Subject: [BioRuby] Using CPAN In-Reply-To: <20040108080634.GA20911@team-machine.donck.com> References: <20040108080634.GA20911@team-machine.donck.com> Message-ID: Hi, On 2004/01/08, at 17:06, pjotr@pckassa.com wrote: > Great! We are back on-line. I'm gradually correcting web pages, wiki documents and will start to commit recent changes into cvs. > I have a generic idea to write a module which would allow using CPAN > from Ruby: The idea is interesting, however, it seems that slightly off topic for this list as it is not limited to the *bio* ruby. Anyway, I have some comments, ;) > The idea is to fire up a Perl XML/RPC or SOAP server from Ruby and use > a > simple interface for calling Perl. I became to like SOAP before trying XMLRPC as it was easy to use, usually needless to care about the data type especially in Ruby as SOAP4R automatically converts into Ruby's object. I use SOAP for the KEGG API (http://www.genome.ad.jp/kegg/soap/). > The reason I am writing this to the list is if to see if there are > other parties interested. I think you should try the ruby-talk list for this purpose. Have you see http://www.yoshidam.net/Ruby.html#perl already? > Ruby RAA is quite good, but I am envious > about some of the BioPerl facilities and modules like Mail::Box. I > could help people choosing Ruby since it has BioPerl support(!). What > do you think? I can understand your point and BioPerl is really great, however, we shold try to implement the needed functionality in rubyish style. To use Perl from Ruby requires a knowledge of Perl. I feel that writing Perl script is easier than eval("$perl_code") in this case. As for the Mail::Box, I don't know what you really want to do with it, however, mailread.rb coming with Ruby(!) is enough for printing out headers and there are many other libraries for mail, smtp, pop and imap already. Finally, back to the BioRuby, Ruby 1.6.8 + RAA:ruby-sumo or recently released Ruby 1.8.1 will give us an enough environment to start with. See http://bioruby.org/wiki/English/?How+do+I+get+and+install+BioRuby%3F in the 'BioRuby in Anger' document for more details. Thanks, Toshiaki Katayama From pjotr at pckassa.com Sat Jan 10 17:45:38 2004 From: pjotr at pckassa.com (pjotr@pckassa.com) Date: Sat Jan 10 17:52:36 2004 Subject: [BioRuby] Using CPAN In-Reply-To: References: <20040108080634.GA20911@team-machine.donck.com> Message-ID: <20040110224538.GA22383@team-machine.donck.com> On Sun, Jan 11, 2004 at 06:56:31AM +0900, Toshiaki Katayama wrote: > The idea is interesting, however, it seems that slightly off topic for > this list as it is not limited to the *bio* ruby. No, it is generic. But then it also applies to some facilities of CPAN which may not be in BioRuby, but still useful for biologists. > I became to like SOAP before trying XMLRPC as it was easy to use, > usually needless to care about the data type especially in Ruby > as SOAP4R automatically converts into Ruby's object. > > I use SOAP for the KEGG API (http://www.genome.ad.jp/kegg/soap/). I have used both. SOAP is very good too, and in fact more complete than XMLRPC. The only disadvantage is slightly higher overhead/complexity. I was planning a factory pattern for the transport mechanism. So SOAP can be plugged in. > I think you should try the ruby-talk list for this purpose. > Have you see http://www.yoshidam.net/Ruby.html#perl already? I checked that. The problem is you have to actively link Perl against Ruby - which complicates matters (certainly during deployment). I like the idea of fixing things at runtime. I just wonder why no one else has come up with my idea. Performance reasons? Or just because we believe we have to duplicate everything? Only one way to find out... > I can understand your point and BioPerl is really great, however, > we shold try to implement the needed functionality in rubyish style. We should - and will. I will also try to contribute. But in life sometimes one has to take short cuts. If there is something that immediately works... But like I wrote earlier - it may be just theory - we may attract bio-informaticians if they believe they can use CPAN with Ruby. I think we need to expand our community. Note: the installation procedure of CPAN really shines (resolving dependencies, testing, documentation etc.). I tried raa-install, but that did not give good feelings. You see, CPAN is more than just code. Ruby is still weak in that area. > To use Perl from Ruby requires a knowledge of Perl. I feel that > writing Perl script is easier than eval("$perl_code") in this case. Yes and no. The thing is to use a lot of Ruby and just the Perl for the libraries. Anyway, thanks for your comments. I am testing the water so to speak. Lets see if I can get something written in the coming period. If anyone is interested please drop me a mail. Pj. From pjotr at pckassa.com Tue Jan 20 05:17:52 2004 From: pjotr at pckassa.com (pjotr@pckassa.com) Date: Tue Jan 20 05:24:28 2004 Subject: [BioRuby] Web interface Message-ID: <20040120101752.GA2771@team-machine.donck.com> Hi Everyone, I am in the process of writing several programs where it would be nice to have a web front-end. Now, for submitting FASTA, the interface is usually pretty similar where you have a style sheet, header, footer and some input fields. This calls for some template solution. My idea is to use mod_ruby where the template looks like: ~~~ require 'webtemplate' page = WebTemplate.new(stylefn,headerfn,footerfn,templatefn,'nextpage.cgi') ~~~ Where templatefn looks like: TextField,query,'Query' AminoAcids,field1 SubmitFile,field2 SelectField,field3,'Choose',{0,'Type1',0,'Type2',1,'Type3'} etc. ~~~ The next step is to parse the results entered on the generated form and submit the query to the query engine - which has to be able to queue requests not to overload the machine. Results can be displayed or sent by E-mail. The queue requests are simple batch invocations (not sure what infrastructure to use yet, gnuqueue http://www.gnuqueue.org/home.html is an option). That gives the advantage the programme can be run also from the command line by users who don't want the webinterface. A generic solution - and part of BioRuby - looks like a good idea to me. I can write it, but maybe there are some existing/better solutions to the same problem. What do you think? Pj. From ngoto at gen-info.osaka-u.ac.jp Tue Jan 20 08:33:33 2004 From: ngoto at gen-info.osaka-u.ac.jp (GOTO Naohisa) Date: Tue Jan 20 08:40:12 2004 Subject: [BioRuby] Web interface In-Reply-To: <20040120101752.GA2771@team-machine.donck.com> References: <20040120101752.GA2771@team-machine.donck.com> Message-ID: Hi, On Tue, 20 Jan 2004 11:17:52 +0100 pjotr@pckassa.com wrote: > Hi Everyone, > > I am in the process of writing several programs where it would be nice > to have a web front-end. Now, for submitting FASTA, the interface is > usually pretty similar where you have a style sheet, header, footer > and some input fields. This calls for some template solution. My idea > is to use mod_ruby where the template looks like: > > ~~~ > > require 'webtemplate' > > page = > WebTemplate.new(stylefn,headerfn,footerfn,templatefn,'nextpage.cgi') I'd rather like to do with single template file, by using Amrita or HTML/Template or something like these. http://raa.ruby-lang.org/list.rhtml?name=html-template http://www.brain-tokyo.jp/research/amrita/index.html Though, whatever approach we choose, template's template may be needed :-) > Where templatefn looks like: > > TextField,query,'Query' > AminoAcids,field1 > SubmitFile,field2 > SelectField,field3,'Choose',{0,'Type1',0,'Type2',1,'Type3'} > etc. Is there much computer-friendly and natural format? I think YAML is a good candidate, because Ruby already have YAML's parser. > The next step is to parse the results entered on the generated form > and submit the query to the query engine - which has to be able to > queue requests not to overload the machine. Results can be displayed > or sent by E-mail. > > The queue requests are simple batch invocations (not sure what > infrastructure to use yet, gnuqueue http://www.gnuqueue.org/home.html > is an option). That gives the advantage the programme can be run also > from the command line by users who don't want the webinterface. I tried GNU queue 1.30.1 last year, but it was still buggy. Does someone know alternatives? > A generic solution - and part of BioRuby - looks like a good idea to > me. I can write it, but maybe there are some existing/better > solutions to the same problem. > > What do you think? There are some web application frameworks written in Ruby and/or usable with Ruby. I think some kinds of biological CGI frameworks or templates may be needed. I wish, a code writing with the framework can run as both CGI and GUI and command-line applications with very few efforts. There are some web application frameworks written in Ruby and/or usable with Ruby. Using one of them might save time and effort. Regards, -- Naohisa GOTO ngoto@gen-info.osaka-u.ac.jp Genome Information Research Center, Osaka University, Japan From pjotr at pckassa.com Wed Jan 21 05:44:10 2004 From: pjotr at pckassa.com (pjotr@pckassa.com) Date: Wed Jan 21 05:50:45 2004 Subject: [BioRuby] Web interface In-Reply-To: References: <20040120101752.GA2771@team-machine.donck.com> Message-ID: <20040121104410.GA15813@team-machine.donck.com> On Tue, Jan 20, 2004 at 10:33:33PM +0900, GOTO Naohisa wrote: > I'd rather like to do with single template file, by using Amrita or > HTML/Template or something like these. > http://raa.ruby-lang.org/list.rhtml?name=html-template Hmmm. This one is too simple mindend and I don't see the advantage over eruby - really. > http://www.brain-tokyo.jp/research/amrita/index.html Amrita is more interesting. I'll consider that. > Though, whatever approach we choose, template's template may be needed :-) > > Where templatefn looks like: > > > > TextField,query,'Query' > > AminoAcids,field1 > > SubmitFile,field2 > > SelectField,field3,'Choose',{0,'Type1',0,'Type2',1,'Type3'} > > etc. > > Is there much computer-friendly and natural format? > I think YAML is a good candidate, because Ruby already have YAML's parser. I like that! Thanks for the pointer. > There are some web application frameworks written in Ruby and/or > usable with Ruby. > > I think some kinds of biological CGI frameworks or templates > may be needed. > > I wish, a code writing with the framework can run as both CGI and > GUI and command-line applications with very few efforts. That is a bit of a holy grail ;-). And in fact my experience with J2EE has taught me that, while 3-tier systems can scale well they tend to increase complexity. Which can be unacceptable. My 'solution' for new project is to keep it simple, and keep the interface as small as possible. A command line version should always be there and that allows for a CGI script to call the command line version - similarly for a GUI front-end (kinda minimal MVC pattern). If a command line is too simple (or too slow, because there are penalties) for what you want the choice of a frame work comes up. Note that most Unix tools are based on a similar 'phylosophy'. > There are some web application frameworks written in Ruby and/or > usable with Ruby. Using one of them might save time and effort. Had a look at Arrow http://dev.rubycrafters.com/arrow-manual/tutorial.html but that looks immature. Also I am a bit confused because (unlike EJBs) it seems to sit tight with the webserver. OK, what I'll do is provide something minimal shared across my two/three projects. Once that is done I'll post it. Pj.