Skip to content

multiplierz.mzTools.featureUtilities

Max Alexander edited this page Oct 12, 2018 · 4 revisions

This contains an interface for reading feature data (obtained from the feature detection module) for use in scripts.

class FeatureInterface(filename)

Opens the .features file specified. Indexing syntax can be used to retrieve features by number (as written in the PSM feature annotations), so for example

feature_obj = FeatureInterface('feature_data.features')
x = feature_obj[10]

Assigns the 10th feature in the file (an instance of the Feature class, see below) to x. All features in a given MZ range can be accessed through the .mz_range() method. Given feature_obj from the above,

y = feature_obj.mz_range(325, 330)

Assigns to y a list of (number, feature object) tuples.

In order to handle open files correctly, it is a good idea to call the .close() method (which takes no arguments) when you are done with the interface object.


class Feature()

The Feature class represents the data about a single MS feature. Concretely, this comprises a set of (centroided) MS peaks across a number of (not necessarily successive) MS1 spectra. From this are derived the charge state of the analyte (by comparing the M/Z of differing isotopic peaks) and the mass value (by taking the M/Z of the apparent monoisotopic peak.)

  • charge indicates the charge state of the feature.
  • mz indicates the M/Z value of the feature.
  • totalIntensity() calculates the total ion intensity attributed to the feature.
  • c12Intensity() calculates the ion intensity specifically from monoisotopic peaks in the feature. This is often a more accurate method of inter-feature comparison (though not as rigorous as the method used by Multiplierz SILAC analysis.)

Clone this wiki locally