<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Honolulu Hacker &#187; bioruby</title>
	<atom:link href="http://honoluluhacker.com/tag/bioruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://honoluluhacker.com</link>
	<description>Tech, Linux, Rails by Honululu-based Kevin English</description>
	<lastBuildDate>Sat, 24 Sep 2011 22:53:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Getting started with BioRuby and Ruby on Rails.</title>
		<link>http://honoluluhacker.com/2009/03/05/getting-started-with-bioruby-and-ruby-on-rails/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=getting-started-with-bioruby-and-ruby-on-rails</link>
		<comments>http://honoluluhacker.com/2009/03/05/getting-started-with-bioruby-and-ruby-on-rails/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 04:17:59 +0000</pubDate>
		<dc:creator>kenglish</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bioruby]]></category>

		<guid isPermaLink="false">http://honoluluhacker.com/?p=528</guid>
		<description><![CDATA[Started messing with Bioruby this week. I went through George Githinji&#8217;s excellent tutorial on his biorlated blog, Bio-graphics, BioSQL and Ruby on Rails part 1 and Bio-graphics, BioSQL and Ruby on Rails part 2. This is very helpful. Before you do the stuff below, read through his tutorial so you understand what&#8217;s going on. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Started messing with Bioruby this week. I went through George Githinji&#8217;s excellent tutorial on his <a href="http://biorelated.wordpress.com/">biorlated blog</a>,  <a href="http://biorelated.wordpress.com/2009/01/07/bio-graphics-biosql-and-rails-part-1/">Bio-graphics, BioSQL and Ruby on Rails part 1</a> and  <a href="http://biorelated.wordpress.com/2009/01/08/bio-graphics-biosql-and-rails-part-2/">Bio-graphics, BioSQL and Ruby on Rails part 2.</a> This is very helpful. Before you do the stuff below, read through his tutorial so you understand what&#8217;s going on. Here&#8217;s what I had to do to get it working:</p>
<p><strong>Install the gems</strong><br />
I got started by installing the bio, bioruby gem.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> bioruby
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> bio</pre></div></div>

<p>I discovered that the bio-graphics gem needs <a href="http://cairographics.org/">cairo</a>.  Here&#8217;s how to install it on Ubuntu. This had 50-something  dependencies. I just sat back and let them install:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> cairo-clock cairo-dock-dev libcairo-ruby libcairo2</pre></div></div>

<p>I also had to install ruby support for pango:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> libpango1-ruby</pre></div></div>

<p>I installed bio-graphics and the cairo gem.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem <span style="color: #c20cb9; font-weight: bold;">install</span> bio-graphics cairo</pre></div></div>

<p>George also uses rails_sql_views so I installed this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> rails_sql_views</pre></div></div>

<p>As George warned in his blog, I had to comment out these lines in</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#CC00FF; font-weight:bold;">Kernel</span>.<span style="color:#9900CC;">respond_to</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:gem</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#CC00FF; font-weight:bold;">Kernel</span>.<span style="color:#9900CC;">send</span> <span style="color:#ff3333; font-weight:bold;">:alias_method</span>, <span style="color:#ff3333; font-weight:bold;">:gem</span>, <span style="color:#ff3333; font-weight:bold;">:require_gem</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>in rails_sql_views(0.6.1). Mine was located in /usr/lib/ruby/gems/1.8/gems/rails_sql_views-0.6.1/lib/rails_sql_views.rb. I commented out lines 28-30.</p>
<p><strong>Install the biosql_rails_example application</strong></p>
<p>To get george&#8217;s app running, I cloned the biorelate repository into my /home/kenglish/workspace directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>kenglish<span style="color: #000000; font-weight: bold;">/</span>workspace
<span style="color: #c20cb9; font-weight: bold;">git</span> clone  <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>georgeG<span style="color: #000000; font-weight: bold;">/</span>biosql_rails_example.git</pre></div></div>

<p>I edited the database.yml file and added my mysql infomration. You can create the database by hand as George explains but I put in the mysql root username and password in the database.yml file and ran:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rake db:create.</pre></div></div>

<p><strong>Install the biosql database schema</strong></p>
<p>As George explains, I had to <a href="http://www.biosql.org/wiki/Downloads">download the biosql schema</a> and untared it. I created the tables like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>kenglish<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf biosql-1.0.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> biosql-1.0.1<span style="color: #000000; font-weight: bold;">/</span>sql
mysql <span style="color: #660033;">-uroot</span> <span style="color: #660033;">-p</span> var_biosql_development <span style="color: #000000; font-weight: bold;">&lt;</span> biosqldb-mysql.sql</pre></div></div>

<p>I put these in the directory biosql-1.0.1/scripts and loaded them with the script load_ncbi_taxonomy.pl.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">perl</span> load_ncbi_taxonomy.pl <span style="color: #660033;">--dbname</span> var_biosql_development  <span style="color: #660033;">--dbuser</span> root <span style="color: #660033;">--host</span> localhost <span style="color: #660033;">--download</span></pre></div></div>

<p>I don&#8217;t have any bio-related data so I downloaded the following files from the Ncbi ftp site (<a href="ftp://ftp.ncbi.nih.gov/pub/taxonomy/">ftp://ftp.ncbi.nih.gov/pub/taxonomy/</a>): gi_taxid_nucl.dmp.gz  taxcat.tar.gz and taxdump.tar.gz. </p>
<p>Now I was able to run George&#8217;s Rails app! To be continued&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://honoluluhacker.com/2009/03/05/getting-started-with-bioruby-and-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

