--- /dev/null
+<!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: Biopieces [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">Biopieces</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../files/biopieces_rb.html">
+
+ biopieces.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 id="description">
+ <p>
+<a href="Biopieces.html">Biopieces</a> are command line scripts and uses
+OptionParser to parse command line options according to a list of casts.
+Each cast prescribes the long and short name of the option, the type, if it
+is mandatory, the default value, and allowed and disallowed values. An
+optional list of extra casts can be supplied, and the integrity of the
+casts are checked. Following the command line parsing, the options are
+checked according to the casts. Methods are also included for handling the
+parsing and emitting of Biopiece records, which are ASCII text records
+consisting of lines with a key/value pair seperated by a colon and a white
+space ’: ’. Each record is separated by a line with three
+dashes ’—’.
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000004">each</a>
+
+ <a href="#M000003">each_record</a>
+
+ <a href="#M000006">mktmpdir</a>
+
+ <a href="#M000001">new</a>
+
+ <a href="#M000002">parse</a>
+
+ <a href="#M000005">puts</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Class methods</h3>
+
+
+ <div id="method-M000001" class="method-detail">
+ <a name="M000001"></a>
+
+ <div class="method-heading">
+
+ <a href="Biopieces.src/M000001.html" target="Code" class="method-signature"
+ onclick="popupCode('Biopieces.src/M000001.html');return false;">
+
+ <span class="method-name">new</span><span class="method-args">(test=nil, input=STDIN, output=STDOUT)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Initialize a Biopiece and write the status to file. Options are for testing
+purposes only.
+</p>
+
+ </div>
+ </div>
+
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000004" class="method-detail">
+ <a name="M000004"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">each</span><span class="method-args">()</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Alias for <a href="Biopieces.html#M000003">each_record</a>
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000003" class="method-detail">
+ <a name="M000003"></a>
+
+ <div class="method-heading">
+
+ <a href="Biopieces.src/M000003.html" target="Code" class="method-signature"
+ onclick="popupCode('Biopieces.src/M000003.html');return false;">
+
+ <span class="method-name">each_record</span><span class="method-args">() {|record unless record.empty?| ...}</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Open Biopiece input stream if not open and iterate over all Biopiece
+records in the stream.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000006" class="method-detail">
+ <a name="M000006"></a>
+
+ <div class="method-heading">
+
+ <a href="Biopieces.src/M000006.html" target="Code" class="method-signature"
+ onclick="popupCode('Biopieces.src/M000006.html');return false;">
+
+ <span class="method-name">mktmpdir</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Create a temporary directory inside the ENV[“BP_TMP“] dir.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000002" class="method-detail">
+ <a name="M000002"></a>
+
+ <div class="method-heading">
+
+ <a href="Biopieces.src/M000002.html" target="Code" class="method-signature"
+ onclick="popupCode('Biopieces.src/M000002.html');return false;">
+
+ <span class="method-name">parse</span><span class="method-args">(argv, cast_list=[], script_path=$0)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check the integrity of a list of casts, followed by parsion options from
+argv and finally checking the options according to the casts. Returns nil
+if argv is empty, otherwise an options hash.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000005" class="method-detail">
+ <a name="M000005"></a>
+
+ <div class="method-heading">
+
+ <a href="Biopieces.src/M000005.html" target="Code" class="method-signature"
+ onclick="popupCode('Biopieces.src/M000005.html');return false;">
+
+ <span class="method-name">puts</span><span class="method-args">(record)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Open Biopiece output stream if not open and puts record to the stream.
+</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>
--- /dev/null
+<!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 (Biopieces)</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 biopieces.rb, line 19</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">test</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">input</span>=<span class="ruby-constant">STDIN</span>, <span class="ruby-identifier">output</span>=<span class="ruby-constant">STDOUT</span>)
+ <span class="ruby-ivar">@test</span> = <span class="ruby-identifier">test</span>
+ <span class="ruby-ivar">@input</span> = <span class="ruby-identifier">input</span>
+ <span class="ruby-ivar">@output</span> = <span class="ruby-identifier">output</span>
+ <span class="ruby-ivar">@status</span> = <span class="ruby-constant">Status</span>.<span class="ruby-identifier">new</span>
+ <span class="ruby-ivar">@status</span>.<span class="ruby-identifier">set</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@test</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>parse (Biopieces)</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 biopieces.rb, line 30</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">argv</span>, <span class="ruby-identifier">cast_list</span>=[], <span class="ruby-identifier">script_path</span>=<span class="ruby-identifier">$0</span>)
+ <span class="ruby-identifier">casts</span> = <span class="ruby-constant">Casts</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cast_list</span>)
+ <span class="ruby-identifier">option_handler</span> = <span class="ruby-constant">OptionHandler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">argv</span>, <span class="ruby-identifier">casts</span>, <span class="ruby-identifier">script_path</span>, <span class="ruby-ivar">@test</span>)
+ <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">option_handler</span>.<span class="ruby-identifier">options_parse</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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_record (Biopieces)</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 biopieces.rb, line 38</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_record</span>
+ <span class="ruby-ivar">@in</span> = <span class="ruby-constant">Stream</span><span class="ruby-operator">::</span><span class="ruby-identifier">open</span>(<span class="ruby-ivar">@options</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-value str">"r"</span>, <span class="ruby-ivar">@input</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@in</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">IO</span>
+
+ <span class="ruby-identifier">record</span> = {}
+
+ <span class="ruby-ivar">@in</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">line</span>
+ <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^([^:]+): (.*)$/</span>
+ <span class="ruby-identifier">record</span>[<span class="ruby-identifier">$1</span>] = <span class="ruby-identifier">$2</span>
+ <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^---$/</span>
+ <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">record</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">empty?</span>
+ <span class="ruby-identifier">record</span> = {}
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">"Bad record format: #{line}"</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">record</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">empty?</span>
+
+ <span class="ruby-keyword kw">self</span> <span class="ruby-comment cmt"># conventionally</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>puts (Biopieces)</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 biopieces.rb, line 63</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">puts</span>(<span class="ruby-identifier">record</span>)
+ <span class="ruby-ivar">@out</span> = <span class="ruby-constant">Stream</span><span class="ruby-operator">::</span><span class="ruby-identifier">open</span>(<span class="ruby-ivar">@options</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-value str">"w"</span>, <span class="ruby-ivar">@output</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@out</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">IO</span>
+
+ <span class="ruby-identifier">record</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
+ <span class="ruby-ivar">@out</span>.<span class="ruby-identifier">print</span> <span class="ruby-node">"#{key}: #{value}\n"</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-ivar">@out</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">"---\n"</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>mktmpdir (Biopieces)</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 biopieces.rb, line 74</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mktmpdir</span>
+ <span class="ruby-identifier">time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span>
+ <span class="ruby-identifier">user</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"USER"</span>]
+ <span class="ruby-identifier">pid</span> = <span class="ruby-identifier">$$</span>
+ <span class="ruby-identifier">path</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BP_TMP"</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> [<span class="ruby-identifier">user</span>, <span class="ruby-identifier">time</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">pid</span>, <span class="ruby-value str">"bp_tmp"</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">"_"</span>)
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">path</span>)
+ <span class="ruby-ivar">@status</span>.<span class="ruby-identifier">set_tmpdir</span>(<span class="ruby-identifier">path</span>)
+ <span class="ruby-identifier">path</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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: CastError [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">CastError</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../files/biopieces_rb.html">
+
+ biopieces.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 option casts.
+</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>
--- /dev/null
+<!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: Casts [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">Casts</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../files/biopieces_rb.html">
+
+ biopieces.rb
+
+ </a>
+
+
+ <br />
+
+ </td>
+ </tr>
+
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+
+ Array
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Class to handle casts of command line options. Each cast prescribes the
+long and short name of the option, the type, if it is mandatory, the
+default value, and allowed and disallowed values. An optional list of extra
+casts can be supplied, and the integrity of the casts are checked.
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000007">new</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="constants-list">
+ <h3 class="section-bar">Constants</h3>
+
+ <div class="name-list">
+ <table summary="Constants">
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">TYPES</td>
+ <td>=</td>
+ <td class="context-item-value">%w[flag string list int uint float file file! files files! dir dir! genome]</td>
+
+ </tr>
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">MANDATORY</td>
+ <td>=</td>
+ <td class="context-item-value">%w[long short type mandatory default allowed disallowed]</td>
+
+ </tr>
+
+ </table>
+ </div>
+ </div>
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Class methods</h3>
+
+
+ <div id="method-M000007" class="method-detail">
+ <a name="M000007"></a>
+
+ <div class="method-heading">
+
+ <a href="Casts.src/M000007.html" target="Code" class="method-signature"
+ onclick="popupCode('Casts.src/M000007.html');return false;">
+
+ <span class="method-name">new</span><span class="method-args">(cast_list=[])</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Initialize cast object with an optional options cast list to which
+ubiquitous casts are added after which all casts are checked.
+</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>
--- /dev/null
+<!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 (Casts)</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 biopieces.rb, line 100</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">cast_list</span>=[])
+ <span class="ruby-ivar">@cast_list</span> = <span class="ruby-identifier">cast_list</span>
+ <span class="ruby-identifier">ubiquitous</span>
+ <span class="ruby-identifier">check</span>
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">push</span> <span class="ruby-operator">*</span><span class="ruby-ivar">@cast_list</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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: OptionHandler [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">OptionHandler</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../files/biopieces_rb.html">
+
+ biopieces.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 id="description">
+ <p>
+Class for parsing argv using OptionParser according to given casts. Default
+options are set, file glob expressions expanded, and options are checked
+according to the casts. Usage information is printed and exit called if
+required.
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000008">new</a>
+
+ <a href="#M000016">options_check</a>
+
+ <a href="#M000023">options_check_allowed</a>
+
+ <a href="#M000022">options_check_dir</a>
+
+ <a href="#M000024">options_check_disallowed</a>
+
+ <a href="#M000020">options_check_file</a>
+
+ <a href="#M000021">options_check_files</a>
+
+ <a href="#M000018">options_check_int</a>
+
+ <a href="#M000017">options_check_mandatory</a>
+
+ <a href="#M000019">options_check_uint</a>
+
+ <a href="#M000014">options_default</a>
+
+ <a href="#M000015">options_glob</a>
+
+ <a href="#M000009">options_parse</a>
+
+ <a href="#M000013">print_usage_and_exit</a>
+
+ <a href="#M000011">print_usage_full?</a>
+
+ <a href="#M000012">print_usage_short?</a>
+
+ <a href="#M000010">wiki_path</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="constants-list">
+ <h3 class="section-bar">Constants</h3>
+
+ <div class="name-list">
+ <table summary="Constants">
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">REGEX_LIST</td>
+ <td>=</td>
+ <td class="context-item-value">/^(list|files|files!)$/</td>
+
+ </tr>
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">REGEX_INT</td>
+ <td>=</td>
+ <td class="context-item-value">/^(int|uint)$/</td>
+
+ </tr>
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">REGEX_STRING</td>
+ <td>=</td>
+ <td class="context-item-value">/^(string|file|file!|dir|dir!|genome)$/</td>
+
+ </tr>
+
+ </table>
+ </div>
+ </div>
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Class methods</h3>
+
+
+ <div id="method-M000008" class="method-detail">
+ <a name="M000008"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000008.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000008.html');return false;">
+
+ <span class="method-name">new</span><span class="method-args">(argv, casts, script_path, test=nil)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ </div>
+ </div>
+
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000016" class="method-detail">
+ <a name="M000016"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000016.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000016.html');return false;">
+
+ <span class="method-name">options_check</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check all options according to casts.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000023" class="method-detail">
+ <a name="M000023"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000023.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000023.html');return false;">
+
+ <span class="method-name">options_check_allowed</span><span class="method-args">(cast)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check options and raise unless allowed.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000022" class="method-detail">
+ <a name="M000022"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000022.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000022.html');return false;">
+
+ <span class="method-name">options_check_dir</span><span class="method-args">(cast)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check dir! type argument and raise if directory don’t exist.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000024" class="method-detail">
+ <a name="M000024"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000024.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000024.html');return false;">
+
+ <span class="method-name">options_check_disallowed</span><span class="method-args">(cast)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check disallowed argument values and raise if disallowed.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000020" class="method-detail">
+ <a name="M000020"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000020.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000020.html');return false;">
+
+ <span class="method-name">options_check_file</span><span class="method-args">(cast)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check file! type argument and raise if file don’t exists.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000021" class="method-detail">
+ <a name="M000021"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000021.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000021.html');return false;">
+
+ <span class="method-name">options_check_files</span><span class="method-args">(cast)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check files! type argument and raise if files don’t exists.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000018" class="method-detail">
+ <a name="M000018"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000018.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000018.html');return false;">
+
+ <span class="method-name">options_check_int</span><span class="method-args">(cast)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check int type option and raise if not an integer.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000017" class="method-detail">
+ <a name="M000017"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000017.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000017.html');return false;">
+
+ <span class="method-name">options_check_mandatory</span><span class="method-args">(cast)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check if a mandatory option is set and raise if it isn’t.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000019" class="method-detail">
+ <a name="M000019"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000019.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000019.html');return false;">
+
+ <span class="method-name">options_check_uint</span><span class="method-args">(cast)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check uint type option and raise if not an unsinged integer.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000014" class="method-detail">
+ <a name="M000014"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000014.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000014.html');return false;">
+
+ <span class="method-name">options_default</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Set default options value from cast unless a value is set.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000015" class="method-detail">
+ <a name="M000015"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000015.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000015.html');return false;">
+
+ <span class="method-name">options_glob</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Expands glob expressions to a full list of paths. Examples:
+“*.fna” or “foo.fna,*.fna” or
+“foo.fna,/bar/*.fna“
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000009" class="method-detail">
+ <a name="M000009"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000009.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000009.html');return false;">
+
+ <span class="method-name">options_parse</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Parse options from argv using OptionParser and casts denoting long and
+short option names. Usage information is printed and exit called. A hash
+with options is returned.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000013" class="method-detail">
+ <a name="M000013"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000013.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000013.html');return false;">
+
+ <span class="method-name">print_usage_and_exit</span><span class="method-args">(full=nil)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Print usage info by Calling an external script ‘print_wiki’
+using a system() call and exit. An optional ‘full’ flag outputs
+the full usage info.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000011" class="method-detail">
+ <a name="M000011"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000011.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000011.html');return false;">
+
+ <span class="method-name">print_usage_full?</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check if full “usage info” should be printed.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000012" class="method-detail">
+ <a name="M000012"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000012.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000012.html');return false;">
+
+ <span class="method-name">print_usage_short?</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Check if short “usage info” should be printed.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000010" class="method-detail">
+ <a name="M000010"></a>
+
+ <div class="method-heading">
+
+ <a href="OptionHandler.src/M000010.html" target="Code" class="method-signature"
+ onclick="popupCode('OptionHandler.src/M000010.html');return false;">
+
+ <span class="method-name">wiki_path</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Given the script name determine the path of the wiki file with the usage
+info.
+</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>
--- /dev/null
+<!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 (OptionHandler)</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 biopieces.rb, line 225</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">argv</span>, <span class="ruby-identifier">casts</span>, <span class="ruby-identifier">script_path</span>, <span class="ruby-identifier">test</span>=<span class="ruby-keyword kw">nil</span>)
+ <span class="ruby-ivar">@argv</span> = <span class="ruby-identifier">argv</span>
+ <span class="ruby-ivar">@casts</span> = <span class="ruby-identifier">casts</span>
+ <span class="ruby-ivar">@script_path</span> = <span class="ruby-identifier">script_path</span>
+ <span class="ruby-ivar">@test</span> = <span class="ruby-identifier">test</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_parse (OptionHandler)</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 biopieces.rb, line 235</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_parse</span>
+ <span class="ruby-ivar">@options</span> = {}
+
+ <span class="ruby-identifier">option_parser</span> = <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">option</span><span class="ruby-operator">|</span>
+ <span class="ruby-ivar">@casts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cast</span><span class="ruby-operator">|</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'flag'</span>
+ <span class="ruby-identifier">option</span>.<span class="ruby-identifier">on</span>(<span class="ruby-node">"-#{cast[:short]}"</span>, <span class="ruby-node">"--#{cast[:long]}"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]] = <span class="ruby-identifier">o</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">=~</span> <span class="ruby-constant">REGEX_LIST</span>
+ <span class="ruby-identifier">option</span>.<span class="ruby-identifier">on</span>( <span class="ruby-node">"-#{cast[:short]}"</span>, <span class="ruby-node">"--#{cast[:long]} A"</span>, <span class="ruby-constant">Array</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]] = <span class="ruby-identifier">a</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">=~</span> <span class="ruby-constant">REGEX_INT</span>
+ <span class="ruby-identifier">option</span>.<span class="ruby-identifier">on</span>(<span class="ruby-node">"-#{cast[:short]}"</span>, <span class="ruby-node">"--#{cast[:long]} I"</span>, <span class="ruby-constant">Integer</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]] = <span class="ruby-identifier">i</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">=~</span> <span class="ruby-constant">REGEX_STRING</span>
+ <span class="ruby-identifier">option</span>.<span class="ruby-identifier">on</span>(<span class="ruby-node">"-#{cast[:short]}"</span>, <span class="ruby-node">"--#{cast[:long]} S"</span>, <span class="ruby-constant">String</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]] = <span class="ruby-identifier">s</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'float'</span>
+ <span class="ruby-identifier">option</span>.<span class="ruby-identifier">on</span>(<span class="ruby-node">"-#{cast[:short]}"</span>, <span class="ruby-node">"--#{cast[:long]} F"</span>, <span class="ruby-constant">Float</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]] = <span class="ruby-identifier">f</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Unknown option type: '#{cast[:type]}'"</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-identifier">option_parser</span>.<span class="ruby-identifier">parse!</span>(<span class="ruby-ivar">@argv</span>)
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">print_usage_full?</span>
+ <span class="ruby-identifier">print_usage_and_exit</span>(<span class="ruby-keyword kw">true</span>)
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">print_usage_short?</span>
+ <span class="ruby-identifier">print_usage_and_exit</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-identifier">options_default</span>
+ <span class="ruby-identifier">options_glob</span>
+ <span class="ruby-identifier">options_check</span>
+
+ <span class="ruby-ivar">@options</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>wiki_path (OptionHandler)</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 biopieces.rb, line 282</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wiki_path</span>
+ <span class="ruby-identifier">path</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BP_DIR"</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">"/bp_usage/"</span> <span class="ruby-operator">+</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-ivar">@script_path</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">".wiki"</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">"No such wiki file: #{path}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span> <span class="ruby-identifier">path</span>
+ <span class="ruby-identifier">path</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>print_usage_full? (OptionHandler)</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 biopieces.rb, line 289</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_usage_full?</span>
+ <span class="ruby-ivar">@options</span>[<span class="ruby-value str">"help"</span>]
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>print_usage_short? (OptionHandler)</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 biopieces.rb, line 294</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_usage_short?</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">$stdin</span>.<span class="ruby-identifier">tty?</span>
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value str">"stream_in"</span>]
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value str">"data_in"</span>]
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">wiki_path</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(list_biopieces|list_genomes|list_mysql_databases|biostat)$/</span> <span class="ruby-comment cmt"># TODO get rid of this!</span>
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>print_usage_and_exit (OptionHandler)</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 biopieces.rb, line 311</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_usage_and_exit</span>(<span class="ruby-identifier">full</span>=<span class="ruby-keyword kw">nil</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@test</span>
+ <span class="ruby-keyword kw">return</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">full</span>
+ <span class="ruby-identifier">system</span>(<span class="ruby-node">"print_wiki --data_in #{wiki_path} --help"</span>)
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-identifier">system</span>(<span class="ruby-node">"print_wiki --data_in #{wiki_path}"</span>)
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">"Failed printing wiki: #{wiki_path}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">$?</span>.<span class="ruby-identifier">success?</span>
+
+ <span class="ruby-identifier">exit</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_default (OptionHandler)</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 biopieces.rb, line 328</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_default</span>
+ <span class="ruby-ivar">@casts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cast</span><span class="ruby-operator">|</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:default</span>]
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]] = <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:default</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_glob (OptionHandler)</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 biopieces.rb, line 338</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_glob</span>
+ <span class="ruby-ivar">@casts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cast</span><span class="ruby-operator">|</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'files'</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'files!'</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-identifier">files</span> = []
+
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">include?</span> <span class="ruby-value str">"*"</span>
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">files</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">file</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span> <span class="ruby-identifier">file</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-identifier">files</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">path</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]] = <span class="ruby-identifier">files</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check (OptionHandler)</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 biopieces.rb, line 361</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check</span>
+ <span class="ruby-ivar">@casts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cast</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">options_check_mandatory</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-identifier">options_check_int</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-identifier">options_check_uint</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-identifier">options_check_file</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-identifier">options_check_files</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-identifier">options_check_dir</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-identifier">options_check_allowed</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-identifier">options_check_disallowed</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check_mandatory (OptionHandler)</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 biopieces.rb, line 375</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_mandatory</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:mandatory</span>]
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Mandatory argument: --#{cast[:long]}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check_int (OptionHandler)</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 biopieces.rb, line 382</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_int</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'int'</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Argument to --#{cast[:long]} must be an integer, not '#{@options[cast[:long]]}'"</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check_uint (OptionHandler)</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 biopieces.rb, line 391</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_uint</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'uint'</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Integer</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]] <span class="ruby-operator">>=</span> <span class="ruby-value">0</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Argument to --#{cast[:long]} must be an unsigned integer, not '#{@options[cast[:long]]}'"</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check_file (OptionHandler)</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 biopieces.rb, line 400</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_file</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'file!'</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"No such file: '#{@options[cast[:long]]}'"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]]
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check_files (OptionHandler)</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 biopieces.rb, line 407</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_files</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'files!'</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"No such file: '#{path}'"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span> <span class="ruby-identifier">path</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check_dir (OptionHandler)</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 biopieces.rb, line 416</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_dir</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'dir!'</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"No such directory: '#{@options[cast[:long]]}'"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]]
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check_allowed (OptionHandler)</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 biopieces.rb, line 423</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_allowed</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:allowed</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-identifier">allowed_hash</span> = {}
+ <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:allowed</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">allowed_hash</span>[<span class="ruby-identifier">a</span>] = <span class="ruby-value">1</span> }
+
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Argument '#{@options[cast[:long]]}' to --#{cast[:long]} not allowed"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">allowed_hash</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]]
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>options_check_disallowed (OptionHandler)</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 biopieces.rb, line 433</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_disallowed</span>(<span class="ruby-identifier">cast</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:disallowed</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
+ <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:disallowed</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Argument '#{@options[cast[:long]]}' to --#{cast[:long]} is disallowed"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]]
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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: Seq [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">Seq</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>
+
+ String
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Class containing generic sequence methods and nucleic acid and amino acid
+subclasses.
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000034">generate</a>
+
+ <a href="#M000035">generate!</a>
+
+ <a href="#M000031">guess_type</a>
+
+ <a href="#M000032">wrap</a>
+
+ <a href="#M000033">wrap!</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="class-list">
+ <h3 class="section-bar">Classes and Modules</h3>
+
+ Class <a href="Seq/AA.html" class="link">Seq::AA</a><br />
+Class <a href="Seq/NA.html" class="link">Seq::NA</a><br />
+
+ </div>
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000034" class="method-detail">
+ <a name="M000034"></a>
+
+ <div class="method-heading">
+
+ <a href="Seq.src/M000034.html" target="Code" class="method-signature"
+ onclick="popupCode('Seq.src/M000034.html');return false;">
+
+ <span class="method-name">generate</span><span class="method-args">( length )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method that generates a random sequence of a given length.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000035" class="method-detail">
+ <a name="M000035"></a>
+
+ <div class="method-heading">
+
+ <a href="Seq.src/M000035.html" target="Code" class="method-signature"
+ onclick="popupCode('Seq.src/M000035.html');return false;">
+
+ <span class="method-name">generate!</span><span class="method-args">( length )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method that replaces sequence with a randomly generated sequence of a given
+length.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000031" class="method-detail">
+ <a name="M000031"></a>
+
+ <div class="method-heading">
+
+ <a href="Seq.src/M000031.html" target="Code" class="method-signature"
+ onclick="popupCode('Seq.src/M000031.html');return false;">
+
+ <span class="method-name">guess_type</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Guess the sequence type by analyzing the first 100 residues allowing for
+ambiguity codes.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000032" class="method-detail">
+ <a name="M000032"></a>
+
+ <div class="method-heading">
+
+ <a href="Seq.src/M000032.html" target="Code" class="method-signature"
+ onclick="popupCode('Seq.src/M000032.html');return false;">
+
+ <span class="method-name">wrap</span><span class="method-args">( width = 80, delimit = "\n" )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method to wrap a sequence to a given width using a given delimiter.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000033" class="method-detail">
+ <a name="M000033"></a>
+
+ <div class="method-heading">
+
+ <a href="Seq.src/M000033.html" target="Code" class="method-signature"
+ onclick="popupCode('Seq.src/M000033.html');return false;">
+
+ <span class="method-name">wrap!</span><span class="method-args">( width = 80, delimit = "\n" )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method to wrap and replace a sequence to a given width using a given
+delimiter.
+</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>
--- /dev/null
+<!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>guess_type (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 4</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guess_type</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"No sequence."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">empty?</span>
+
+ <span class="ruby-identifier">seq_beg</span> = <span class="ruby-keyword kw">self</span>[ <span class="ruby-value">0</span>, <span class="ruby-value">100</span> ].<span class="ruby-identifier">upcase</span>
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">seq_beg</span>.<span class="ruby-identifier">count</span>( <span class="ruby-value str">"FLPQIE"</span> ) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
+ <span class="ruby-constant">Seq</span><span class="ruby-operator">::</span><span class="ruby-constant">AA</span>.<span class="ruby-identifier">new</span>( <span class="ruby-keyword kw">self</span> )
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">seq_beg</span>.<span class="ruby-identifier">count</span>( <span class="ruby-value str">"U"</span> ) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
+ <span class="ruby-constant">Seq</span><span class="ruby-operator">::</span><span class="ruby-constant">NA</span><span class="ruby-operator">::</span><span class="ruby-constant">RNA</span>.<span class="ruby-identifier">new</span>( <span class="ruby-keyword kw">self</span> )
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-constant">Seq</span><span class="ruby-operator">::</span><span class="ruby-constant">NA</span><span class="ruby-operator">::</span><span class="ruby-constant">DNA</span>.<span class="ruby-identifier">new</span>( <span class="ruby-keyword kw">self</span> )
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>wrap (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 19</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wrap</span>( <span class="ruby-identifier">width</span> = <span class="ruby-value">80</span>, <span class="ruby-identifier">delimit</span> = <span class="ruby-value str">"\n"</span> )
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Cannot wrap sequence to negative width: #{ width }."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">width</span> <span class="ruby-operator"><=</span> <span class="ruby-value">0</span>
+
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete!</span>( <span class="ruby-value str">" \t\n\r"</span> )
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gsub</span>( <span class="ruby-node">/.{#{ width }}(?!$)/</span>, <span class="ruby-node">"\\0#{ delimit }"</span> )
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>wrap! (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 27</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wrap!</span>( <span class="ruby-identifier">width</span> = <span class="ruby-value">80</span>, <span class="ruby-identifier">delimit</span> = <span class="ruby-value str">"\n"</span> )
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">replace</span>( <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">wrap</span>( <span class="ruby-identifier">width</span>, <span class="ruby-identifier">delimit</span> ) )
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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 32</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate</span>( <span class="ruby-identifier">length</span> )
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Cannot generate negative sequence length: #{ length }."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator"><=</span> <span class="ruby-value">0</span>
+
+ <span class="ruby-identifier">alph</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">residues</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">""</span> )
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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 40</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate!</span>( <span class="ruby-identifier">length</span> )
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">replace</span>( <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">generate</span>( <span class="ruby-identifier">length</span> ) )
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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: Seq::AA [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">Seq::AA</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>
+
+ <a href="../Seq.html">
+
+ Seq
+
+ </a>
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Class containing methods specific for amino acid (<a href="AA.html">AA</a>)
+sequences.
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000037">mol_weight</a>
+
+ <a href="#M000036">residues</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000037" class="method-detail">
+ <a name="M000037"></a>
+
+ <div class="method-heading">
+
+ <a href="AA.src/M000037.html" target="Code" class="method-signature"
+ onclick="popupCode('AA.src/M000037.html');return false;">
+
+ <span class="method-name">mol_weight</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Calculate the molecular weight of an amino acid seuqunce. The caluculation
+is only approximate since there is no correction for amino bond formation
+and the MW used are somewhat imprecise: <a
+href="http://www.expasy.ch/tools/pscale/Molecularweight.html">www.expasy.ch/tools/pscale/Molecularweight.html</a>
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000036" class="method-detail">
+ <a name="M000036"></a>
+
+ <div class="method-heading">
+
+ <a href="AA.src/M000036.html" target="Code" class="method-signature"
+ onclick="popupCode('AA.src/M000036.html');return false;">
+
+ <span class="method-name">residues</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method that returns an array of amino acid residues.
+</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>
--- /dev/null
+<!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>residues (Seq::AA)</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">residues</span>
+ <span class="ruby-node">%w{ F L S Y C W P H Q R I M T N K V A D E G }</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>mol_weight (Seq::AA)</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 55</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mol_weight</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"invalid residues found: #{self.delete("#{residues.join( "" )}")}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">upcase</span> <span class="ruby-operator">=~</span> <span class="ruby-node">/[^#{residues.join( "" )}]/</span>
+
+ <span class="ruby-identifier">mol_weight_aa</span> = {
+ <span class="ruby-value str">"A"</span> =<span class="ruby-operator">></span> <span class="ruby-value">89.000</span>, <span class="ruby-comment cmt"># Ala</span>
+ <span class="ruby-value str">"R"</span> =<span class="ruby-operator">></span> <span class="ruby-value">174.000</span>, <span class="ruby-comment cmt"># Arg</span>
+ <span class="ruby-value str">"N"</span> =<span class="ruby-operator">></span> <span class="ruby-value">132.000</span>, <span class="ruby-comment cmt"># Asn</span>
+ <span class="ruby-value str">"D"</span> =<span class="ruby-operator">></span> <span class="ruby-value">133.000</span>, <span class="ruby-comment cmt"># Asp</span>
+ <span class="ruby-value str">"C"</span> =<span class="ruby-operator">></span> <span class="ruby-value">121.000</span>, <span class="ruby-comment cmt"># Cys</span>
+ <span class="ruby-value str">"Q"</span> =<span class="ruby-operator">></span> <span class="ruby-value">146.000</span>, <span class="ruby-comment cmt"># Gln</span>
+ <span class="ruby-value str">"E"</span> =<span class="ruby-operator">></span> <span class="ruby-value">147.000</span>, <span class="ruby-comment cmt"># Glu</span>
+ <span class="ruby-value str">"G"</span> =<span class="ruby-operator">></span> <span class="ruby-value">75.000</span>, <span class="ruby-comment cmt"># Gly</span>
+ <span class="ruby-value str">"H"</span> =<span class="ruby-operator">></span> <span class="ruby-value">155.000</span>, <span class="ruby-comment cmt"># His</span>
+ <span class="ruby-value str">"I"</span> =<span class="ruby-operator">></span> <span class="ruby-value">131.000</span>, <span class="ruby-comment cmt"># Ile</span>
+ <span class="ruby-value str">"L"</span> =<span class="ruby-operator">></span> <span class="ruby-value">131.000</span>, <span class="ruby-comment cmt"># Leu</span>
+ <span class="ruby-value str">"K"</span> =<span class="ruby-operator">></span> <span class="ruby-value">146.000</span>, <span class="ruby-comment cmt"># Lys</span>
+ <span class="ruby-value str">"M"</span> =<span class="ruby-operator">></span> <span class="ruby-value">149.000</span>, <span class="ruby-comment cmt"># Met</span>
+ <span class="ruby-value str">"F"</span> =<span class="ruby-operator">></span> <span class="ruby-value">165.000</span>, <span class="ruby-comment cmt"># Phe</span>
+ <span class="ruby-value str">"P"</span> =<span class="ruby-operator">></span> <span class="ruby-value">115.000</span>, <span class="ruby-comment cmt"># Pro</span>
+ <span class="ruby-value str">"S"</span> =<span class="ruby-operator">></span> <span class="ruby-value">105.000</span>, <span class="ruby-comment cmt"># Ser</span>
+ <span class="ruby-value str">"T"</span> =<span class="ruby-operator">></span> <span class="ruby-value">119.000</span>, <span class="ruby-comment cmt"># Thr</span>
+ <span class="ruby-value str">"W"</span> =<span class="ruby-operator">></span> <span class="ruby-value">204.000</span>, <span class="ruby-comment cmt"># Trp</span>
+ <span class="ruby-value str">"Y"</span> =<span class="ruby-operator">></span> <span class="ruby-value">181.000</span>, <span class="ruby-comment cmt"># Tyr</span>
+ <span class="ruby-value str">"V"</span> =<span class="ruby-operator">></span> <span class="ruby-value">117.000</span>, <span class="ruby-comment cmt"># Val</span>
+ }
+
+ <span class="ruby-identifier">mw</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
+
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">upcase</span>.<span class="ruby-identifier">each_char</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mw</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">mol_weight_aa</span>[ <span class="ruby-identifier">c</span> ] }
+
+ <span class="ruby-identifier">mw</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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: Seq::NA [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">Seq::NA</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>
+
+ <a href="../Seq.html">
+
+ Seq
+
+ </a>
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Class containing methods specific for nucleic acid (<a
+href="NA.html">NA</a>) sequences.
+</p>
+
+ </div>
+
+ </div>
+
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="class-list">
+ <h3 class="section-bar">Classes and Modules</h3>
+
+ Class <a href="NA/DNA.html" class="link">Seq::NA::DNA</a><br />
+Class <a href="NA/RNA.html" class="link">Seq::NA::RNA</a><br />
+
+ </div>
+
+
+
+
+ <!-- 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>
--- /dev/null
+<!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: Seq::NA::DNA [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">Seq::NA::DNA</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>
+
+ <a href="../NA.html">
+
+ Seq::NA
+
+ </a>
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Class containing methods specific for <a href="DNA.html">DNA</a> sequences.
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000040">complement</a>
+
+ <a href="#M000038">residues</a>
+
+ <a href="#M000039">to_RNA</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000040" class="method-detail">
+ <a name="M000040"></a>
+
+ <div class="method-heading">
+
+ <a href="DNA.src/M000040.html" target="Code" class="method-signature"
+ onclick="popupCode('DNA.src/M000040.html');return false;">
+
+ <span class="method-name">complement</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method that complements <a href="DNA.html">DNA</a> sequence including
+ambiguity codes.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000038" class="method-detail">
+ <a name="M000038"></a>
+
+ <div class="method-heading">
+
+ <a href="DNA.src/M000038.html" target="Code" class="method-signature"
+ onclick="popupCode('DNA.src/M000038.html');return false;">
+
+ <span class="method-name">residues</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method that returns an array of <a href="DNA.html">DNA</a> residues.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000039" class="method-detail">
+ <a name="M000039"></a>
+
+ <div class="method-heading">
+
+ <a href="DNA.src/M000039.html" target="Code" class="method-signature"
+ onclick="popupCode('DNA.src/M000039.html');return false;">
+
+ <span class="method-name">to_RNA</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method to transcribe <a href="DNA.html">DNA</a> to <a
+href="RNA.html">RNA</a>.
+</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>
--- /dev/null
+<!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>residues (Seq::NA::DNA)</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 94</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">residues</span>
+ <span class="ruby-node">%w{ A T C G }</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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::NA::DNA)</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 99</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_RNA</span>
+ <span class="ruby-constant">Seq</span><span class="ruby-operator">::</span><span class="ruby-constant">NA</span><span class="ruby-operator">::</span><span class="ruby-constant">RNA</span>.<span class="ruby-identifier">new</span>( <span class="ruby-keyword kw">self</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>
--- /dev/null
+<!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::NA::DNA)</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 104</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">complement</span>
+ <span class="ruby-keyword kw">self</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">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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: Seq::NA::RNA [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">Seq::NA::RNA</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>
+
+ <a href="../NA.html">
+
+ Seq::NA
+
+ </a>
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Class containing methods specific for <a href="RNA.html">RNA</a> sequences.
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000043">complement</a>
+
+ <a href="#M000041">residues</a>
+
+ <a href="#M000042">to_DNA</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000043" class="method-detail">
+ <a name="M000043"></a>
+
+ <div class="method-heading">
+
+ <a href="RNA.src/M000043.html" target="Code" class="method-signature"
+ onclick="popupCode('RNA.src/M000043.html');return false;">
+
+ <span class="method-name">complement</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method that complements <a href="RNA.html">RNA</a> sequence including
+ambiguity codes.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000041" class="method-detail">
+ <a name="M000041"></a>
+
+ <div class="method-heading">
+
+ <a href="RNA.src/M000041.html" target="Code" class="method-signature"
+ onclick="popupCode('RNA.src/M000041.html');return false;">
+
+ <span class="method-name">residues</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method that returns an array of <a href="RNA.html">RNA</a> residues.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000042" class="method-detail">
+ <a name="M000042"></a>
+
+ <div class="method-heading">
+
+ <a href="RNA.src/M000042.html" target="Code" class="method-signature"
+ onclick="popupCode('RNA.src/M000042.html');return false;">
+
+ <span class="method-name">to_DNA</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Method to reverse transcribe <a href="RNA.html">RNA</a> to <a
+href="DNA.html">DNA</a>.
+</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>
--- /dev/null
+<!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>residues (Seq::NA::RNA)</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 112</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">residues</span>
+ <span class="ruby-node">%w{ A U C G }</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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::NA::RNA)</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 117</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_DNA</span>
+ <span class="ruby-constant">Seq</span><span class="ruby-operator">::</span><span class="ruby-constant">NA</span><span class="ruby-operator">::</span><span class="ruby-constant">DNA</span>.<span class="ruby-identifier">new</span>( <span class="ruby-keyword kw">self</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>
--- /dev/null
+<!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::NA::RNA)</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 122</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">complement</span>
+ <span class="ruby-keyword kw">self</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">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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: Status [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">Status</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../files/biopieces_rb.html">
+
+ biopieces.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 id="description">
+ <p>
+Class for manipulating the execution status of <a
+href="Biopieces.html">Biopieces</a> by setting a status file with a time
+stamp, process id, and command arguments. The status file is used for
+creating log entries and for displaying the runtime status of <a
+href="Biopieces.html">Biopieces</a>.
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000029">delete</a>
+
+ <a href="#M000027">get_tmpdir</a>
+
+ <a href="#M000028">log</a>
+
+ <a href="#M000025">set</a>
+
+ <a href="#M000026">set_tmpdir</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000029" class="method-detail">
+ <a name="M000029"></a>
+
+ <div class="method-heading">
+
+ <a href="Status.src/M000029.html" target="Code" class="method-signature"
+ onclick="popupCode('Status.src/M000029.html');return false;">
+
+ <span class="method-name">delete</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Delete status file.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000027" class="method-detail">
+ <a name="M000027"></a>
+
+ <div class="method-heading">
+
+ <a href="Status.src/M000027.html" target="Code" class="method-signature"
+ onclick="popupCode('Status.src/M000027.html');return false;">
+
+ <span class="method-name">get_tmpdir</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Extract the temporary directory path from the status file, and return this
+or nil if not found.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000028" class="method-detail">
+ <a name="M000028"></a>
+
+ <div class="method-heading">
+
+ <a href="Status.src/M000028.html" target="Code" class="method-signature"
+ onclick="popupCode('Status.src/M000028.html');return false;">
+
+ <span class="method-name">log</span><span class="method-args">(exit_status)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Write the Biopiece status to the log file.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000025" class="method-detail">
+ <a name="M000025"></a>
+
+ <div class="method-heading">
+
+ <a href="Status.src/M000025.html" target="Code" class="method-signature"
+ onclick="popupCode('Status.src/M000025.html');return false;">
+
+ <span class="method-name">set</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Write the status to a status file.
+</p>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000026" class="method-detail">
+ <a name="M000026"></a>
+
+ <div class="method-heading">
+
+ <a href="Status.src/M000026.html" target="Code" class="method-signature"
+ onclick="popupCode('Status.src/M000026.html');return false;">
+
+ <span class="method-name">set_tmpdir</span><span class="method-args">(tmp_path)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Append the a temporary directory path to the status file.
+</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>
--- /dev/null
+<!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>set (Status)</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 biopieces.rb, line 448</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>
+ <span class="ruby-identifier">time0</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%Y-%m-%d %X"</span>)
+
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-value str">"w"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">puts</span> [<span class="ruby-identifier">time0</span>, <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">" "</span>)].<span class="ruby-identifier">join</span>(<span class="ruby-value str">";"</span>) }
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>set_tmpdir (Status)</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 biopieces.rb, line 455</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_tmpdir</span>(<span class="ruby-identifier">tmp_path</span>)
+ <span class="ruby-identifier">status</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-value str">"r"</span>).<span class="ruby-identifier">read</span>.<span class="ruby-identifier">chomp</span>
+
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-value str">"w"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">fh</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">fh</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">status</span>, <span class="ruby-identifier">tmp_path</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">";"</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">"\n"</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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_tmpdir (Status)</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 biopieces.rb, line 465</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_tmpdir</span>
+ <span class="ruby-identifier">tmp_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-value str">"r"</span>).<span class="ruby-identifier">read</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">";"</span>).<span class="ruby-identifier">last</span>
+
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">tmp_path</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">tmp_path</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>log (Status)</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 biopieces.rb, line 472</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">exit_status</span>)
+ <span class="ruby-identifier">time1</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%Y-%m-%d %X"</span>)
+ <span class="ruby-identifier">user</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"USER"</span>]
+ <span class="ruby-identifier">script</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">$0</span>)
+
+ <span class="ruby-identifier">stream</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>)
+ <span class="ruby-identifier">time0</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">tmp_dir</span> = <span class="ruby-identifier">stream</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">";"</span>)
+ <span class="ruby-identifier">stream</span>.<span class="ruby-identifier">close</span>
+
+ <span class="ruby-identifier">elap</span> = <span class="ruby-identifier">time_diff</span>(<span class="ruby-identifier">time0</span>, <span class="ruby-identifier">time1</span>)
+ <span class="ruby-identifier">command</span> = [<span class="ruby-identifier">script</span>, <span class="ruby-identifier">args</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">" "</span>)
+ <span class="ruby-identifier">log_file</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BP_LOG"</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">"/biopieces.log"</span>
+
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">log_file</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-value str">"a"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">puts</span> [<span class="ruby-identifier">time0</span>, <span class="ruby-identifier">time1</span>, <span class="ruby-identifier">elap</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">exit_status</span>, <span class="ruby-identifier">command</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\t"</span>) }
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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>delete (Status)</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 biopieces.rb, line 489</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+<!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: Stream [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">Stream</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../files/biopieces_rb.html">
+
+ biopieces.rb
+
+ </a>
+
+
+ <br />
+
+ </td>
+ </tr>
+
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+
+ IO
+
+ </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="#M000030">open</a>
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Class methods</h3>
+
+
+ <div id="method-M000030" class="method-detail">
+ <a name="M000030"></a>
+
+ <div class="method-heading">
+
+ <a href="Stream.src/M000030.html" target="Code" class="method-signature"
+ onclick="popupCode('Stream.src/M000030.html');return false;">
+
+ <span class="method-name">open</span><span class="method-args">(options, mode, stdio)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Open <a href="Biopieces.html">Biopieces</a> output data stream for reading
+from stdin or a file specified in options[“stream_in“] OR
+writing to stdout or a file specified in options[“stream_out“].
+</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>
--- /dev/null
+<!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 (Stream)</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 biopieces.rb, line 514</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">mode</span>, <span class="ruby-identifier">stdio</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mode</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"r"</span>
+ <span class="ruby-identifier">$stdin</span>.<span class="ruby-identifier">tty?</span> <span class="ruby-value">? </span><span class="ruby-identifier">read</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">"stream_in"</span>]) <span class="ruby-operator">:</span> <span class="ruby-identifier">stdio</span>
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">mode</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"w"</span>
+ <span class="ruby-identifier">options</span>[<span class="ruby-value str">"stream_out"</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">"stream_out"</span>], <span class="ruby-identifier">options</span>[<span class="ruby-value str">"compress"</span>]) <span class="ruby-operator">:</span> <span class="ruby-identifier">stdio</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">"Bad mode #{mode}"</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
--- /dev/null
+Fri, 06 Aug 2010 15:47:42 +0200
--- /dev/null
+<!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: biopieces.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>biopieces.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>biopieces.rb
+
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>2010-08-06 13:58:09 +0200</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="requires-list">
+ <h3 class="section-bar">Required files</h3>
+
+ <div class="name-list">
+
+ fileutils
+
+ date
+
+ optparse
+
+ open3
+
+ pp
+
+ </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>
--- /dev/null
+<!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: seq.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>seq.rb</h1>
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Path:</strong></td>
+ <td>seq.rb
+
+ </td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>Last Update:</strong></td>
+ <td>2009-08-10 09:00:55 +0200</td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Class containing generic sequence methods and nucleic acid and amino acid
+subclasses.
+</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>
--- /dev/null
+<!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">
+<!--
+
+ Classes [RDoc Documentation]
+
+ -->
+<head>
+ <title>Classes [RDoc Documentation]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div class="index">
+ <h1 class="section-bar">Classes</h1>
+ <div id="index-entries">
+
+ <a href="classes/Biopieces.html">Biopieces</a><br />
+
+ <a href="classes/CastError.html">CastError</a><br />
+
+ <a href="classes/Casts.html">Casts</a><br />
+
+ <a href="classes/OptionHandler.html">OptionHandler</a><br />
+
+ <a href="classes/Seq.html">Seq</a><br />
+
+ <a href="classes/Seq/AA.html">Seq::AA</a><br />
+
+ <a href="classes/Seq/NA.html">Seq::NA</a><br />
+
+ <a href="classes/Seq/NA/DNA.html">Seq::NA::DNA</a><br />
+
+ <a href="classes/Seq/NA/RNA.html">Seq::NA::RNA</a><br />
+
+ <a href="classes/Status.html">Status</a><br />
+
+ <a href="classes/Stream.html">Stream</a><br />
+
+ </div>
+</div>
+</body>
+</html>
--- /dev/null
+<!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">
+<!--
+
+ Files [RDoc Documentation]
+
+ -->
+<head>
+ <title>Files [RDoc Documentation]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div class="index">
+ <h1 class="section-bar">Files</h1>
+ <div id="index-entries">
+
+ <a href="files/biopieces_rb.html">biopieces.rb</a><br />
+
+ <a href="files/seq_rb.html">seq.rb</a><br />
+
+ </div>
+</div>
+</body>
+</html>
--- /dev/null
+<!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">
+<!--
+
+ Methods [RDoc Documentation]
+
+ -->
+<head>
+ <title>Methods [RDoc Documentation]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+ <base target="docwin" />
+</head>
+<body>
+<div class="index">
+ <h1 class="section-bar">Methods</h1>
+ <div id="index-entries">
+
+ <a href="classes/Seq/NA/RNA.html#M000043">complement (Seq::NA::RNA)</a><br />
+
+ <a href="classes/Seq/NA/DNA.html#M000040">complement (Seq::NA::DNA)</a><br />
+
+ <a href="classes/Status.html#M000029">delete (Status)</a><br />
+
+ <a href="classes/Biopieces.html#M000004">each (Biopieces)</a><br />
+
+ <a href="classes/Biopieces.html#M000003">each_record (Biopieces)</a><br />
+
+ <a href="classes/Seq.html#M000034">generate (Seq)</a><br />
+
+ <a href="classes/Seq.html#M000035">generate! (Seq)</a><br />
+
+ <a href="classes/Status.html#M000027">get_tmpdir (Status)</a><br />
+
+ <a href="classes/Seq.html#M000031">guess_type (Seq)</a><br />
+
+ <a href="classes/Status.html#M000028">log (Status)</a><br />
+
+ <a href="classes/Biopieces.html#M000006">mktmpdir (Biopieces)</a><br />
+
+ <a href="classes/Seq/AA.html#M000037">mol_weight (Seq::AA)</a><br />
+
+ <a href="classes/Casts.html#M000007">new (Casts)</a><br />
+
+ <a href="classes/OptionHandler.html#M000008">new (OptionHandler)</a><br />
+
+ <a href="classes/Biopieces.html#M000001">new (Biopieces)</a><br />
+
+ <a href="classes/Stream.html#M000030">open (Stream)</a><br />
+
+ <a href="classes/OptionHandler.html#M000016">options_check (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000023">options_check_allowed (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000022">options_check_dir (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000024">options_check_disallowed (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000020">options_check_file (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000021">options_check_files (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000018">options_check_int (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000017">options_check_mandatory (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000019">options_check_uint (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000014">options_default (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000015">options_glob (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000009">options_parse (OptionHandler)</a><br />
+
+ <a href="classes/Biopieces.html#M000002">parse (Biopieces)</a><br />
+
+ <a href="classes/OptionHandler.html#M000013">print_usage_and_exit (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000011">print_usage_full? (OptionHandler)</a><br />
+
+ <a href="classes/OptionHandler.html#M000012">print_usage_short? (OptionHandler)</a><br />
+
+ <a href="classes/Biopieces.html#M000005">puts (Biopieces)</a><br />
+
+ <a href="classes/Seq/NA/RNA.html#M000041">residues (Seq::NA::RNA)</a><br />
+
+ <a href="classes/Seq/NA/DNA.html#M000038">residues (Seq::NA::DNA)</a><br />
+
+ <a href="classes/Seq/AA.html#M000036">residues (Seq::AA)</a><br />
+
+ <a href="classes/Status.html#M000025">set (Status)</a><br />
+
+ <a href="classes/Status.html#M000026">set_tmpdir (Status)</a><br />
+
+ <a href="classes/Seq/NA/RNA.html#M000042">to_DNA (Seq::NA::RNA)</a><br />
+
+ <a href="classes/Seq/NA/DNA.html#M000039">to_RNA (Seq::NA::DNA)</a><br />
+
+ <a href="classes/OptionHandler.html#M000010">wiki_path (OptionHandler)</a><br />
+
+ <a href="classes/Seq.html#M000032">wrap (Seq)</a><br />
+
+ <a href="classes/Seq.html#M000033">wrap! (Seq)</a><br />
+
+ </div>
+</div>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!--
+
+ RDoc Documentation
+
+ -->
+<head>
+ <title>RDoc Documentation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<frameset rows="20%, 80%">
+ <frameset cols="25%,35%,45%">
+ <frame src="fr_file_index.html" title="Files" name="Files" />
+ <frame src="fr_class_index.html" name="Classes" />
+ <frame src="fr_method_index.html" name="Methods" />
+ </frameset>
+ <frame src="files/biopieces_rb.html" name="docwin" />
+</frameset>
+</html>
--- /dev/null
+body {
+ font-family: Verdana,Arial,Helvetica,sans-serif;
+ font-size: 90%;
+ margin: 0;
+ margin-left: 40px;
+ padding: 0;
+ background: white;
+ color: black;
+}
+
+h1, h2, h3, h4 {
+ margin: 0;
+ background: transparent;
+}
+
+h1 {
+ font-size: 150%;
+}
+
+h2,h3,h4 {
+ margin-top: 1em;
+}
+
+:link, :visited {
+ background: #eef;
+ color: #039;
+ text-decoration: none;
+}
+
+:link:hover, :visited:hover {
+ background: #039;
+ color: #eef;
+}
+
+/* Override the base stylesheet's Anchor inside a table cell */
+td > :link, td > :visited {
+ background: transparent;
+ color: #039;
+ text-decoration: none;
+}
+
+/* and inside a section title */
+.section-title > :link, .section-title > :visited {
+ background: transparent;
+ color: #eee;
+ text-decoration: none;
+}
+
+/* === Structural elements =================================== */
+
+.index {
+ margin: 0;
+ margin-left: -40px;
+ padding: 0;
+ font-size: 90%;
+}
+
+.index :link, .index :visited {
+ margin-left: 0.7em;
+}
+
+.index .section-bar {
+ margin-left: 0px;
+ padding-left: 0.7em;
+ background: #ccc;
+ font-size: small;
+}
+
+#classHeader, #fileHeader {
+ width: auto;
+ color: white;
+ padding: 0.5em 1.5em 0.5em 1.5em;
+ margin: 0;
+ margin-left: -40px;
+ border-bottom: 3px solid #006;
+}
+
+#classHeader :link, #fileHeader :link,
+#classHeader :visited, #fileHeader :visited {
+ background: inherit;
+ color: white;
+}
+
+#classHeader td, #fileHeader td {
+ background: inherit;
+ color: white;
+}
+
+#fileHeader {
+ background: #057;
+}
+
+#classHeader {
+ background: #048;
+}
+
+.class-name-in-header {
+ font-size: 180%;
+ font-weight: bold;
+}
+
+#bodyContent {
+ padding: 0 1.5em 0 1.5em;
+}
+
+#description {
+ padding: 0.5em 1.5em;
+ background: #efefef;
+ border: 1px dotted #999;
+}
+
+#description h1, #description h2, #description h3,
+#description h4, #description h5, #description h6 {
+ color: #125;
+ background: transparent;
+}
+
+#validator-badges {
+ text-align: center;
+}
+
+#validator-badges img {
+ border: 0;
+}
+
+#copyright {
+ color: #333;
+ background: #efefef;
+ font: 0.75em sans-serif;
+ margin-top: 5em;
+ margin-bottom: 0;
+ padding: 0.5em 2em;
+}
+
+/* === Classes =================================== */
+
+table.header-table {
+ color: white;
+ font-size: small;
+}
+
+.type-note {
+ font-size: small;
+ color: #dedede;
+}
+
+.section-bar {
+ color: #333;
+ border-bottom: 1px solid #999;
+ margin-left: -20px;
+}
+
+.section-title {
+ background: #79a;
+ color: #eee;
+ padding: 3px;
+ margin-top: 2em;
+ margin-left: -30px;
+ border: 1px solid #999;
+}
+
+.top-aligned-row {
+ vertical-align: top
+}
+
+.bottom-aligned-row {
+ vertical-align: bottom
+}
+
+#diagram img {
+ border: 0;
+}
+
+/* --- Context section classes ----------------------- */
+
+.context-row { }
+
+.context-item-name {
+ font-family: monospace;
+ font-weight: bold;
+ color: black;
+}
+
+.context-item-value {
+ font-size: small;
+ color: #448;
+}
+
+.context-item-desc {
+ color: #333;
+ padding-left: 2em;
+}
+
+/* --- Method classes -------------------------- */
+
+.method-detail {
+ background: #efefef;
+ padding: 0;
+ margin-top: 0.5em;
+ margin-bottom: 1em;
+ border: 1px dotted #ccc;
+}
+
+.method-heading {
+ color: black;
+ background: #ccc;
+ border-bottom: 1px solid #666;
+ padding: 0.2em 0.5em 0 0.5em;
+}
+
+.method-signature {
+ color: black;
+ background: inherit;
+}
+
+.method-name {
+ font-weight: bold;
+}
+
+.method-args {
+ font-style: italic;
+}
+
+.method-description {
+ padding: 0 0.5em 0 0.5em;
+}
+
+/* --- Source code sections -------------------- */
+
+:link.source-toggle, :visited.source-toggle {
+ font-size: 90%;
+}
+
+div.method-source-code {
+ background: #262626;
+ color: #ffdead;
+ margin: 1em;
+ padding: 0.5em;
+ border: 1px dashed #999;
+ overflow: auto;
+}
+
+div.method-source-code pre {
+ color: #ffdead;
+}
+
+/* --- Ruby keyword styles --------------------- */
+
+.standalone-code {
+ background: #221111;
+ color: #ffdead;
+ overflow: auto;
+}
+
+.ruby-constant {
+ color: #7fffd4;
+ background: transparent;
+}
+
+.ruby-keyword {
+ color: #00ffff;
+ background: transparent;
+}
+
+.ruby-ivar {
+ color: #eedd82;
+ background: transparent;
+}
+
+.ruby-operator {
+ color: #00ffee;
+ background: transparent;
+}
+
+.ruby-identifier {
+ color: #ffdead;
+ background: transparent;
+}
+
+.ruby-node {
+ color: #ffa07a;
+ background: transparent;
+}
+
+.ruby-comment {
+ color: #b22222;
+ font-weight: bold;
+ background: transparent;
+}
+
+.ruby-regexp {
+ color: #ffa07a;
+ background: transparent;
+}
+
+.ruby-value {
+ color: #7fffd4;
+ background: transparent;
+}