Skip to content

Commit ad10bf7

Browse files
committed
improve QuantData tutorial
1 parent 25c621a commit ad10bf7

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/source/user_guide/quantitative_data.rst

+17-17
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ features
66

77
In OpenMS, information about quantitative data is stored in a so-called
88
:py:class:`~.Feature`. Each
9-
:py:class:`~.Feature` represents a region in RT and m/z space use for quantitative
9+
:py:class:`~.Feature` represents a region in RT and m/z for quantitative
1010
analysis.
1111

1212
.. code-block:: python
@@ -27,7 +27,7 @@ analysis.
2727
masstrace.push_back(p)
2828
2929
Usually, the quantitative features would be produced by a so-called
30-
:py:class:`~.FeatureFinder` algorithm, which we will discuss in the next chapter. The
30+
:py:class:`~.FeatureFinder` algorithm, which we will discuss in the `next chapter <feature_detection.html>`_. The
3131
features can be stored in a :py:class:`~.FeatureMap` and written to disk.
3232

3333
.. code-block:: python
@@ -78,13 +78,13 @@ represented by a :py:class:`~.ConsensusFeature`
7878
.. code-block:: python
7979
:linenos:
8080
81-
feature = oms.ConsensusFeature()
82-
feature.setMZ(500.9)
83-
feature.setCharge(2)
84-
feature.setRT(1500.1)
85-
feature.setIntensity(80500)
81+
cf = oms.ConsensusFeature()
82+
cf.setMZ(500.9)
83+
cf.setCharge(2)
84+
cf.setRT(1500.1)
85+
cf.setIntensity(80500)
8686
87-
# Generate ConsensusFeature and features from two maps (with id 1 and 2)
87+
# Generate ConsensusFeature from features of two maps (with id 1 and 2)
8888
### Feature 1
8989
f_m1 = oms.ConsensusFeature()
9090
f_m1.setRT(500)
@@ -97,8 +97,8 @@ represented by a :py:class:`~.ConsensusFeature`
9797
f_m2.setMZ(299.99)
9898
f_m2.setIntensity(600)
9999
f_m2.ensureUniqueId()
100-
feature.insert(1, f_m1)
101-
feature.insert(2, f_m2)
100+
cf.insert(1, f_m1)
101+
cf.insert(2, f_m2)
102102
103103
We have thus added two features from two individual maps (which have the unique
104104
identifier ``1`` and ``2``) to the :py:class:`~.ConsensusFeature`.
@@ -110,12 +110,12 @@ the two maps and output the two linked features:
110110
111111
# The two features in map 1 and map 2 represent the same analyte at
112112
# slightly different RT and m/z
113-
for fh in feature.getFeatureList():
113+
for fh in cf.getFeatureList():
114114
print(fh.getMapIndex(), fh.getIntensity(), fh.getRT())
115115
116-
print(feature.getMZ())
117-
feature.computeMonoisotopicConsensus()
118-
print(feature.getMZ())
116+
print(cf.getMZ())
117+
cf.computeMonoisotopicConsensus()
118+
print(cf.getMZ())
119119
120120
# Generate ConsensusMap and add two maps (with id 1 and 2)
121121
cmap = oms.ConsensusMap()
@@ -124,14 +124,14 @@ the two maps and output the two linked features:
124124
fds[2].filename = "file2"
125125
cmap.setColumnHeaders(fds)
126126
127-
feature.ensureUniqueId()
128-
cmap.push_back(feature)
127+
cf.ensureUniqueId()
128+
cmap.push_back(cf)
129129
oms.ConsensusXMLFile().store("test.consensusXML", cmap)
130130
131131
Inspection of the generated ``test.consensusXML`` reveals that it contains
132132
references to two :term:`LC-MS/MS` runs (``file1`` and ``file2``) with their respective
133133
unique identifier. Note how the two features we added before have matching
134-
unique identifiers.
134+
unique identifiers.
135135

136136
Visualization of the resulting output file reveals a single
137137
:py:class:`~.ConsensusFeature` of size 2 that links to the two individual features at

0 commit comments

Comments
 (0)