6
6
7
7
In OpenMS, information about quantitative data is stored in a so-called
8
8
: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
10
10
analysis.
11
11
12
12
.. code-block :: python
@@ -27,7 +27,7 @@ analysis.
27
27
masstrace.push_back(p)
28
28
29
29
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
31
31
features can be stored in a :py:class: `~.FeatureMap ` and written to disk.
32
32
33
33
.. code-block :: python
@@ -78,13 +78,13 @@ represented by a :py:class:`~.ConsensusFeature`
78
78
.. code-block :: python
79
79
:linenos:
80
80
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 )
86
86
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)
88
88
# ## Feature 1
89
89
f_m1 = oms.ConsensusFeature()
90
90
f_m1.setRT(500 )
@@ -97,8 +97,8 @@ represented by a :py:class:`~.ConsensusFeature`
97
97
f_m2.setMZ(299.99 )
98
98
f_m2.setIntensity(600 )
99
99
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)
102
102
103
103
We have thus added two features from two individual maps (which have the unique
104
104
identifier ``1 `` and ``2 ``) to the :py:class: `~.ConsensusFeature `.
@@ -110,12 +110,12 @@ the two maps and output the two linked features:
110
110
111
111
# The two features in map 1 and map 2 represent the same analyte at
112
112
# slightly different RT and m/z
113
- for fh in feature .getFeatureList():
113
+ for fh in cf .getFeatureList():
114
114
print (fh.getMapIndex(), fh.getIntensity(), fh.getRT())
115
115
116
- print (feature .getMZ())
117
- feature .computeMonoisotopicConsensus()
118
- print (feature .getMZ())
116
+ print (cf .getMZ())
117
+ cf .computeMonoisotopicConsensus()
118
+ print (cf .getMZ())
119
119
120
120
# Generate ConsensusMap and add two maps (with id 1 and 2)
121
121
cmap = oms.ConsensusMap()
@@ -124,14 +124,14 @@ the two maps and output the two linked features:
124
124
fds[2 ].filename = " file2"
125
125
cmap.setColumnHeaders(fds)
126
126
127
- feature .ensureUniqueId()
128
- cmap.push_back(feature )
127
+ cf .ensureUniqueId()
128
+ cmap.push_back(cf )
129
129
oms.ConsensusXMLFile().store(" test.consensusXML" , cmap)
130
130
131
131
Inspection of the generated ``test.consensusXML `` reveals that it contains
132
132
references to two :term: `LC-MS/MS ` runs (``file1 `` and ``file2 ``) with their respective
133
133
unique identifier. Note how the two features we added before have matching
134
- unique identifiers.
134
+ unique identifiers.
135
135
136
136
Visualization of the resulting output file reveals a single
137
137
:py:class: `~.ConsensusFeature ` of size 2 that links to the two individual features at
0 commit comments