<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Bio.Restriction.RanaConfig</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <th class="navbar" width="100%"></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> <a href="Bio-module.html">Package Bio</a> :: <a href="Bio.Restriction-module.html">Package Restriction</a> :: Module RanaConfig </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" onclick="toggle_private();">hide private</a>]</span></td></tr> <tr><td align="right"><span class="options" >[<a href="frames.html" target="_top">frames</a >] | <a href="Bio.Restriction.RanaConfig-pysrc.html" target="_top">no frames</a>]</span></td></tr> </table> </td> </tr> </table> <h1 class="epydoc">Source Code for <a href="Bio.Restriction.RanaConfig-module.html">Module Bio.Restriction.RanaConfig</a></h1> <pre class="py-src"> <a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt> <a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Restriction Analysis Libraries.</tt> </tt> <a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Copyright (C) 2004. Frederic Sohm.</tt> </tt> <a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This code is part of the Biopython distribution and governed by its</tt> </tt> <a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># license. Please see the LICENSE file that should have been included</tt> </tt> <a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># as part of this package.</tt> </tt> <a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt> <a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt> <a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"> </tt> <a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-comment">###############################################################################</tt> </tt> <a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Configuration of the console.</tt> </tt> <a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Mainly used by PrintFormat.PrintFormat</tt> </tt> <a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># ConsoleWidth : width of the console used default to 80.</tt> </tt> <a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># should never be less than 60.</tt> </tt> <a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># NameWidth : space attributed to the name in PrintList method.</tt> </tt> <a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Indent : Indent of the second line.</tt> </tt> <a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># MaxSize : Maximal size of the sequence (default=6 :</tt> </tt> <a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -> 99 999 bp + 1 trailing ','</tt> </tt> <a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># people are unlikely to ask for restriction map of sequences</tt> </tt> <a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># bigger than 100.000 bp. This is needed to determine the</tt> </tt> <a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># space to be reserved for sites location.</tt> </tt> <a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># </tt> </tt> <a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># MaxSize = 5 => 9.999 bp</tt> </tt> <a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># MaxSize = 6 => 99.999 bp</tt> </tt> <a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># MaxSize = 7 => 999.999 bp</tt> </tt> <a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># example :</tt> </tt> <a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># </tt> </tt> <a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># <------------ ConsoleWidth ---------------></tt> </tt> <a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># <- NameWidth -></tt> </tt> <a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># EcoRI : 1, 45, 50, 300, 400, 650,</tt> </tt> <a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># 700, 1200, 2500.</tt> </tt> <a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># <--></tt> </tt> <a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Indent</tt> </tt> <a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"><tt class="py-comment"></tt><tt id="link-0" class="py-name" targets="Variable Bio.Restriction.PrintFormat.PrintFormat.ConsoleWidth=Bio.Restriction.PrintFormat.PrintFormat-class.html#ConsoleWidth,Variable Bio.Restriction.RanaConfig.ConsoleWidth=Bio.Restriction.RanaConfig-module.html#ConsoleWidth"><a title="Bio.Restriction.PrintFormat.PrintFormat.ConsoleWidth Bio.Restriction.RanaConfig.ConsoleWidth" class="py-name" href="#" onclick="return doclink('link-0', 'ConsoleWidth', 'link-0');">ConsoleWidth</a></tt> <tt class="py-op">=</tt> <tt class="py-number">80</tt> </tt> <a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable Bio.Restriction.PrintFormat.PrintFormat.NameWidth=Bio.Restriction.PrintFormat.PrintFormat-class.html#NameWidth,Variable Bio.Restriction.RanaConfig.NameWidth=Bio.Restriction.RanaConfig-module.html#NameWidth"><a title="Bio.Restriction.PrintFormat.PrintFormat.NameWidth Bio.Restriction.RanaConfig.NameWidth" class="py-name" href="#" onclick="return doclink('link-1', 'NameWidth', 'link-1');">NameWidth</a></tt> <tt class="py-op">=</tt> <tt class="py-number">10</tt> </tt> <a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable Bio.Restriction.PrintFormat.PrintFormat.Indent=Bio.Restriction.PrintFormat.PrintFormat-class.html#Indent,Variable Bio.Restriction.RanaConfig.Indent=Bio.Restriction.RanaConfig-module.html#Indent"><a title="Bio.Restriction.PrintFormat.PrintFormat.Indent Bio.Restriction.RanaConfig.Indent" class="py-name" href="#" onclick="return doclink('link-2', 'Indent', 'link-2');">Indent</a></tt> <tt class="py-op">=</tt> <tt class="py-number">4</tt> </tt> <a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable Bio.Restriction.PrintFormat.PrintFormat.MaxSize=Bio.Restriction.PrintFormat.PrintFormat-class.html#MaxSize,Variable Bio.Restriction.RanaConfig.MaxSize=Bio.Restriction.RanaConfig-module.html#MaxSize"><a title="Bio.Restriction.PrintFormat.PrintFormat.MaxSize Bio.Restriction.RanaConfig.MaxSize" class="py-name" href="#" onclick="return doclink('link-3', 'MaxSize', 'link-3');">MaxSize</a></tt> <tt class="py-op">=</tt> <tt class="py-number">6</tt> </tt> <a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"><tt class="py-comment">###############################################################################</tt> </tt> <a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Proxies</tt> </tt> <a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Enter here the address of your proxy if any.</tt> </tt> <a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># If you don't use proxy use an empty string</tt> </tt> <a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># i.e.</tt> </tt> <a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># ftp_proxy = ''</tt> </tt> <a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -> no proxy</tt> </tt> <a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># ftp_proxy = 'http://www.somewhere.something:one_number'</tt> </tt> <a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -> www.somewhere.something is the address of the proxy.</tt> </tt> <a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># one_number is the port number.</tt> </tt> <a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># </tt> </tt> <a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-comment"></tt><tt id="link-4" class="py-name" targets="Variable Bio.Restriction.RanaConfig.ftp_proxy=Bio.Restriction.RanaConfig-module.html#ftp_proxy"><a title="Bio.Restriction.RanaConfig.ftp_proxy" class="py-name" href="#" onclick="return doclink('link-4', 'ftp_proxy', 'link-4');">ftp_proxy</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> <a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"><tt class="py-comment">###############################################################################</tt> </tt> <a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Rebase ftp location</tt> </tt> <a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Do not modify the addresses.</tt> </tt> <a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"><tt class="py-comment"></tt><tt id="link-5" class="py-name" targets="Variable Bio.Restriction.RanaConfig.ftp_Rebase=Bio.Restriction.RanaConfig-module.html#ftp_Rebase"><a title="Bio.Restriction.RanaConfig.ftp_Rebase" class="py-name" href="#" onclick="return doclink('link-5', 'ftp_Rebase', 'link-5');">ftp_Rebase</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'ftp://ftp.neb.com/'</tt> </tt> <a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable Bio.Restriction.RanaConfig.ftp_emb_e=Bio.Restriction.RanaConfig-module.html#ftp_emb_e"><a title="Bio.Restriction.RanaConfig.ftp_emb_e" class="py-name" href="#" onclick="return doclink('link-6', 'ftp_emb_e', 'link-6');">ftp_emb_e</a></tt> <tt class="py-op">=</tt> <tt id="link-7" class="py-name"><a title="Bio.Restriction.RanaConfig.ftp_Rebase" class="py-name" href="#" onclick="return doclink('link-7', 'ftp_Rebase', 'link-5');">ftp_Rebase</a></tt><tt class="py-op">+</tt><tt class="py-string">'pub/rebase/emboss_e.###'</tt> </tt> <a name="L64"></a><tt class="py-lineno">64</tt> <tt class="py-line"><tt id="link-8" class="py-name" targets="Variable Bio.Restriction.RanaConfig.ftp_emb_s=Bio.Restriction.RanaConfig-module.html#ftp_emb_s"><a title="Bio.Restriction.RanaConfig.ftp_emb_s" class="py-name" href="#" onclick="return doclink('link-8', 'ftp_emb_s', 'link-8');">ftp_emb_s</a></tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="Bio.Restriction.RanaConfig.ftp_Rebase" class="py-name" href="#" onclick="return doclink('link-9', 'ftp_Rebase', 'link-5');">ftp_Rebase</a></tt><tt class="py-op">+</tt><tt class="py-string">'pub/rebase/emboss_s.###'</tt> </tt> <a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"><tt id="link-10" class="py-name" targets="Variable Bio.Restriction.RanaConfig.ftp_emb_r=Bio.Restriction.RanaConfig-module.html#ftp_emb_r"><a title="Bio.Restriction.RanaConfig.ftp_emb_r" class="py-name" href="#" onclick="return doclink('link-10', 'ftp_emb_r', 'link-10');">ftp_emb_r</a></tt> <tt class="py-op">=</tt> <tt id="link-11" class="py-name"><a title="Bio.Restriction.RanaConfig.ftp_Rebase" class="py-name" href="#" onclick="return doclink('link-11', 'ftp_Rebase', 'link-5');">ftp_Rebase</a></tt><tt class="py-op">+</tt><tt class="py-string">'pub/rebase/emboss_r.###'</tt> </tt> <a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"><tt class="py-comment">###############################################################################</tt> </tt> <a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># ftp rebase account.</tt> </tt> <a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># In order to update the rebase files, Rana need to connect to the</tt> </tt> <a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># ftp server corresponding.</tt> </tt> <a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># the general procedure for accessing a ftp server is generally to</tt> </tt> <a name="L73"></a><tt class="py-lineno">73</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># connect as anonymous user (rebase_name) and providing your e-mail address</tt> </tt> <a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># as password.</tt> </tt> <a name="L75"></a><tt class="py-lineno">75</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L76"></a><tt class="py-lineno">76</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Therefore, you need to enter your e-mail address in rebase_password.</tt> </tt> <a name="L77"></a><tt class="py-lineno">77</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># The address will not be send to anyone but is necessary to login the</tt> </tt> <a name="L78"></a><tt class="py-lineno">78</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># ftp server of rebase when connecting as anonymous user.</tt> </tt> <a name="L79"></a><tt class="py-lineno">79</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L80"></a><tt class="py-lineno">80</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Do not forget to enclose the address between "'".</tt> </tt> <a name="L81"></a><tt class="py-lineno">81</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> <a name="L82"></a><tt class="py-lineno">82</tt> <tt class="py-line"><tt class="py-comment"></tt><tt id="link-12" class="py-name" targets="Variable Bio.Restriction.RanaConfig.Rebase_name=Bio.Restriction.RanaConfig-module.html#Rebase_name"><a title="Bio.Restriction.RanaConfig.Rebase_name" class="py-name" href="#" onclick="return doclink('link-12', 'Rebase_name', 'link-12');">Rebase_name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'anonymous'</tt> </tt> <a name="L83"></a><tt class="py-lineno">83</tt> <tt class="py-line"><tt id="link-13" class="py-name" targets="Variable Bio.Restriction.RanaConfig.Rebase_password=Bio.Restriction.RanaConfig-module.html#Rebase_password"><a title="Bio.Restriction.RanaConfig.Rebase_password" class="py-name" href="#" onclick="return doclink('link-13', 'Rebase_password', 'link-13');">Rebase_password</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> <a name="L84"></a><tt class="py-lineno">84</tt> <tt class="py-line"><tt class="py-comment">#Rebase_password = 'your_address@somewhere.something'</tt> </tt> <a name="L85"></a><tt class="py-lineno">85</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt><script type="text/javascript"> <!-- expandto(location.href); // --> </script> </pre> <br /> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <th class="navbar" width="100%"></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> Generated by Epydoc 3.0.1 on Mon Sep 15 09:28:08 2008 </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>