]> git.donarmstrong.com Git - biopieces.git/commitdiff
replacing read_fasta with ruby version
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 17 Aug 2010 13:50:14 +0000 (13:50 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 17 Aug 2010 13:50:14 +0000 (13:50 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1063 74ccb610-7750-0410-82ae-013aeee3265d

24 files changed:
code_ruby/Maasha/lib/doc/classes/Fasta.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Fasta.src/M000031.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Fasta.src/M000032.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Fasta.src/M000033.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Fasta.src/M000034.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/FastaError.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000001.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000003.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000004.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000005.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000006.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000007.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000008.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000009.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000037.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000038.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000039.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000040.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000041.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000042.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000043.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/Seq.src/M000044.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/classes/SeqError.html [new file with mode: 0644]
code_ruby/Maasha/lib/doc/files/fasta_rb.html [new file with mode: 0644]

diff --git a/code_ruby/Maasha/lib/doc/classes/Fasta.html b/code_ruby/Maasha/lib/doc/classes/Fasta.html
new file mode 100644 (file)
index 0000000..8a9c706
--- /dev/null
@@ -0,0 +1,241 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Class: Fasta [RDoc Documentation]</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta http-equiv="Content-Script-Type" content="text/javascript" />
+  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+  <script type="text/javascript">
+  // <![CDATA[
+
+  function popupCode( url ) {
+    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+  }
+
+  function toggleCode( id ) {
+    if ( document.getElementById )
+      elem = document.getElementById( id );
+    else if ( document.all )
+      elem = eval( "document.all." + id );
+    else
+      return false;
+
+    elemStyle = elem.style;
+
+    if ( elemStyle.display != "block" ) {
+      elemStyle.display = "block"
+    } else {
+      elemStyle.display = "none"
+    }
+
+    return true;
+  }
+
+  // Make codeblocks hidden by default
+  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
+
+  // ]]>
+  </script>
+
+</head>
+<body>
+
+
+    <div id="classHeader">
+        <table class="header-table">
+        <tr class="top-aligned-row">
+          <td><strong>Class</strong></td>
+          <td class="class-name-in-header">Fasta</td>
+        </tr>
+        <tr class="top-aligned-row">
+            <td><strong>In:</strong></td>
+            <td>
+
+
+                <a href="../files/fasta_rb.html">
+
+                fasta.rb
+
+                </a>
+
+
+        <br />
+
+            </td>
+        </tr>
+
+
+        <tr class="top-aligned-row">
+            <td><strong>Parent:</strong></td>
+            <td>
+
+                Object
+
+            </td>
+        </tr>
+
+        </table>
+    </div>
+  <!-- banner header -->
+
+  <div id="bodyContent">
+
+  <div id="contextContent">
+
+   </div>
+
+
+    <div id="method-list">
+      <h3 class="section-bar">Methods</h3>
+
+      <div class="name-list">
+
+        <a href="#M000033">each</a>&nbsp;&nbsp;
+
+        <a href="#M000034">get_entry</a>&nbsp;&nbsp;
+
+        <a href="#M000032">new</a>&nbsp;&nbsp;
+
+        <a href="#M000031">open</a>&nbsp;&nbsp;
+
+      </div>
+    </div>
+
+  </div>
+
+    <!-- if includes -->
+
+    <div id="includes">
+      <h3 class="section-bar">Included Modules</h3>
+
+      <div id="includes-list">
+
+        <span class="include-name">Enumerable</span>
+
+      </div>
+    </div>
+
+    <div id="section">
+
+
+
+
+    <!-- if method_list -->
+
+    <div id="methods">
+
+      <h3 class="section-bar">Public Class methods</h3>
+
+
+      <div id="method-M000032" class="method-detail">
+        <a name="M000032"></a>
+
+        <div class="method-heading">
+
+          <a href="Fasta.src/M000032.html" target="Code" class="method-signature"
+            onclick="popupCode('Fasta.src/M000032.html');return false;">
+
+          <span class="method-name">new</span><span class="method-args">(io, type=nil)</span>
+
+          </a>
+
+        </div>
+
+        <div class="method-description">
+
+        </div>
+      </div>
+
+
+      <div id="method-M000031" class="method-detail">
+        <a name="M000031"></a>
+
+        <div class="method-heading">
+
+          <a href="Fasta.src/M000031.html" target="Code" class="method-signature"
+            onclick="popupCode('Fasta.src/M000031.html');return false;">
+
+          <span class="method-name">open</span><span class="method-args">(*args) {|fasta| ...}</span>
+
+          </a>
+
+        </div>
+
+        <div class="method-description">
+
+          <p>
+Class method allowing open to be used on files. See File.open.
+</p>
+
+        </div>
+      </div>
+
+
+      <h3 class="section-bar">Public Instance methods</h3>
+
+
+      <div id="method-M000033" class="method-detail">
+        <a name="M000033"></a>
+
+        <div class="method-heading">
+
+          <a href="Fasta.src/M000033.html" target="Code" class="method-signature"
+            onclick="popupCode('Fasta.src/M000033.html');return false;">
+
+          <span class="method-name">each</span><span class="method-args">() {|entry| ...}</span>
+
+          </a>
+
+        </div>
+
+        <div class="method-description">
+
+          <p>
+Iterator method for parsing FASTA enries.
+</p>
+
+        </div>
+      </div>
+
+
+      <div id="method-M000034" class="method-detail">
+        <a name="M000034"></a>
+
+        <div class="method-heading">
+
+          <a href="Fasta.src/M000034.html" target="Code" class="method-signature"
+            onclick="popupCode('Fasta.src/M000034.html');return false;">
+
+          <span class="method-name">get_entry</span><span class="method-args">()</span>
+
+          </a>
+
+        </div>
+
+        <div class="method-description">
+
+          <p>
+Method to get the next FASTA entry form an ios and return this as a <a
+href="Seq.html">Seq</a> object. If no entry is found or eof then nil is
+returned.
+</p>
+
+        </div>
+      </div>
+
+
+
+    </div>
+
+
+
+
+  </div>
+
+<div id="validator-badges">
+  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Fasta.src/M000031.html b/code_ruby/Maasha/lib/doc/classes/Fasta.src/M000031.html
new file mode 100644 (file)
index 0000000..c9a4be0
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>open (Fasta)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File fasta.rb, line 33</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
+    <span class="ruby-identifier">ios</span>   = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
+    <span class="ruby-identifier">fasta</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ios</span>)
+
+    <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
+      <span class="ruby-keyword kw">begin</span>
+        <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">fasta</span>
+      <span class="ruby-keyword kw">ensure</span>
+        <span class="ruby-identifier">ios</span>.<span class="ruby-identifier">close</span>
+      <span class="ruby-keyword kw">end</span>
+
+      <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+    <span class="ruby-keyword kw">else</span>
+      <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">fasta</span>
+    <span class="ruby-keyword kw">end</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Fasta.src/M000032.html b/code_ruby/Maasha/lib/doc/classes/Fasta.src/M000032.html
new file mode 100644 (file)
index 0000000..ad1c045
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>new (Fasta)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File fasta.rb, line 50</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">io</span>, <span class="ruby-identifier">type</span>=<span class="ruby-keyword kw">nil</span>)
+    <span class="ruby-ivar">@io</span>   = <span class="ruby-identifier">io</span>
+    <span class="ruby-ivar">@type</span> = <span class="ruby-identifier">type</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Fasta.src/M000033.html b/code_ruby/Maasha/lib/doc/classes/Fasta.src/M000033.html
new file mode 100644 (file)
index 0000000..40d2bc9
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>each (Fasta)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File fasta.rb, line 56</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>
+    <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">get_entry</span> <span class="ruby-keyword kw">do</span>
+      <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">entry</span>
+    <span class="ruby-keyword kw">end</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Fasta.src/M000034.html b/code_ruby/Maasha/lib/doc/classes/Fasta.src/M000034.html
new file mode 100644 (file)
index 0000000..62a8104
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>get_entry (Fasta)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File fasta.rb, line 64</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_entry</span>
+    <span class="ruby-identifier">block</span> = <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">gets</span>(<span class="ruby-identifier">$/</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'&gt;'</span>)
+    <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">nil?</span>
+
+    <span class="ruby-identifier">block</span>.<span class="ruby-identifier">chomp!</span>(<span class="ruby-identifier">$/</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'&gt;'</span>)
+
+    (<span class="ruby-identifier">seq_name</span>, <span class="ruby-identifier">seq</span>) = <span class="ruby-identifier">block</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">$/</span>, <span class="ruby-value">2</span>)
+
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">FastaError</span>, <span class="ruby-value str">&quot;Bad FASTA format&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">seq_name</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">seq</span>.<span class="ruby-identifier">nil?</span>
+
+    <span class="ruby-identifier">entry</span>          = <span class="ruby-constant">Seq</span>.<span class="ruby-identifier">new</span>
+    <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">type</span>     = <span class="ruby-ivar">@type</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@type</span>.<span class="ruby-identifier">downcase</span>
+    <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">seq</span>      = <span class="ruby-identifier">seq</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\s/</span>, <span class="ruby-value str">''</span>)
+    <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">seq_name</span> = <span class="ruby-identifier">seq_name</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/^&gt;/</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">rstrip</span>
+
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">FastaError</span>, <span class="ruby-value str">&quot;Bad FASTA format&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">seq_name</span>.<span class="ruby-identifier">empty?</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">FastaError</span>, <span class="ruby-value str">&quot;Bad FASTA format&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">empty?</span>
+
+    <span class="ruby-identifier">entry</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/FastaError.html b/code_ruby/Maasha/lib/doc/classes/FastaError.html
new file mode 100644 (file)
index 0000000..d188d55
--- /dev/null
@@ -0,0 +1,117 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Class: FastaError [RDoc Documentation]</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta http-equiv="Content-Script-Type" content="text/javascript" />
+  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+  <script type="text/javascript">
+  // <![CDATA[
+
+  function popupCode( url ) {
+    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+  }
+
+  function toggleCode( id ) {
+    if ( document.getElementById )
+      elem = document.getElementById( id );
+    else if ( document.all )
+      elem = eval( "document.all." + id );
+    else
+      return false;
+
+    elemStyle = elem.style;
+
+    if ( elemStyle.display != "block" ) {
+      elemStyle.display = "block"
+    } else {
+      elemStyle.display = "none"
+    }
+
+    return true;
+  }
+
+  // Make codeblocks hidden by default
+  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
+
+  // ]]>
+  </script>
+
+</head>
+<body>
+
+
+    <div id="classHeader">
+        <table class="header-table">
+        <tr class="top-aligned-row">
+          <td><strong>Class</strong></td>
+          <td class="class-name-in-header">FastaError</td>
+        </tr>
+        <tr class="top-aligned-row">
+            <td><strong>In:</strong></td>
+            <td>
+
+
+                <a href="../files/fasta_rb.html">
+
+                fasta.rb
+
+                </a>
+
+
+        <br />
+
+            </td>
+        </tr>
+
+
+        <tr class="top-aligned-row">
+            <td><strong>Parent:</strong></td>
+            <td>
+
+                StandardError
+
+            </td>
+        </tr>
+
+        </table>
+    </div>
+  <!-- banner header -->
+
+  <div id="bodyContent">
+
+  <div id="contextContent">
+
+    <div id="description">
+      <p>
+Error class for all exceptions to do with FASTA.
+</p>
+
+    </div>
+
+   </div>
+
+
+  </div>
+
+    <!-- if includes -->
+
+    <div id="section">
+
+
+
+
+    <!-- if method_list -->
+
+
+
+
+  </div>
+
+<div id="validator-badges">
+  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000001.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000001.html
new file mode 100644 (file)
index 0000000..9817e7f
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>length (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 11</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">length</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">length</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000003.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000003.html
new file mode 100644 (file)
index 0000000..bb35b7f
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>is_dna (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 18</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_dna</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'dna'</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000004.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000004.html
new file mode 100644 (file)
index 0000000..1ab276a
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>is_rna (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 22</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_rna</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'rna'</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000005.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000005.html
new file mode 100644 (file)
index 0000000..445bd31
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>is_protein (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 26</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_protein</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'protein'</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000006.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000006.html
new file mode 100644 (file)
index 0000000..0d2143f
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>to_rna (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 31</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rna</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-value str">&quot;Cannot transcribe 0 length sequence&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Cannot transcribe sequence type: #{self.type}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_dna</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> = <span class="ruby-value str">'rna'</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">tr!</span>(<span class="ruby-value str">'Tt'</span>,<span class="ruby-value str">'Uu'</span>)
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000007.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000007.html
new file mode 100644 (file)
index 0000000..84cddb0
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>to_dna (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 39</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_dna</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-value str">&quot;Cannot reverse-transcribe 0 length sequence&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Cannot reverse-transcribe sequence type: #{self.type}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_rna</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> = <span class="ruby-value str">'dna'</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">tr!</span>(<span class="ruby-value str">'Uu'</span>,<span class="ruby-value str">'Tt'</span>)
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000008.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000008.html
new file mode 100644 (file)
index 0000000..cde9366
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>complement (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 47</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">complement</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-value str">&quot;Cannot complement 0 length sequence&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
+
+    <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_dna</span>
+      <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">tr!</span>( <span class="ruby-value str">'AGCUTRYWSMKHDVBNagcutrywsmkhdvbn'</span>, <span class="ruby-value str">'TCGAAYRWSKMDHBVNtcgaayrwskmdhbvn'</span> )
+    <span class="ruby-keyword kw">elsif</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_rna</span>
+      <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">tr!</span>( <span class="ruby-value str">'AGCUTRYWSMKHDVBNagcutrywsmkhdvbn'</span>, <span class="ruby-value str">'UCGAAYRWSKMDHBVNucgaayrwskmdhbvn'</span> )
+    <span class="ruby-keyword kw">else</span>
+      <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Cannot complement sequence type: #{self.type}&quot;</span>
+    <span class="ruby-keyword kw">end</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000009.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000009.html
new file mode 100644 (file)
index 0000000..fc415c3
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>generate (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 60</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">length</span>,<span class="ruby-identifier">type</span>)
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Cannot generate negative sequence length: #{length}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-value">0</span>
+
+    <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">downcase</span>
+    <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;dna&quot;</span>
+      <span class="ruby-identifier">alph</span> = <span class="ruby-constant">DNA</span>
+    <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;rna&quot;</span>
+      <span class="ruby-identifier">alph</span> = <span class="ruby-constant">RNA</span>
+    <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;protein&quot;</span>
+      <span class="ruby-identifier">alph</span> = <span class="ruby-constant">PROTEIN</span>
+    <span class="ruby-keyword kw">else</span>
+      <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Unknown sequence type: #{type}&quot;</span>
+    <span class="ruby-keyword kw">end</span>
+
+    <span class="ruby-identifier">seq_new</span>   = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">length</span>) { <span class="ruby-identifier">alph</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-identifier">alph</span>.<span class="ruby-identifier">size</span>)] }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&quot;</span>)
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>  = <span class="ruby-identifier">seq_new</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> = <span class="ruby-identifier">type</span>.<span class="ruby-identifier">downcase</span>
+
+    <span class="ruby-identifier">seq_new</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000037.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000037.html
new file mode 100644 (file)
index 0000000..bb35b7f
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>is_dna (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 18</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_dna</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'dna'</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000038.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000038.html
new file mode 100644 (file)
index 0000000..1ab276a
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>is_rna (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 22</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_rna</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'rna'</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000039.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000039.html
new file mode 100644 (file)
index 0000000..445bd31
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>is_protein (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 26</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_protein</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'protein'</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000040.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000040.html
new file mode 100644 (file)
index 0000000..0d2143f
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>to_rna (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 31</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rna</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-value str">&quot;Cannot transcribe 0 length sequence&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Cannot transcribe sequence type: #{self.type}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_dna</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> = <span class="ruby-value str">'rna'</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">tr!</span>(<span class="ruby-value str">'Tt'</span>,<span class="ruby-value str">'Uu'</span>)
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000041.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000041.html
new file mode 100644 (file)
index 0000000..84cddb0
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>to_dna (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 39</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_dna</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-value str">&quot;Cannot reverse-transcribe 0 length sequence&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Cannot reverse-transcribe sequence type: #{self.type}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_rna</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> = <span class="ruby-value str">'dna'</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">tr!</span>(<span class="ruby-value str">'Uu'</span>,<span class="ruby-value str">'Tt'</span>)
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000042.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000042.html
new file mode 100644 (file)
index 0000000..85e6cb2
--- /dev/null
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>to_bp (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 47</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_bp</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-value str">&quot;Missing seq_name&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq_name</span>.<span class="ruby-identifier">nil?</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-value str">&quot;Missing seq&quot;</span>      <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">nil?</span>
+    <span class="ruby-identifier">record</span>             = {}
+    <span class="ruby-identifier">record</span>[<span class="ruby-value str">'SEQ_NAME'</span>] = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq_name</span>
+    <span class="ruby-identifier">record</span>[<span class="ruby-value str">'SEQ'</span>]      = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>
+    <span class="ruby-identifier">record</span>[<span class="ruby-value str">'SEQ_LEN'</span>]  = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span>
+    <span class="ruby-identifier">record</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000043.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000043.html
new file mode 100644 (file)
index 0000000..19a14ca
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>complement (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 58</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">complement</span>
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-value str">&quot;Cannot complement 0 length sequence&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
+
+    <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_dna</span>
+      <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">tr!</span>( <span class="ruby-value str">'AGCUTRYWSMKHDVBNagcutrywsmkhdvbn'</span>, <span class="ruby-value str">'TCGAAYRWSKMDHBVNtcgaayrwskmdhbvn'</span> )
+    <span class="ruby-keyword kw">elsif</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_rna</span>
+      <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">tr!</span>( <span class="ruby-value str">'AGCUTRYWSMKHDVBNagcutrywsmkhdvbn'</span>, <span class="ruby-value str">'UCGAAYRWSKMDHBVNucgaayrwskmdhbvn'</span> )
+    <span class="ruby-keyword kw">else</span>
+      <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Cannot complement sequence type: #{self.type}&quot;</span>
+    <span class="ruby-keyword kw">end</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/Seq.src/M000044.html b/code_ruby/Maasha/lib/doc/classes/Seq.src/M000044.html
new file mode 100644 (file)
index 0000000..7b22124
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>generate (Seq)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre><span class="ruby-comment cmt"># File seq.rb, line 71</span>
+  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">length</span>,<span class="ruby-identifier">type</span>)
+    <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Cannot generate negative sequence length: #{length}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-value">0</span>
+
+    <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">downcase</span>
+    <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;dna&quot;</span>
+      <span class="ruby-identifier">alph</span> = <span class="ruby-constant">DNA</span>
+    <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;rna&quot;</span>
+      <span class="ruby-identifier">alph</span> = <span class="ruby-constant">RNA</span>
+    <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;protein&quot;</span>
+      <span class="ruby-identifier">alph</span> = <span class="ruby-constant">PROTEIN</span>
+    <span class="ruby-keyword kw">else</span>
+      <span class="ruby-identifier">raise</span> <span class="ruby-constant">SeqError</span>, <span class="ruby-node">&quot;Unknown sequence type: #{type}&quot;</span>
+    <span class="ruby-keyword kw">end</span>
+
+    <span class="ruby-identifier">seq_new</span>   = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">length</span>) { <span class="ruby-identifier">alph</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-identifier">alph</span>.<span class="ruby-identifier">size</span>)] }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&quot;</span>)
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">seq</span>  = <span class="ruby-identifier">seq_new</span>
+    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> = <span class="ruby-identifier">type</span>.<span class="ruby-identifier">downcase</span>
+    <span class="ruby-identifier">seq_new</span>
+  <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/classes/SeqError.html b/code_ruby/Maasha/lib/doc/classes/SeqError.html
new file mode 100644 (file)
index 0000000..192b171
--- /dev/null
@@ -0,0 +1,117 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Class: SeqError [RDoc Documentation]</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta http-equiv="Content-Script-Type" content="text/javascript" />
+  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+  <script type="text/javascript">
+  // <![CDATA[
+
+  function popupCode( url ) {
+    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+  }
+
+  function toggleCode( id ) {
+    if ( document.getElementById )
+      elem = document.getElementById( id );
+    else if ( document.all )
+      elem = eval( "document.all." + id );
+    else
+      return false;
+
+    elemStyle = elem.style;
+
+    if ( elemStyle.display != "block" ) {
+      elemStyle.display = "block"
+    } else {
+      elemStyle.display = "none"
+    }
+
+    return true;
+  }
+
+  // Make codeblocks hidden by default
+  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
+
+  // ]]>
+  </script>
+
+</head>
+<body>
+
+
+    <div id="classHeader">
+        <table class="header-table">
+        <tr class="top-aligned-row">
+          <td><strong>Class</strong></td>
+          <td class="class-name-in-header">SeqError</td>
+        </tr>
+        <tr class="top-aligned-row">
+            <td><strong>In:</strong></td>
+            <td>
+
+
+                <a href="../files/seq_rb.html">
+
+                seq.rb
+
+                </a>
+
+
+        <br />
+
+            </td>
+        </tr>
+
+
+        <tr class="top-aligned-row">
+            <td><strong>Parent:</strong></td>
+            <td>
+
+                StandardError
+
+            </td>
+        </tr>
+
+        </table>
+    </div>
+  <!-- banner header -->
+
+  <div id="bodyContent">
+
+  <div id="contextContent">
+
+    <div id="description">
+      <p>
+Error class for all exceptions to do with <a href="Seq.html">Seq</a>.
+</p>
+
+    </div>
+
+   </div>
+
+
+  </div>
+
+    <!-- if includes -->
+
+    <div id="section">
+
+
+
+
+    <!-- if method_list -->
+
+
+
+
+  </div>
+
+<div id="validator-badges">
+  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
diff --git a/code_ruby/Maasha/lib/doc/files/fasta_rb.html b/code_ruby/Maasha/lib/doc/files/fasta_rb.html
new file mode 100644 (file)
index 0000000..6f2167f
--- /dev/null
@@ -0,0 +1,110 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>File: fasta.rb [RDoc Documentation]</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta http-equiv="Content-Script-Type" content="text/javascript" />
+  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+  <script type="text/javascript">
+  // <![CDATA[
+
+  function popupCode( url ) {
+    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+  }
+
+  function toggleCode( id ) {
+    if ( document.getElementById )
+      elem = document.getElementById( id );
+    else if ( document.all )
+      elem = eval( "document.all." + id );
+    else
+      return false;
+
+    elemStyle = elem.style;
+
+    if ( elemStyle.display != "block" ) {
+      elemStyle.display = "block"
+    } else {
+      elemStyle.display = "none"
+    }
+
+    return true;
+  }
+
+  // Make codeblocks hidden by default
+  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
+
+  // ]]>
+  </script>
+
+</head>
+<body>
+
+
+  <div id="fileHeader">
+    <h1>fasta.rb</h1>
+    <table class="header-table">
+    <tr class="top-aligned-row">
+      <td><strong>Path:</strong></td>
+      <td>fasta.rb
+
+      </td>
+    </tr>
+    <tr class="top-aligned-row">
+      <td><strong>Last Update:</strong></td>
+      <td>2010-08-17 15:43:01 +0200</td>
+    </tr>
+    </table>
+  </div>
+  <!-- banner header -->
+
+  <div id="bodyContent">
+
+  <div id="contextContent">
+
+    <div id="description">
+      <p>
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+</p>
+
+    </div>
+
+    <div id="requires-list">
+      <h3 class="section-bar">Required files</h3>
+
+      <div class="name-list">
+
+        <a href="seq_rb.html">seq</a>&nbsp;&nbsp;
+
+      </div>
+    </div>
+
+   </div>
+
+
+  </div>
+
+    <!-- if includes -->
+
+    <div id="section">
+
+
+
+
+    <!-- if method_list -->
+
+
+
+
+  </div>
+
+<div id="validator-badges">
+  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>