From georgkam at gmail.com Tue Jul 1 08:49:02 2008 From: georgkam at gmail.com (George Githinji) Date: Tue, 1 Jul 2008 15:49:02 +0300 Subject: [BioRuby] biographics/pango problem? Message-ID: <55915f820807010549u7bcf8e05r962eb070c853ec4d@mail.gmail.com> Hey, I recently migrated my application from windows(where it was running okl) to a linux box (because it is open source and has better support) I am running Ubuntu 8.04 (hardy) with rails 1.2.1, ruby 1.8.6, bioruby 1.2.1 and biographics 1.4 I have also installed libcairo per the instructions on the bio-graphics library webpage. however i think i am having problems with pango. Is there a pango alternative? Anyway that i can resolve the error below? => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails 2.1.0 application starting on http://0.0.0.0:3013 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3013 ** Starting Rails with development environment... /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- pango (MissingSourceFile) Exiting from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' from /usr/lib/ruby/gems/1.8/gems/bio-graphics-1.4/lib/bio-graphics.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' ... 29 levels... from /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from script/server:3 -- --------------- Sincerely George Research Assistant KEMRI-Wellcome Trust Program Kilifi, Kenya Skype: george_g2 Website: http://biorelated.wordpress.com/ From f.schwach at uea.ac.uk Tue Jul 1 09:26:19 2008 From: f.schwach at uea.ac.uk (Frank Schwach) Date: Tue, 01 Jul 2008 14:26:19 +0100 Subject: [BioRuby] biographics/pango problem? In-Reply-To: <55915f820807010549u7bcf8e05r962eb070c853ec4d@mail.gmail.com> References: <55915f820807010549u7bcf8e05r962eb070c853ec4d@mail.gmail.com> Message-ID: <1214918779.13811.73.camel@fschwachbiopc.bio.uea.ac.uk> George, I also had lots of problems getting the dependencies for Bio::Graphics up and running on my Centos5 machine but now it is working. In the end I did this: Installed pango-devel (there is probably a package for Ubuntu) Installed ruby-gtk2 to get pango and glib2 ruby bindings: http://sourceforge.net/project/showfiles.php?group_id=53614&package_id=48093 Most recent version didn?t compile on my system so I used ruby-gtk2-0.16.0.tar.gz After unpacking I configured like this to get the bits that I needed: $ ruby extconf.rb glib pango then make, make/install. Glib2.0 or higher is required and you have to make sure that GTK1 is not installed on the system anymore (I first had both in parallel and that didn't work). Maybe this helps solve your problem too. Good luck! Frank On Tue, 2008-07-01 at 15:49 +0300, George Githinji wrote: > Hey, > I recently migrated my application from windows(where it was running okl) to > a linux box (because it is open source and has better support) > I am running Ubuntu 8.04 (hardy) with rails 1.2.1, ruby 1.8.6, bioruby 1.2.1 > and biographics 1.4 > I have also installed libcairo per the instructions on the bio-graphics > library webpage. > however i think i am having problems with pango. > > Is there a pango alternative? Anyway that i can resolve the error below? > > => Booting Mongrel (use 'script/server webrick' to force WEBrick) > => Rails 2.1.0 application starting on http://0.0.0.0:3013 > => Call with -d to detach > => Ctrl-C to shutdown server > ** Starting Mongrel listening at 0.0.0.0:3013 > ** Starting Rails with development environment... > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- pango (MissingSourceFile) > Exiting > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in > `new_constants_in' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/bio-graphics-1.4/lib/bio-graphics.rb:12 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > `require' > ... 29 levels... > from > /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from script/server:3 > From georgkam at gmail.com Tue Jul 1 13:42:30 2008 From: georgkam at gmail.com (George Githinji) Date: Tue, 1 Jul 2008 20:42:30 +0300 Subject: [BioRuby] biographics/pango problem? In-Reply-To: <4c7507a70807010657n3347824axb140b56796a28a50@mail.gmail.com> References: <55915f820807010549u7bcf8e05r962eb070c853ec4d@mail.gmail.com> <1214918779.13811.73.camel@fschwachbiopc.bio.uea.ac.uk> <4c7507a70807010657n3347824axb140b56796a28a50@mail.gmail.com> Message-ID: <55915f820807011042m6e7d797fmf71de4785c17f422@mail.gmail.com> Hi Jan and Frank, I did a sudo gem list --local The ruby bindings for pango or gnome were missing. So i did $ sudo gem install libpango1-ruby ERROR: could not find gem libpango1-ruby locally or in a repository $ sudo gem install libgnome2-ruby ERROR: could not find gem libgnome2-ruby locally or in a repository I then tried Frank's way but the packages could not compile. Then i decided to try install ruby-gnome2 sudo apt-get install ruby-gnome2 The following extra packages will be installed: libart2-ruby libart2-ruby1.8 libatk1-ruby libatk1-ruby1.8 libgconf2-ruby libgconf2-ruby1.8 libgdk-pixbuf2-ruby libgdk-pixbuf2-ruby1.8 libglade2-ruby libglade2-ruby1.8 libglib2-ruby1.8 libgnome2-ruby libgnome2-ruby1.8 libgnomecanvas2-ruby libgnomecanvas2-ruby1.8 libgnomeprint2-ruby libgnomeprint2-ruby1.8 libgnomeprintui2-ruby libgnomeprintui2-ruby1.8 libgnomevfs2-ruby libgnomevfs2-ruby1.8 libgtk-mozembed-ruby libgtk-mozembed-ruby1.8 libgtk2-ruby libgtk2-ruby1.8 libgtkglext1 libgtkglext1-ruby libgtkglext1-ruby1.8 libgtkhtml2-ruby libgtkhtml2-ruby1.8 libgtksourceview1-ruby libgtksourceview1-ruby1.8 libopengl-ruby libopengl-ruby1.8 libpanel-applet2-ruby libpanel-applet2-ruby1.8 libpango1-ruby libpango1-ruby1.8 librsvg2-ruby librsvg2-ruby1.8 libvte-ruby libvte-ruby1.8 The following NEW packages will be installed: libart2-ruby libart2-ruby1.8 libatk1-ruby libatk1-ruby1.8 libgconf2-ruby libgconf2-ruby1.8 libgdk-pixbuf2-ruby libgdk-pixbuf2-ruby1.8 libglade2-ruby libglade2-ruby1.8 libglib2-ruby1.8 libgnome2-ruby libgnome2-ruby1.8 libgnomecanvas2-ruby libgnomecanvas2-ruby1.8 libgnomeprint2-ruby libgnomeprint2-ruby1.8 libgnomeprintui2-ruby libgnomeprintui2-ruby1.8 libgnomevfs2-ruby libgnomevfs2-ruby1.8 libgtk-mozembed-ruby libgtk-mozembed-ruby1.8 libgtk2-ruby libgtk2-ruby1.8 libgtkglext1 libgtkglext1-ruby libgtkglext1-ruby1.8 libgtkhtml2-ruby libgtkhtml2-ruby1.8 libgtksourceview1-ruby libgtksourceview1-ruby1.8 libopengl-ruby libopengl-ruby1.8 libpanel-applet2-ruby libpanel-applet2-ruby1.8 libpango1-ruby libpango1-ruby1.8 librsvg2-ruby librsvg2-ruby1.8 libvte-ruby libvte-ruby1.8 ruby-gnome2 It may look like an overkill but it worked! Thank you so much for pointing the way. George On Tue, Jul 1, 2008 at 4:57 PM, Jan Aerts wrote: > Regarding the trouble people are having to get the requirements set > correctly (including myself: it took me ages to get it running on a > Mac at my new job): does anyone have an idea what low-level drawing > engines could be used instead of cairo? I'm pretty happy with cairo > itself, but it's just the hassle of getting it running. > > If we find a better/simpler engine, we can always create a new git > branch. I won't have much time to code on this myself, but please feel > free to fork from git and start hacking away :-) > > Note: I've done SVG, and that's a no-go. > > jan. > > On Tue, Jul 1, 2008 at 2:26 PM, Frank Schwach wrote: > > George, > > > > I also had lots of problems getting the dependencies for Bio::Graphics > > up and running on my Centos5 machine but now it is working. > > In the end I did this: > > > > Installed pango-devel (there is probably a package for Ubuntu) > > > > Installed ruby-gtk2 to get pango and glib2 ruby bindings: > > > http://sourceforge.net/project/showfiles.php?group_id=53614&package_id=48093 > > > > Most recent version didn't compile on my system so I used > > ruby-gtk2-0.16.0.tar.gz > > > > After unpacking I configured like this to get the bits that I needed: > > $ ruby extconf.rb glib pango > > > > then make, make/install. > > > > Glib2.0 or higher is required and you have to make sure that GTK1 is not > > installed on the system anymore (I first had both in parallel and that > > didn't work). > > > > Maybe this helps solve your problem too. Good luck! > > > > Frank > > > > > > > > On Tue, 2008-07-01 at 15:49 +0300, George Githinji wrote: > >> Hey, > >> I recently migrated my application from windows(where it was running > okl) to > >> a linux box (because it is open source and has better support) > >> I am running Ubuntu 8.04 (hardy) with rails 1.2.1, ruby 1.8.6, bioruby > 1.2.1 > >> and biographics 1.4 > >> I have also installed libcairo per the instructions on the bio-graphics > >> library webpage. > >> however i think i am having problems with pango. > >> > >> Is there a pango alternative? Anyway that i can resolve the error below? > >> > >> => Booting Mongrel (use 'script/server webrick' to force WEBrick) > >> => Rails 2.1.0 application starting on http://0.0.0.0:3013 > >> => Call with -d to detach > >> => Ctrl-C to shutdown server > >> ** Starting Mongrel listening at 0.0.0.0:3013 > >> ** Starting Rails with development environment... > >> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > >> `gem_original_require': no such file to load -- pango > (MissingSourceFile) > >> Exiting > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > >> `require' > >> from > >> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > >> `require' > >> from > >> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in > >> `new_constants_in' > >> from > >> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > >> `require' > >> from > >> /usr/lib/ruby/gems/1.8/gems/bio-graphics-1.4/lib/bio-graphics.rb:12 > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > >> `gem_original_require' > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > >> `require' > >> from > >> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > >> `require' > >> ... 29 levels... > >> from > >> /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > >> `gem_original_require' > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > >> `require' > >> from script/server:3 > >> > > > > > > _______________________________________________ > > BioRuby mailing list > > BioRuby at lists.open-bio.org > > http://lists.open-bio.org/mailman/listinfo/bioruby > > > -- --------------- Sincerely George Research Assistant KEMRI-Wellcome Trust Program Kilifi, Kenya Skype: george_g2 Website: http://biorelated.wordpress.com/ From email2ants at gmail.com Fri Jul 4 08:13:45 2008 From: email2ants at gmail.com (Anthony Underwood) Date: Fri, 4 Jul 2008 13:13:45 +0100 Subject: [BioRuby] Remote Blast Message-ID: Hi all, is remote blast broken for bioruby? I have some code fasta_sequences.each do |seq_obj| blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt') .......... end this calls the method def remote_blast(seq_obj, program, db = 'nr-nt', options = '', server = 'genomenet') # create BLAST factory object factory = Bio::Blast.remote(program, db, '-m 8' + options, server) report = factory.query(seq_obj) end This fails to return anything - just times out If I include the -V option to limit the number of hits returned blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt', "-V 10") I get no hits , or a message "RuntimeError: cannot understand response" which I think is due to the "holding page" that occurs when a job is running Does anybody know a fix for this? Should I start to try and get a ncbi remote blast working. Is there anybody who would like to help with this? Thanks Anthony From ngoto at gen-info.osaka-u.ac.jp Fri Jul 4 10:05:41 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Fri, 4 Jul 2008 23:05:41 +0900 Subject: [BioRuby] Remote Blast In-Reply-To: References: Message-ID: <20080704140542.792AF1CBC4A3@idnmail.gen-info.osaka-u.ac.jp> Hi, On Fri, 4 Jul 2008 13:13:45 +0100 Anthony Underwood wrote: > Hi all, is remote blast broken for bioruby? No. Below script works fine with both bioruby-1.2.1 and CVS HEAD. #--------------------------------------------------- require 'bio' seq = Bio::Sequence::NA.new( "atgcagctctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacg gtcgcccagatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtc gtgctcctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggag gccctgactaccctggaagtagcaggccgcatgcttggaggtaaagtccatggttccctg gcccgtgctggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaag aagaagacaggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtg cccacctttggcaagaagaagggccccaatgccaactcttaa") p "-m 7" remote = Bio::Blast.remote('blastn', 'genes-nt', '-e 0.01') blobj = remote.query(seq) blobj.each_hit do |hit| puts "#{hit.target_def} #{hit.evalue}" end p "-m 8" remote8 = Bio::Blast.remote('blastn', 'genes-nt', '-m 8 -e 0.01') blobj = remote8.query(seq) blobj.each_hit do |hit| puts "#{hit.target_def} #{hit.evalue}" end #--------------------------------------------------- > I have some code > > fasta_sequences.each do |seq_obj| > blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt') > .......... > end > > this calls the method > > def remote_blast(seq_obj, program, db = 'nr-nt', options = '', server > = 'genomenet') > # create BLAST factory object > factory = Bio::Blast.remote(program, db, '-m 8' + options, server) > report = factory.query(seq_obj) > end > > This fails to return anything - just times out BLAST search with database 'nr-nt' usually takes very very long time. In Bio::Blast#exec_genomenet method, timeout is extended to 600 sec, but if the calculation time is longer, timeout error will happen. The timeout can be shorter than above value depend on your network, because administrators of your network can limit maximum timeout value in their router and/or proxy. > If I include the -V option to limit the number of hits returned > > blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt', "-V 10") '-V' option in blastall means: | -V Force use of the legacy BLAST engine [T/F] Optional | default = F" (taken from blatall help message) '-v' and '-b' can be used. Be careful they are case sensitive. | -v Number of database sequences to show one-line descriptions for (V) [Integer] | default = 500 | -b Number of database sequence to show alignments for (B) [Integer] | default = 250 In addition, using '-e' option to limit e-value is better, because default e-value (10.0) is generally too big. > I get no hits , or a message "RuntimeError: cannot understand > response" which I think is due to the "holding page" that occurs when > a job is running Perhaps because unrecognized option was specified. > Does anybody know a fix for this? Should I start to try and get a > ncbi remote blast working. Is there anybody who would like to help > with this? > > Thanks > > Anthony > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From email2ants at gmail.com Fri Jul 4 11:22:06 2008 From: email2ants at gmail.com (Anthony Underwood) Date: Fri, 4 Jul 2008 16:22:06 +0100 Subject: [BioRuby] Remote Blast In-Reply-To: <20080704140542.792AF1CBC4A3@idnmail.gen-info.osaka-u.ac.jp> References: <20080704140542.792AF1CBC4A3@idnmail.gen-info.osaka-u.ac.jp> Message-ID: Hello Naohisa Thanks for your full and clear response. Unfortunately I really do need to query the nr nucleotide database. I am currently working on a exec_ncbi method. Might be a chance to test the github forking and merging process! Thanks again Anthony On 4 Jul 2008, at 15:05, Naohisa GOTO wrote: > Hi, > > On Fri, 4 Jul 2008 13:13:45 +0100 > Anthony Underwood wrote: > >> Hi all, is remote blast broken for bioruby? > > No. > Below script works fine with both bioruby-1.2.1 and CVS HEAD. > #--------------------------------------------------- > require 'bio' > > seq = Bio::Sequence::NA.new( > "atgcagctctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacg > gtcgcccagatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtc > gtgctcctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggag > gccctgactaccctggaagtagcaggccgcatgcttggaggtaaagtccatggttccctg > gcccgtgctggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaag > aagaagacaggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtg > cccacctttggcaagaagaagggccccaatgccaactcttaa") > > p "-m 7" > > remote = Bio::Blast.remote('blastn', 'genes-nt', '-e 0.01') > blobj = remote.query(seq) > blobj.each_hit do |hit| > puts "#{hit.target_def} #{hit.evalue}" > end > > p "-m 8" > > remote8 = Bio::Blast.remote('blastn', 'genes-nt', '-m 8 -e 0.01') > blobj = remote8.query(seq) > blobj.each_hit do |hit| > puts "#{hit.target_def} #{hit.evalue}" > end > #--------------------------------------------------- > >> I have some code >> >> fasta_sequences.each do |seq_obj| >> blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt') >> .......... >> end >> >> this calls the method >> >> def remote_blast(seq_obj, program, db = 'nr-nt', options = '', server >> = 'genomenet') >> # create BLAST factory object >> factory = Bio::Blast.remote(program, db, '-m 8' + options, server) >> report = factory.query(seq_obj) >> end >> >> This fails to return anything - just times out > > BLAST search with database 'nr-nt' usually takes very very long time. > In Bio::Blast#exec_genomenet method, timeout is extended to 600 sec, > but if the calculation time is longer, timeout error will happen. > > The timeout can be shorter than above value depend on your network, > because administrators of your network can limit maximum timeout > value in their router and/or proxy. > >> If I include the -V option to limit the number of hits returned >> >> blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt', "-V >> 10") > > '-V' option in blastall means: > | -V Force use of the legacy BLAST engine [T/F] Optional > | default = F" > (taken from blatall help message) > > '-v' and '-b' can be used. Be careful they are case sensitive. > | -v Number of database sequences to show one-line descriptions > for (V) [Integer] > | default = 500 > | -b Number of database sequence to show alignments for (B) > [Integer] > | default = 250 > > In addition, using '-e' option to limit e-value is better, > because default e-value (10.0) is generally too big. > >> I get no hits , or a message "RuntimeError: cannot understand >> response" which I think is due to the "holding page" that occurs when >> a job is running > > Perhaps because unrecognized option was specified. > >> Does anybody know a fix for this? Should I start to try and get a >> ncbi remote blast working. Is there anybody who would like to help >> with this? >> >> Thanks >> >> Anthony >> _______________________________________________ >> BioRuby mailing list >> BioRuby at lists.open-bio.org >> http://lists.open-bio.org/mailman/listinfo/bioruby > > > Naohisa Goto > ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From georgkam at gmail.com Thu Jul 17 13:10:11 2008 From: georgkam at gmail.com (George Githinji) Date: Thu, 17 Jul 2008 20:10:11 +0300 Subject: [BioRuby] Problem running HMMER from bioruby Message-ID: <55915f820807171010j630a1a90t1d1267969b1c0160@mail.gmail.com> Hi! What could possibly be wrong with this code for running a hmm search the bioruby way? hmmfile = "/home/george/NetBeansProjects/pfvsa/public/hmms/pfVSAs.hmm" #the bioruby way seq_to_search ="/home/george/sequences/sequences.fasta" factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search) report = factory.query puts report.class I am getting this error /usr/lib/ruby/1.8/shellwords.rb:30:in `shellwords': Argument must be a string (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/hmmer.rb:70:in `initialize' from /home/george/NetBeansProjects/bio_test/lib/blasting.rb:27:in `new' from /home/george/NetBeansProjects/bio_test/lib/blasting.rb:27 closer inspection of shellwords shows this code def shellwords(line) line = String.new(line) rescue raise(ArgumentError, "Argument must be a string") line.lstrip! words = [] until line.empty? field = '' loop do if line.sub!(/\A"(([^"\\]|\\.)*)"/, '') then snippet = $1.gsub(/\\(.)/, '\1') elsif line =~ /\A"/ then raise ArgumentError, "Unmatched double quote: #{line}" elsif line.sub!(/\A'([^']*)'/, '') then snippet = $1 elsif line =~ /\A'/ then raise ArgumentError, "Unmatched single quote: #{line}" elsif line.sub!(/\A\\(.)?/, '') then snippet = $1 || '\\' elsif line.sub!(/\A([^\s\\'"]+)/, '') then snippet = $1 else line.lstrip! break end field.concat(snippet) end words.push(field) end words end -- --------------- Sincerely George Skype: george_g2 Website: http://biorelated.wordpress.com/ From ngoto at gen-info.osaka-u.ac.jp Thu Jul 17 23:15:45 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Fri, 18 Jul 2008 12:15:45 +0900 Subject: [BioRuby] Problem running HMMER from bioruby In-Reply-To: <55915f820807171010j630a1a90t1d1267969b1c0160@mail.gmail.com> References: <55915f820807171010j630a1a90t1d1267969b1c0160@mail.gmail.com> Message-ID: <20080718031546.A1BEF1CBC561@idnmail.gen-info.osaka-u.ac.jp> Hi, On Thu, 17 Jul 2008 20:10:11 +0300 "George Githinji" wrote: > Hi! > What could possibly be wrong with this code for running a hmm search the > bioruby way? > > hmmfile = "/home/george/NetBeansProjects/pfvsa/public/hmms/pfVSAs.hmm" > > #the bioruby way > seq_to_search ="/home/george/sequences/sequences.fasta" > factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search) > report = factory.query > puts report.class > > I am getting this error > > /usr/lib/ruby/1.8/shellwords.rb:30:in `shellwords': Argument must be a > string (ArgumentError) > from > /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/hmmer.rb:70:in > `initialize' This is caused by a bug in bioruby. For a workaround, set option as a string. e.g. factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search, '') To fix the bug, a patch is available. ==================================================== --- a/lib/bio/appl/hmmer.rb +++ b/lib/bio/appl/hmmer.rb @@ -64,7 +64,7 @@ class HMMER @output = '' begin - @options = opt.to_ary + @options = options.to_ary rescue NameError #NoMethodError # backward compatibility @options = Shellwords.shellwords(options) ==================================================== -- Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From pjotr2008 at thebird.nl Sun Jul 20 14:17:20 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Sun, 20 Jul 2008 20:17:20 +0200 Subject: [BioRuby] bioruby-testing-central on github In-Reply-To: <20080618134027.GA662@thebird.nl> References: <20080613013809.GA6689@thebird.nl> <20080618134027.GA662@thebird.nl> Message-ID: <20080720181720.GA17210@thebird.nl> On Wed, Jun 18, 2008 at 03:40:27PM +0200, Pjotr Prins wrote: > Sorry if it all is a bit confusing. We are waiting for Bioruby to > migrate from CVS. Bioruby has effectively moved from CVS to git - see http://github.com/bioruby/bioruby/tree/master Meanwhile, I have cloned a new bioruby-testing-central from this tree (to retain history). Available at: http://github.com/pjotrp/bioruby/tree (the old bioruby-testing-central repository has been deleted). See http://github.com/pjotrp/bioruby/wikis for a description of 'bioruby-testing-central'. Pj. From ngoto at gen-info.osaka-u.ac.jp Wed Jul 23 09:55:48 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Wed, 23 Jul 2008 22:55:48 +0900 Subject: [BioRuby] bioruby-testing-central on github In-Reply-To: <20080720181720.GA17210@thebird.nl> References: <20080613013809.GA6689@thebird.nl> <20080618134027.GA662@thebird.nl> <20080720181720.GA17210@thebird.nl> Message-ID: <20080723135549.742921CBC3D4@idnmail.gen-info.osaka-u.ac.jp> Hi, On Sun, 20 Jul 2008 20:17:20 +0200 pjotr2008 at thebird.nl (Pjotr Prins) wrote: > On Wed, Jun 18, 2008 at 03:40:27PM +0200, Pjotr Prins wrote: > > Sorry if it all is a bit confusing. We are waiting for Bioruby to > > migrate from CVS. > > Bioruby has effectively moved from CVS to git - see > > http://github.com/bioruby/bioruby/tree/master Now, all of the main developers agree migrating to the github. (If not, please tell us immediately.) An official announcement will soon be made. Please wait for a moment. Migration is in final preparation now. Thanks, Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From marc.hoeppner at molbio.su.se Tue Jul 29 02:46:55 2008 From: marc.hoeppner at molbio.su.se (Marc Hoeppner) Date: Tue, 29 Jul 2008 08:46:55 +0200 Subject: [BioRuby] Options for ClustalW wrapper Message-ID: <488EBCDF.9020902@molbio.su.se> Hi, I am sorry if there is a good tutorial for this somewhere, but I couldn't find it. The API didn't help either, so here is my question: I want to use ClustalW to create an alignment using factory = Bio::ClustalW.new How exactly can I pass options to ClustalW here? Like gap open penalty and such? Cheers, Marc From ngoto at gen-info.osaka-u.ac.jp Tue Jul 29 06:01:42 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Tue, 29 Jul 2008 19:01:42 +0900 Subject: [BioRuby] Options for ClustalW wrapper In-Reply-To: <488EBCDF.9020902@molbio.su.se> References: <488EBCDF.9020902@molbio.su.se> Message-ID: <20080729100142.C42F61CBC50D@idnmail.gen-info.osaka-u.ac.jp> Hi, On Tue, 29 Jul 2008 08:46:55 +0200 Marc Hoeppner wrote: > Hi, > > I am sorry if there is a good tutorial for this somewhere, but I > couldn't find it. The API didn't help either, so here is my question: > > I want to use ClustalW to create an alignment using > > factory = Bio::ClustalW.new > > How exactly can I pass options to ClustalW here? Like gap open penalty > and such? Command-line options passed to clustalw can be set when creating factory object, or later by using Bio::Clustalw#options method. #----------------------------------------------------------- factory = Bio::ClustalW.new('clustalw', [ '-kimura', '-endgaps' ]) gap_open = 1.0 factory.options.push "-gapopen=#{gap_open}" gap_ext = 1.0 factory.options.push "-gapext=#{gap_ext}" more_options = [ '-nopgap', '-nohgap' ] factory.options.concat more_options p factory.options seqs = [ 'atgaaaca', 'aagaaca', 'acgaaca', 'acgaaacg' ] seqs = seqs.collect{ |x| Bio::Sequence::NA.new(x) } result = factory.query(seqs) print result.raw #----------------------------------------------------------- List of command line options of clustalw can be seen by executing clustalw with '-help' option. % clustalw -help Cheers, Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From georgkam at gmail.com Tue Jul 1 12:49:02 2008 From: georgkam at gmail.com (George Githinji) Date: Tue, 1 Jul 2008 15:49:02 +0300 Subject: [BioRuby] biographics/pango problem? Message-ID: <55915f820807010549u7bcf8e05r962eb070c853ec4d@mail.gmail.com> Hey, I recently migrated my application from windows(where it was running okl) to a linux box (because it is open source and has better support) I am running Ubuntu 8.04 (hardy) with rails 1.2.1, ruby 1.8.6, bioruby 1.2.1 and biographics 1.4 I have also installed libcairo per the instructions on the bio-graphics library webpage. however i think i am having problems with pango. Is there a pango alternative? Anyway that i can resolve the error below? => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails 2.1.0 application starting on http://0.0.0.0:3013 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3013 ** Starting Rails with development environment... /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- pango (MissingSourceFile) Exiting from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' from /usr/lib/ruby/gems/1.8/gems/bio-graphics-1.4/lib/bio-graphics.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' ... 29 levels... from /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from script/server:3 -- --------------- Sincerely George Research Assistant KEMRI-Wellcome Trust Program Kilifi, Kenya Skype: george_g2 Website: http://biorelated.wordpress.com/ From f.schwach at uea.ac.uk Tue Jul 1 13:26:19 2008 From: f.schwach at uea.ac.uk (Frank Schwach) Date: Tue, 01 Jul 2008 14:26:19 +0100 Subject: [BioRuby] biographics/pango problem? In-Reply-To: <55915f820807010549u7bcf8e05r962eb070c853ec4d@mail.gmail.com> References: <55915f820807010549u7bcf8e05r962eb070c853ec4d@mail.gmail.com> Message-ID: <1214918779.13811.73.camel@fschwachbiopc.bio.uea.ac.uk> George, I also had lots of problems getting the dependencies for Bio::Graphics up and running on my Centos5 machine but now it is working. In the end I did this: Installed pango-devel (there is probably a package for Ubuntu) Installed ruby-gtk2 to get pango and glib2 ruby bindings: http://sourceforge.net/project/showfiles.php?group_id=53614&package_id=48093 Most recent version didn?t compile on my system so I used ruby-gtk2-0.16.0.tar.gz After unpacking I configured like this to get the bits that I needed: $ ruby extconf.rb glib pango then make, make/install. Glib2.0 or higher is required and you have to make sure that GTK1 is not installed on the system anymore (I first had both in parallel and that didn't work). Maybe this helps solve your problem too. Good luck! Frank On Tue, 2008-07-01 at 15:49 +0300, George Githinji wrote: > Hey, > I recently migrated my application from windows(where it was running okl) to > a linux box (because it is open source and has better support) > I am running Ubuntu 8.04 (hardy) with rails 1.2.1, ruby 1.8.6, bioruby 1.2.1 > and biographics 1.4 > I have also installed libcairo per the instructions on the bio-graphics > library webpage. > however i think i am having problems with pango. > > Is there a pango alternative? Anyway that i can resolve the error below? > > => Booting Mongrel (use 'script/server webrick' to force WEBrick) > => Rails 2.1.0 application starting on http://0.0.0.0:3013 > => Call with -d to detach > => Ctrl-C to shutdown server > ** Starting Mongrel listening at 0.0.0.0:3013 > ** Starting Rails with development environment... > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- pango (MissingSourceFile) > Exiting > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in > `new_constants_in' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/bio-graphics-1.4/lib/bio-graphics.rb:12 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > `require' > ... 29 levels... > from > /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from script/server:3 > From georgkam at gmail.com Tue Jul 1 17:42:30 2008 From: georgkam at gmail.com (George Githinji) Date: Tue, 1 Jul 2008 20:42:30 +0300 Subject: [BioRuby] biographics/pango problem? In-Reply-To: <4c7507a70807010657n3347824axb140b56796a28a50@mail.gmail.com> References: <55915f820807010549u7bcf8e05r962eb070c853ec4d@mail.gmail.com> <1214918779.13811.73.camel@fschwachbiopc.bio.uea.ac.uk> <4c7507a70807010657n3347824axb140b56796a28a50@mail.gmail.com> Message-ID: <55915f820807011042m6e7d797fmf71de4785c17f422@mail.gmail.com> Hi Jan and Frank, I did a sudo gem list --local The ruby bindings for pango or gnome were missing. So i did $ sudo gem install libpango1-ruby ERROR: could not find gem libpango1-ruby locally or in a repository $ sudo gem install libgnome2-ruby ERROR: could not find gem libgnome2-ruby locally or in a repository I then tried Frank's way but the packages could not compile. Then i decided to try install ruby-gnome2 sudo apt-get install ruby-gnome2 The following extra packages will be installed: libart2-ruby libart2-ruby1.8 libatk1-ruby libatk1-ruby1.8 libgconf2-ruby libgconf2-ruby1.8 libgdk-pixbuf2-ruby libgdk-pixbuf2-ruby1.8 libglade2-ruby libglade2-ruby1.8 libglib2-ruby1.8 libgnome2-ruby libgnome2-ruby1.8 libgnomecanvas2-ruby libgnomecanvas2-ruby1.8 libgnomeprint2-ruby libgnomeprint2-ruby1.8 libgnomeprintui2-ruby libgnomeprintui2-ruby1.8 libgnomevfs2-ruby libgnomevfs2-ruby1.8 libgtk-mozembed-ruby libgtk-mozembed-ruby1.8 libgtk2-ruby libgtk2-ruby1.8 libgtkglext1 libgtkglext1-ruby libgtkglext1-ruby1.8 libgtkhtml2-ruby libgtkhtml2-ruby1.8 libgtksourceview1-ruby libgtksourceview1-ruby1.8 libopengl-ruby libopengl-ruby1.8 libpanel-applet2-ruby libpanel-applet2-ruby1.8 libpango1-ruby libpango1-ruby1.8 librsvg2-ruby librsvg2-ruby1.8 libvte-ruby libvte-ruby1.8 The following NEW packages will be installed: libart2-ruby libart2-ruby1.8 libatk1-ruby libatk1-ruby1.8 libgconf2-ruby libgconf2-ruby1.8 libgdk-pixbuf2-ruby libgdk-pixbuf2-ruby1.8 libglade2-ruby libglade2-ruby1.8 libglib2-ruby1.8 libgnome2-ruby libgnome2-ruby1.8 libgnomecanvas2-ruby libgnomecanvas2-ruby1.8 libgnomeprint2-ruby libgnomeprint2-ruby1.8 libgnomeprintui2-ruby libgnomeprintui2-ruby1.8 libgnomevfs2-ruby libgnomevfs2-ruby1.8 libgtk-mozembed-ruby libgtk-mozembed-ruby1.8 libgtk2-ruby libgtk2-ruby1.8 libgtkglext1 libgtkglext1-ruby libgtkglext1-ruby1.8 libgtkhtml2-ruby libgtkhtml2-ruby1.8 libgtksourceview1-ruby libgtksourceview1-ruby1.8 libopengl-ruby libopengl-ruby1.8 libpanel-applet2-ruby libpanel-applet2-ruby1.8 libpango1-ruby libpango1-ruby1.8 librsvg2-ruby librsvg2-ruby1.8 libvte-ruby libvte-ruby1.8 ruby-gnome2 It may look like an overkill but it worked! Thank you so much for pointing the way. George On Tue, Jul 1, 2008 at 4:57 PM, Jan Aerts wrote: > Regarding the trouble people are having to get the requirements set > correctly (including myself: it took me ages to get it running on a > Mac at my new job): does anyone have an idea what low-level drawing > engines could be used instead of cairo? I'm pretty happy with cairo > itself, but it's just the hassle of getting it running. > > If we find a better/simpler engine, we can always create a new git > branch. I won't have much time to code on this myself, but please feel > free to fork from git and start hacking away :-) > > Note: I've done SVG, and that's a no-go. > > jan. > > On Tue, Jul 1, 2008 at 2:26 PM, Frank Schwach wrote: > > George, > > > > I also had lots of problems getting the dependencies for Bio::Graphics > > up and running on my Centos5 machine but now it is working. > > In the end I did this: > > > > Installed pango-devel (there is probably a package for Ubuntu) > > > > Installed ruby-gtk2 to get pango and glib2 ruby bindings: > > > http://sourceforge.net/project/showfiles.php?group_id=53614&package_id=48093 > > > > Most recent version didn't compile on my system so I used > > ruby-gtk2-0.16.0.tar.gz > > > > After unpacking I configured like this to get the bits that I needed: > > $ ruby extconf.rb glib pango > > > > then make, make/install. > > > > Glib2.0 or higher is required and you have to make sure that GTK1 is not > > installed on the system anymore (I first had both in parallel and that > > didn't work). > > > > Maybe this helps solve your problem too. Good luck! > > > > Frank > > > > > > > > On Tue, 2008-07-01 at 15:49 +0300, George Githinji wrote: > >> Hey, > >> I recently migrated my application from windows(where it was running > okl) to > >> a linux box (because it is open source and has better support) > >> I am running Ubuntu 8.04 (hardy) with rails 1.2.1, ruby 1.8.6, bioruby > 1.2.1 > >> and biographics 1.4 > >> I have also installed libcairo per the instructions on the bio-graphics > >> library webpage. > >> however i think i am having problems with pango. > >> > >> Is there a pango alternative? Anyway that i can resolve the error below? > >> > >> => Booting Mongrel (use 'script/server webrick' to force WEBrick) > >> => Rails 2.1.0 application starting on http://0.0.0.0:3013 > >> => Call with -d to detach > >> => Ctrl-C to shutdown server > >> ** Starting Mongrel listening at 0.0.0.0:3013 > >> ** Starting Rails with development environment... > >> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > >> `gem_original_require': no such file to load -- pango > (MissingSourceFile) > >> Exiting > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > >> `require' > >> from > >> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > >> `require' > >> from > >> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in > >> `new_constants_in' > >> from > >> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > >> `require' > >> from > >> /usr/lib/ruby/gems/1.8/gems/bio-graphics-1.4/lib/bio-graphics.rb:12 > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > >> `gem_original_require' > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > >> `require' > >> from > >> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in > >> `require' > >> ... 29 levels... > >> from > >> /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > >> `gem_original_require' > >> from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > >> `require' > >> from script/server:3 > >> > > > > > > _______________________________________________ > > BioRuby mailing list > > BioRuby at lists.open-bio.org > > http://lists.open-bio.org/mailman/listinfo/bioruby > > > -- --------------- Sincerely George Research Assistant KEMRI-Wellcome Trust Program Kilifi, Kenya Skype: george_g2 Website: http://biorelated.wordpress.com/ From email2ants at gmail.com Fri Jul 4 12:13:45 2008 From: email2ants at gmail.com (Anthony Underwood) Date: Fri, 4 Jul 2008 13:13:45 +0100 Subject: [BioRuby] Remote Blast Message-ID: Hi all, is remote blast broken for bioruby? I have some code fasta_sequences.each do |seq_obj| blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt') .......... end this calls the method def remote_blast(seq_obj, program, db = 'nr-nt', options = '', server = 'genomenet') # create BLAST factory object factory = Bio::Blast.remote(program, db, '-m 8' + options, server) report = factory.query(seq_obj) end This fails to return anything - just times out If I include the -V option to limit the number of hits returned blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt', "-V 10") I get no hits , or a message "RuntimeError: cannot understand response" which I think is due to the "holding page" that occurs when a job is running Does anybody know a fix for this? Should I start to try and get a ncbi remote blast working. Is there anybody who would like to help with this? Thanks Anthony From ngoto at gen-info.osaka-u.ac.jp Fri Jul 4 14:05:41 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Fri, 4 Jul 2008 23:05:41 +0900 Subject: [BioRuby] Remote Blast In-Reply-To: References: Message-ID: <20080704140542.792AF1CBC4A3@idnmail.gen-info.osaka-u.ac.jp> Hi, On Fri, 4 Jul 2008 13:13:45 +0100 Anthony Underwood wrote: > Hi all, is remote blast broken for bioruby? No. Below script works fine with both bioruby-1.2.1 and CVS HEAD. #--------------------------------------------------- require 'bio' seq = Bio::Sequence::NA.new( "atgcagctctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacg gtcgcccagatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtc gtgctcctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggag gccctgactaccctggaagtagcaggccgcatgcttggaggtaaagtccatggttccctg gcccgtgctggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaag aagaagacaggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtg cccacctttggcaagaagaagggccccaatgccaactcttaa") p "-m 7" remote = Bio::Blast.remote('blastn', 'genes-nt', '-e 0.01') blobj = remote.query(seq) blobj.each_hit do |hit| puts "#{hit.target_def} #{hit.evalue}" end p "-m 8" remote8 = Bio::Blast.remote('blastn', 'genes-nt', '-m 8 -e 0.01') blobj = remote8.query(seq) blobj.each_hit do |hit| puts "#{hit.target_def} #{hit.evalue}" end #--------------------------------------------------- > I have some code > > fasta_sequences.each do |seq_obj| > blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt') > .......... > end > > this calls the method > > def remote_blast(seq_obj, program, db = 'nr-nt', options = '', server > = 'genomenet') > # create BLAST factory object > factory = Bio::Blast.remote(program, db, '-m 8' + options, server) > report = factory.query(seq_obj) > end > > This fails to return anything - just times out BLAST search with database 'nr-nt' usually takes very very long time. In Bio::Blast#exec_genomenet method, timeout is extended to 600 sec, but if the calculation time is longer, timeout error will happen. The timeout can be shorter than above value depend on your network, because administrators of your network can limit maximum timeout value in their router and/or proxy. > If I include the -V option to limit the number of hits returned > > blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt', "-V 10") '-V' option in blastall means: | -V Force use of the legacy BLAST engine [T/F] Optional | default = F" (taken from blatall help message) '-v' and '-b' can be used. Be careful they are case sensitive. | -v Number of database sequences to show one-line descriptions for (V) [Integer] | default = 500 | -b Number of database sequence to show alignments for (B) [Integer] | default = 250 In addition, using '-e' option to limit e-value is better, because default e-value (10.0) is generally too big. > I get no hits , or a message "RuntimeError: cannot understand > response" which I think is due to the "holding page" that occurs when > a job is running Perhaps because unrecognized option was specified. > Does anybody know a fix for this? Should I start to try and get a > ncbi remote blast working. Is there anybody who would like to help > with this? > > Thanks > > Anthony > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From email2ants at gmail.com Fri Jul 4 15:22:06 2008 From: email2ants at gmail.com (Anthony Underwood) Date: Fri, 4 Jul 2008 16:22:06 +0100 Subject: [BioRuby] Remote Blast In-Reply-To: <20080704140542.792AF1CBC4A3@idnmail.gen-info.osaka-u.ac.jp> References: <20080704140542.792AF1CBC4A3@idnmail.gen-info.osaka-u.ac.jp> Message-ID: Hello Naohisa Thanks for your full and clear response. Unfortunately I really do need to query the nr nucleotide database. I am currently working on a exec_ncbi method. Might be a chance to test the github forking and merging process! Thanks again Anthony On 4 Jul 2008, at 15:05, Naohisa GOTO wrote: > Hi, > > On Fri, 4 Jul 2008 13:13:45 +0100 > Anthony Underwood wrote: > >> Hi all, is remote blast broken for bioruby? > > No. > Below script works fine with both bioruby-1.2.1 and CVS HEAD. > #--------------------------------------------------- > require 'bio' > > seq = Bio::Sequence::NA.new( > "atgcagctctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacg > gtcgcccagatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtc > gtgctcctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggag > gccctgactaccctggaagtagcaggccgcatgcttggaggtaaagtccatggttccctg > gcccgtgctggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaag > aagaagacaggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtg > cccacctttggcaagaagaagggccccaatgccaactcttaa") > > p "-m 7" > > remote = Bio::Blast.remote('blastn', 'genes-nt', '-e 0.01') > blobj = remote.query(seq) > blobj.each_hit do |hit| > puts "#{hit.target_def} #{hit.evalue}" > end > > p "-m 8" > > remote8 = Bio::Blast.remote('blastn', 'genes-nt', '-m 8 -e 0.01') > blobj = remote8.query(seq) > blobj.each_hit do |hit| > puts "#{hit.target_def} #{hit.evalue}" > end > #--------------------------------------------------- > >> I have some code >> >> fasta_sequences.each do |seq_obj| >> blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt') >> .......... >> end >> >> this calls the method >> >> def remote_blast(seq_obj, program, db = 'nr-nt', options = '', server >> = 'genomenet') >> # create BLAST factory object >> factory = Bio::Blast.remote(program, db, '-m 8' + options, server) >> report = factory.query(seq_obj) >> end >> >> This fails to return anything - just times out > > BLAST search with database 'nr-nt' usually takes very very long time. > In Bio::Blast#exec_genomenet method, timeout is extended to 600 sec, > but if the calculation time is longer, timeout error will happen. > > The timeout can be shorter than above value depend on your network, > because administrators of your network can limit maximum timeout > value in their router and/or proxy. > >> If I include the -V option to limit the number of hits returned >> >> blast_report = remote_blast(seq_obj.seq, 'blastn', 'nr-nt', "-V >> 10") > > '-V' option in blastall means: > | -V Force use of the legacy BLAST engine [T/F] Optional > | default = F" > (taken from blatall help message) > > '-v' and '-b' can be used. Be careful they are case sensitive. > | -v Number of database sequences to show one-line descriptions > for (V) [Integer] > | default = 500 > | -b Number of database sequence to show alignments for (B) > [Integer] > | default = 250 > > In addition, using '-e' option to limit e-value is better, > because default e-value (10.0) is generally too big. > >> I get no hits , or a message "RuntimeError: cannot understand >> response" which I think is due to the "holding page" that occurs when >> a job is running > > Perhaps because unrecognized option was specified. > >> Does anybody know a fix for this? Should I start to try and get a >> ncbi remote blast working. Is there anybody who would like to help >> with this? >> >> Thanks >> >> Anthony >> _______________________________________________ >> BioRuby mailing list >> BioRuby at lists.open-bio.org >> http://lists.open-bio.org/mailman/listinfo/bioruby > > > Naohisa Goto > ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From georgkam at gmail.com Thu Jul 17 17:10:11 2008 From: georgkam at gmail.com (George Githinji) Date: Thu, 17 Jul 2008 20:10:11 +0300 Subject: [BioRuby] Problem running HMMER from bioruby Message-ID: <55915f820807171010j630a1a90t1d1267969b1c0160@mail.gmail.com> Hi! What could possibly be wrong with this code for running a hmm search the bioruby way? hmmfile = "/home/george/NetBeansProjects/pfvsa/public/hmms/pfVSAs.hmm" #the bioruby way seq_to_search ="/home/george/sequences/sequences.fasta" factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search) report = factory.query puts report.class I am getting this error /usr/lib/ruby/1.8/shellwords.rb:30:in `shellwords': Argument must be a string (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/hmmer.rb:70:in `initialize' from /home/george/NetBeansProjects/bio_test/lib/blasting.rb:27:in `new' from /home/george/NetBeansProjects/bio_test/lib/blasting.rb:27 closer inspection of shellwords shows this code def shellwords(line) line = String.new(line) rescue raise(ArgumentError, "Argument must be a string") line.lstrip! words = [] until line.empty? field = '' loop do if line.sub!(/\A"(([^"\\]|\\.)*)"/, '') then snippet = $1.gsub(/\\(.)/, '\1') elsif line =~ /\A"/ then raise ArgumentError, "Unmatched double quote: #{line}" elsif line.sub!(/\A'([^']*)'/, '') then snippet = $1 elsif line =~ /\A'/ then raise ArgumentError, "Unmatched single quote: #{line}" elsif line.sub!(/\A\\(.)?/, '') then snippet = $1 || '\\' elsif line.sub!(/\A([^\s\\'"]+)/, '') then snippet = $1 else line.lstrip! break end field.concat(snippet) end words.push(field) end words end -- --------------- Sincerely George Skype: george_g2 Website: http://biorelated.wordpress.com/ From ngoto at gen-info.osaka-u.ac.jp Fri Jul 18 03:15:45 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Fri, 18 Jul 2008 12:15:45 +0900 Subject: [BioRuby] Problem running HMMER from bioruby In-Reply-To: <55915f820807171010j630a1a90t1d1267969b1c0160@mail.gmail.com> References: <55915f820807171010j630a1a90t1d1267969b1c0160@mail.gmail.com> Message-ID: <20080718031546.A1BEF1CBC561@idnmail.gen-info.osaka-u.ac.jp> Hi, On Thu, 17 Jul 2008 20:10:11 +0300 "George Githinji" wrote: > Hi! > What could possibly be wrong with this code for running a hmm search the > bioruby way? > > hmmfile = "/home/george/NetBeansProjects/pfvsa/public/hmms/pfVSAs.hmm" > > #the bioruby way > seq_to_search ="/home/george/sequences/sequences.fasta" > factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search) > report = factory.query > puts report.class > > I am getting this error > > /usr/lib/ruby/1.8/shellwords.rb:30:in `shellwords': Argument must be a > string (ArgumentError) > from > /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/hmmer.rb:70:in > `initialize' This is caused by a bug in bioruby. For a workaround, set option as a string. e.g. factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search, '') To fix the bug, a patch is available. ==================================================== --- a/lib/bio/appl/hmmer.rb +++ b/lib/bio/appl/hmmer.rb @@ -64,7 +64,7 @@ class HMMER @output = '' begin - @options = opt.to_ary + @options = options.to_ary rescue NameError #NoMethodError # backward compatibility @options = Shellwords.shellwords(options) ==================================================== -- Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From pjotr2008 at thebird.nl Sun Jul 20 18:17:20 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Sun, 20 Jul 2008 20:17:20 +0200 Subject: [BioRuby] bioruby-testing-central on github In-Reply-To: <20080618134027.GA662@thebird.nl> References: <20080613013809.GA6689@thebird.nl> <20080618134027.GA662@thebird.nl> Message-ID: <20080720181720.GA17210@thebird.nl> On Wed, Jun 18, 2008 at 03:40:27PM +0200, Pjotr Prins wrote: > Sorry if it all is a bit confusing. We are waiting for Bioruby to > migrate from CVS. Bioruby has effectively moved from CVS to git - see http://github.com/bioruby/bioruby/tree/master Meanwhile, I have cloned a new bioruby-testing-central from this tree (to retain history). Available at: http://github.com/pjotrp/bioruby/tree (the old bioruby-testing-central repository has been deleted). See http://github.com/pjotrp/bioruby/wikis for a description of 'bioruby-testing-central'. Pj. From ngoto at gen-info.osaka-u.ac.jp Wed Jul 23 13:55:48 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Wed, 23 Jul 2008 22:55:48 +0900 Subject: [BioRuby] bioruby-testing-central on github In-Reply-To: <20080720181720.GA17210@thebird.nl> References: <20080613013809.GA6689@thebird.nl> <20080618134027.GA662@thebird.nl> <20080720181720.GA17210@thebird.nl> Message-ID: <20080723135549.742921CBC3D4@idnmail.gen-info.osaka-u.ac.jp> Hi, On Sun, 20 Jul 2008 20:17:20 +0200 pjotr2008 at thebird.nl (Pjotr Prins) wrote: > On Wed, Jun 18, 2008 at 03:40:27PM +0200, Pjotr Prins wrote: > > Sorry if it all is a bit confusing. We are waiting for Bioruby to > > migrate from CVS. > > Bioruby has effectively moved from CVS to git - see > > http://github.com/bioruby/bioruby/tree/master Now, all of the main developers agree migrating to the github. (If not, please tell us immediately.) An official announcement will soon be made. Please wait for a moment. Migration is in final preparation now. Thanks, Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From marc.hoeppner at molbio.su.se Tue Jul 29 06:46:55 2008 From: marc.hoeppner at molbio.su.se (Marc Hoeppner) Date: Tue, 29 Jul 2008 08:46:55 +0200 Subject: [BioRuby] Options for ClustalW wrapper Message-ID: <488EBCDF.9020902@molbio.su.se> Hi, I am sorry if there is a good tutorial for this somewhere, but I couldn't find it. The API didn't help either, so here is my question: I want to use ClustalW to create an alignment using factory = Bio::ClustalW.new How exactly can I pass options to ClustalW here? Like gap open penalty and such? Cheers, Marc From ngoto at gen-info.osaka-u.ac.jp Tue Jul 29 10:01:42 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Tue, 29 Jul 2008 19:01:42 +0900 Subject: [BioRuby] Options for ClustalW wrapper In-Reply-To: <488EBCDF.9020902@molbio.su.se> References: <488EBCDF.9020902@molbio.su.se> Message-ID: <20080729100142.C42F61CBC50D@idnmail.gen-info.osaka-u.ac.jp> Hi, On Tue, 29 Jul 2008 08:46:55 +0200 Marc Hoeppner wrote: > Hi, > > I am sorry if there is a good tutorial for this somewhere, but I > couldn't find it. The API didn't help either, so here is my question: > > I want to use ClustalW to create an alignment using > > factory = Bio::ClustalW.new > > How exactly can I pass options to ClustalW here? Like gap open penalty > and such? Command-line options passed to clustalw can be set when creating factory object, or later by using Bio::Clustalw#options method. #----------------------------------------------------------- factory = Bio::ClustalW.new('clustalw', [ '-kimura', '-endgaps' ]) gap_open = 1.0 factory.options.push "-gapopen=#{gap_open}" gap_ext = 1.0 factory.options.push "-gapext=#{gap_ext}" more_options = [ '-nopgap', '-nohgap' ] factory.options.concat more_options p factory.options seqs = [ 'atgaaaca', 'aagaaca', 'acgaaca', 'acgaaacg' ] seqs = seqs.collect{ |x| Bio::Sequence::NA.new(x) } result = factory.query(seqs) print result.raw #----------------------------------------------------------- List of command line options of clustalw can be seen by executing clustalw with '-help' option. % clustalw -help Cheers, Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org