This file is indexed.

/usr/share/doc/python-mzml-doc/html/obo.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!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>5. OBO parser Class &mdash; 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="6. Plotting functions" href="plot.html" />
    <link rel="prev" title="4. Class Spectrum" href="spec.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="plot.html" title="6. Plotting functions"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="spec.html" title="4. Class Spectrum"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">pymzML 0.7.4 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-obo">
<span id="obo-parser-class"></span><h1>5. OBO parser Class<a class="headerlink" href="#module-obo" title="Permalink to this headline"></a></h1>
<p>Class to parse the obo file and set up the accessions library</p>
<p>The OBO parse has been designed to convert MS:xxxxx tags to their appropriate 
names. A minimal set of MS acession is used in pymzml, but additional accessions
can easily added, using the extraAccession parameter during 
<a class="reference internal" href="run.html#run.Reader" title="run.Reader"><tt class="xref py py-class docutils literal"><span class="pre">run.Reader</span></tt></a> initialization.</p>
<p>The obo translator is used internally to associate names with MS:xxxxxxx tags.</p>
<p>The oboTranslator Class generates a dictionary and several lookup tables.
e.g.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">pymzml.obo</span> <span class="kn">import</span> <span class="n">oboTranslator</span> <span class="k">as</span> <span class="n">OT</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">translator</span> <span class="o">=</span> <span class="n">OT</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">len</span><span class="p">(</span><span class="n">translator</span><span class="o">.</span><span class="n">id</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="c"># Numer of parsed entries</span>
<span class="go">737</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">translator</span><span class="p">[</span><span class="s">&#39;MS:1000127&#39;</span><span class="p">]</span>
<span class="go">&#39;centroid mass spectrum&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">translator</span><span class="p">[</span><span class="s">&#39;positive scan&#39;</span><span class="p">]</span>
<span class="go">{&#39;is_a&#39;: &#39;MS:1000465 ! scan polarity&#39;, &#39;id&#39;: &#39;MS:1000130&#39;, &#39;def&#39;: &#39;&quot;Polarity </span>
<span class="go">of the scan is positive.&quot; [PSI:MS]&#39;, &#39;name&#39;: &#39;positive scan&#39;}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">translator</span><span class="p">[</span><span class="s">&#39;scan&#39;</span><span class="p">]</span>
<span class="go">{&#39;relationship&#39;: &#39;part_of MS:0000000 ! Proteomics Standards Initiative Mass </span>
<span class="go">Spectrometry Ontology&#39;, &#39;id&#39;: &#39;MS:1000441&#39;, &#39;def&#39;: &#39;&quot;Function or process of </span>
<span class="go">the mass spectrometer where it records a spectrum.&quot; [PSI:MS]&#39;, &#39;name&#39;: </span>
<span class="go">&#39;scan&#39;}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">translator</span><span class="p">[</span><span class="s">&#39;unit&#39;</span><span class="p">]</span>
<span class="go">{&#39;relationship&#39;: &#39;part_of MS:0000000 ! Proteomics Standards Initiative Mass </span>
<span class="go">Spectrometry Ontology&#39;, &#39;id&#39;: &#39;MS:1000460&#39;, &#39;def&#39;: &#39;&quot;Terms to describe </span>
<span class="go">units.&quot; [PSI:MS]&#39;, &#39;name&#39;: &#39;unit&#39;}</span>
</pre></div>
</div>
<p>pymzML comes with the queryOBO.py script that can be used to interogate the OBO 
file.</p>
<div class="highlight-python"><div class="highlight"><pre>$ ./example_scripts/queryOBO.py &quot;scan time&quot;
MS:1000016
scan time
&quot;The time taken for an acquisition by scanning analyzers.&quot; [PSI:MS]
Is a: MS:1000503 ! scan attribute
$ 
</pre></div>
</div>
<div class="section" id="accessing-specific-obo-ms-tags">
<h2>5.1. Accessing specific OBO MS tags<a class="headerlink" href="#accessing-specific-obo-ms-tags" title="Permalink to this headline"></a></h2>
<p>This section describes how to access some common MS tags by their names as they
are defined in the OBO file.</p>
<p>First pymzML is imported and the run is defined.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">example_file</span> <span class="o">=</span> <span class="n">get_example_file</span><span class="o">.</span><span class="n">open_example</span><span class="p">(</span><span class="s">&#39;dta_example.mzML&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">pymzml</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msrun</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="n">example_file</span><span class="p">)</span>
</pre></div>
</div>
<p>Now, we can fetch specific imformations from the spectrum object.</p>
<p>MS level:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">spectrum</span> <span class="ow">in</span> <span class="n">msrun</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">&#39;ms level&#39;</span><span class="p">])</span>
</pre></div>
</div>
<p>Total Ion current:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">spectrum</span> <span class="ow">in</span> <span class="n">msrun</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">&#39;total ion current&#39;</span><span class="p">])</span>
</pre></div>
</div>
<p>Furthermore we can also check for presence of parameters, therefore the
proprties of the spectrum.</p>
<p>Differentiation of e.g. HCD and CID fractionation:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">spectrum</span> <span class="ow">in</span> <span class="n">msrun</span><span class="p">:</span>
<span class="gp">... </span>    <span class="k">if</span> <span class="n">spctrum</span><span class="p">[</span><span class="s">&#39;ms level&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
<span class="gp">... </span>        <span class="k">if</span> <span class="s">&#39;collision-induced dissociation&#39;</span> <span class="ow">in</span> <span class="n">spectrum</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
<span class="gp">... </span>            <span class="k">print</span><span class="p">(</span><span class="s">&#39;Spectrum {0} is a CID spectrum&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">spectrum</span><span class="p">[</span><span class="s">&#39;id&#39;</span><span class="p">]))</span>
<span class="gp">... </span>        <span class="k">elif</span> <span class="s">&#39;high-energy collision-induced dissociation&#39;</span> <span class="ow">in</span> <span class="n">spectrum</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
<span class="gp">... </span>            <span class="k">print</span><span class="p">(</span><span class="s">&#39;Spectrum {0} is a HCD spectrum&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">spectrum</span><span class="p">[</span><span class="s">&#39;id&#39;</span><span class="p">]))</span>
</pre></div>
</div>
</div>
<div class="section" id="minimal-accession-set">
<h2>5.2. Minimal accession set<a class="headerlink" href="#minimal-accession-set" title="Permalink to this headline"></a></h2>
<p>The following dictionary shows the minimal accession necessary to run pymzML.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">MIN_REQ</span> <span class="o">=</span> <span class="p">[</span>
<span class="c">#</span>
<span class="c">#!NOTE!   exact names will be extracted of current OBO File, comments are just an orientation</span>
<span class="c">#         pymzml comes with a little script (queryOBO.py) to query the obo file</span>
<span class="c">#</span>
<span class="c">#         $ ./example_scripts/queryOBO.py &quot;scan time&quot;</span>
<span class="c">#         MS:1000016</span>
<span class="c">#         scan time</span>
<span class="c">#         &quot;The time taken for an acquisition by scanning analyzers.&quot; [PSI:MS]</span>
<span class="c">#         Is a: MS:1000503 ! scan attribute</span>
<span class="c">#</span>
<span class="p">(</span><span class="s">&#39;MS:1000016&#39;</span><span class="p">,[</span><span class="s">&#39;value&#39;</span><span class="p">]</span>             <span class="p">),</span> <span class="c">#&quot;scan time&quot;</span>
<span class="c"># -&gt; Could also be [&#39;value&#39;,&#39;unitName&#39;] to retrieve a</span>
<span class="c"># tuple of time and unit by calling spectrum[&#39;scan time&#39;]</span>
<span class="p">(</span><span class="s">&#39;MS:1000040&#39;</span><span class="p">,[</span><span class="s">&#39;value&#39;</span><span class="p">]</span>             <span class="p">),</span> <span class="c">#&quot;m/z&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000041&#39;</span><span class="p">,[</span><span class="s">&#39;value&#39;</span><span class="p">]</span>             <span class="p">),</span> <span class="c">#&quot;charge state&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000127&#39;</span><span class="p">,[</span><span class="s">&#39;name&#39;</span><span class="p">]</span>              <span class="p">),</span> <span class="c">#&quot;centroid spectrum&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000128&#39;</span><span class="p">,[</span><span class="s">&#39;name&#39;</span><span class="p">]</span>              <span class="p">),</span> <span class="c">#&quot;profile spectrum&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000133&#39;</span><span class="p">,[</span><span class="s">&#39;name&#39;</span><span class="p">]</span>              <span class="p">),</span> <span class="c">#&quot;collision-induced dissociation&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000285&#39;</span><span class="p">,[</span><span class="s">&#39;value&#39;</span><span class="p">]</span>             <span class="p">),</span> <span class="c">#&quot;total ion current&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000422&#39;</span><span class="p">,[</span><span class="s">&#39;name&#39;</span><span class="p">]</span>              <span class="p">),</span> <span class="c">#&quot;high-energy collision-induced dissociation&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000511&#39;</span><span class="p">,[</span><span class="s">&#39;value&#39;</span><span class="p">]</span>             <span class="p">),</span> <span class="c">#&quot;ms level&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000512&#39;</span><span class="p">,[</span><span class="s">&#39;value&#39;</span><span class="p">]</span>             <span class="p">),</span> <span class="c">#&quot;filter string&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000514&#39;</span><span class="p">,[</span><span class="s">&#39;name&#39;</span><span class="p">]</span>              <span class="p">),</span> <span class="c">#&quot;m/z array&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000515&#39;</span><span class="p">,[</span><span class="s">&#39;name&#39;</span><span class="p">]</span>              <span class="p">),</span> <span class="c">#&quot;intensity array&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000521&#39;</span><span class="p">,[</span><span class="s">&#39;name&#39;</span><span class="p">]</span>              <span class="p">),</span> <span class="c">#&quot;32-bit float&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000523&#39;</span><span class="p">,[</span><span class="s">&#39;name&#39;</span><span class="p">]</span>              <span class="p">),</span> <span class="c">#&quot;64-bit float&quot;</span>
<span class="p">(</span><span class="s">&#39;MS:1000744&#39;</span><span class="p">,[</span><span class="s">&#39;value&#39;</span><span class="p">]</span>             <span class="p">),</span> <span class="c"># legacy precursor mz value ...</span>
<span class="p">]</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">5. OBO parser Class</a><ul>
<li><a class="reference internal" href="#accessing-specific-obo-ms-tags">5.1. Accessing specific OBO MS tags</a></li>
<li><a class="reference internal" href="#minimal-accession-set">5.2. Minimal accession set</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="spec.html"
                        title="previous chapter">4. Class Spectrum</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="plot.html"
                        title="next chapter">6. Plotting functions</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/obo.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="plot.html" title="6. Plotting functions"
             >next</a> |</li>
        <li class="right" >
          <a href="spec.html" title="4. Class Spectrum"
             >previous</a> |</li>
        <li><a href="index.html">pymzML 0.7.4 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; 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>