/usr/share/doc/python-mzml-doc/html/run.html is in python-mzml-doc 0.7.4-dfsg-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>3. Module Run — pymzML 0.7.4 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.7.4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="pymzML 0.7.4 documentation" href="index.html" />
<link rel="next" title="4. Class Spectrum" href="spec.html" />
<link rel="prev" title="2. Usage" href="usage.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="spec.html" title="4. Class Spectrum"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="usage.html" title="2. Usage"
accesskey="P">previous</a> |</li>
<li><a href="index.html">pymzML 0.7.4 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-run">
<span id="module-run"></span><h1>3. Module Run<a class="headerlink" href="#module-run" title="Permalink to this headline">¶</a></h1>
<p>The class <a class="reference internal" href="#run.Reader" title="run.Reader"><tt class="xref py py-class docutils literal"><span class="pre">Reader</span></tt></a> has been designed to selectivly extract data
from a mzML file and to expose the data as a python object.
Necessary information are read in and stored in a fast
accesible format.
The reader itself is an iterator, thus looping over all spectra
follows the classical pythonian syntax.
Additionally one can random access spectra by their nativeID
if the file if not compressed or truncated by a conversion Program.</p>
<p>The class <a class="reference internal" href="#run.Writer" title="run.Writer"><tt class="xref py py-class docutils literal"><span class="pre">Writer</span></tt></a> is still in development.</p>
<dl class="class">
<dt id="run.Reader">
<em class="property">class </em><tt class="descclassname">run.</tt><tt class="descname">Reader</tt><a class="reference internal" href="_modules/run.html#Reader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#run.Reader" title="Permalink to this definition">¶</a></dt>
<dd><dl class="function">
<dt id="run.Reader.__init__">
<tt class="descname">__init__</tt><big>(</big><em>path*</em><span class="optional">[</span>, <em>noiseThreshold = 0.0</em>, <em>extraAccessions = None</em>, <em>MS1_Precision = 5e-6</em>, <em>MSn_Precision = 20e-6</em><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/run.html#Reader.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#run.Reader.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<p>Initializes an mzML run and returns an iterator.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>path</strong> (<em>string</em>) – path to mzML file. File can be gzipped.</li>
<li><strong>extraAccessions</strong> (<em>list of tuples</em>) – <p>list of additional (accession,fieldName) tuples.</p>
<p>For example, (‘MS:1000285’,[‘value’]) will extract the “total ion
current” and store it under two keys in the spectrum, i.e.
spectrum[“total ion current”] or spectrum[‘MS:1000285’].</p>
<p>The translated name is extracted from the current OBO file,
hence the name that is defined by the HUPO-PSI consortium is used. (<a class="reference external" href="http://www.psidev.info/">http://www.psidev.info/</a>).</p>
<p>pymzML comes with an example script queryOBO.py which can be used to lookup
the names or MS tags (see: <a class="reference internal" href="examples.html#module-queryOBO" title="queryOBO"><tt class="xref py py-obj docutils literal"><span class="pre">queryOBO</span></tt></a>).</p>
<p>The value, i.e. which xml property has to be extraced has to be provided by the user.
Multiple values can be used as input, i.e. ( ‘MS:1000016’ , [‘value’,’unitName’] ) will extract scan time and its unit.</p>
</li>
<li><strong>MS1_Precision</strong> (<em>float</em>) – measured precision of MS1 spectra</li>
<li><strong>MSn_Precision</strong> (<em>float</em>) – measured precision of MSn spectra</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">run</span> <span class="o">=</span> <span class="n">pymzml</span><span class="o">.</span><span class="n">run</span><span class="o">.</span><span class="n">Reader</span><span class="p">(</span><span class="s">"../mzML_example_files/100729_t300_100729172744.mzML.gz"</span> <span class="p">,</span>
<span class="go"> MS1_Precision = 20e-6 )</span>
</pre></div>
</div>
<dl class="method">
<dt id="run.Reader.next">
<tt class="descname">next</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/run.html#Reader.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#run.Reader.next" title="Permalink to this definition">¶</a></dt>
<dd><p>Iterator in class <tt class="xref py py-class docutils literal"><span class="pre">Run</span></tt>:</p>
<p>will return an instance of <a class="reference internal" href="spec.html#spec.Spectrum" title="spec.Spectrum"><tt class="xref py py-class docutils literal"><span class="pre">spec.Spectrum</span></tt></a>, stored in run.spectrum.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="k">for</span> <span class="n">spectrum</span> <span class="ow">in</span> <span class="n">run</span><span class="p">:</span>
<span class="gp">... </span> <span class="k">print</span><span class="p">(</span><span class="n">spectrum</span><span class="p">[</span><span class="s">'id'</span><span class="p">],</span> <span class="n">end</span><span class="o">=</span><span class="s">'</span><span class="se">\r</span><span class="s">'</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="run.Writer">
<em class="property">class </em><tt class="descclassname">run.</tt><tt class="descname">Writer</tt><a class="reference internal" href="_modules/run.html#Writer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#run.Writer" title="Permalink to this definition">¶</a></dt>
<dd><dl class="function">
<dt id="run.Writer.__init__">
<tt class="descname">__init__</tt><big>(</big><em>filename*</em>, <em>run*</em><span class="optional">[</span>, <em>overwrite = boolean</em><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/run.html#Writer.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#run.Writer.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<p>Initializes an mzML writer (beta stage).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>path</strong> (<em>string</em>) – filename for the new mzML file.</li>
<li><strong>run</strong> (<em>pymzml.run.Reader</em>) – Currently a pymzml.run.Reader object is required since we do not write the header by ourselves, yet.</li>
<li><strong>overwrite</strong> (<em>boolean</em>) – force the re-initialization of mzML file, even if file exists.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">run</span> <span class="o">=</span> <span class="n">pymzml</span><span class="o">.</span><span class="n">run</span><span class="o">.</span><span class="n">Reader</span><span class="p">(</span><span class="s">'../mzML_example_files/100729_t300_100729172744.mzML'</span><span class="p">,</span> <span class="n">MS1_Precision</span> <span class="o">=</span> <span class="mf">5e-6</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">run2</span> <span class="o">=</span> <span class="n">pymzml</span><span class="o">.</span><span class="n">run</span><span class="o">.</span><span class="n">Writer</span><span class="p">(</span><span class="n">filename</span> <span class="o">=</span> <span class="s">'write_test.mzML'</span><span class="p">,</span> <span class="n">run</span><span class="o">=</span> <span class="n">run</span> <span class="p">,</span> <span class="n">overwrite</span> <span class="o">=</span> <span class="bp">True</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">spec</span> <span class="o">=</span> <span class="n">run</span><span class="p">[</span><span class="mi">1000</span><span class="p">]</span>
<span class="gp">>>> </span><span class="n">run2</span><span class="o">.</span><span class="n">addSpec</span><span class="p">(</span><span class="n">spec</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">run2</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>
</pre></div>
</div>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="usage.html"
title="previous chapter">2. Usage</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="spec.html"
title="next chapter">4. Class Spectrum</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/run.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="spec.html" title="4. Class Spectrum"
>next</a> |</li>
<li class="right" >
<a href="usage.html" title="2. Usage"
>previous</a> |</li>
<li><a href="index.html">pymzML 0.7.4 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2011, Till Bald, Johannes Barth, Anna Niehues, Michael Specht, Michael Hippler, Christian Fufezan.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
|