PrecursorIon
The precursor ion of a dependent scan and how it was isolated and fragmented.
Remarks
The precursor ion of a dependent scan and how it was isolated and fragmented. A spectrum holds zero or more in its Precursors list.
Constructors
| Syntax | Description |
|---|---|
| PrecursorIon() | Creates an empty precursor. |
| PrecursorIon(PrecursorIon pi) | Copy constructor. |
| PrecursorIon(double mz, double intensity = 0, int charge = 0, double isoMz = 0, double isoWidth = 0) | Creates a precursor from its monoisotopic m/z, with optional intensity, charge, isolation m/z and isolation width. |
Properties
| Identifier | Type | Description |
|---|---|---|
| Charge | int | Charge state of the precursor. |
| CollisionEnergy | double | If a dependent scan, the fragmentation energy used. |
| FragmentationMethod | FragmentationType | The fragmentation method used, or FragmentationType.None if not known. |
| Intensity | double | Intensity of the IsolationMz precursor peak. |
| IsolationMz | double | The m/z that the instrument targeted for isolation. |
| IsolationSpecificity | double | Proportion of the intensity in the isolation window that belongs to the precursor, from zero to one. |
| IsolationWidth | double | The size of the window that the instrument targeted for isolation. |
| MonoisotopicMz | double | The putative monoisotopic m/z peak of the isotope envelope that contains the isolation m/z. |
Methods
| Method | Returns | Description |
|---|---|---|
| Clear() | void | Resets all values to 0. |
Example
1
2
3
4
5
6
7
8
9
10
11
12
using Nova.Data;
using Nova.Io.Read;
FileReader reader = new FileReader("DDA.raw", MSFilter.MS2);
foreach (Spectrum spectrum in reader)
{
foreach (PrecursorIon precursor in spectrum.Precursors)
{
Console.WriteLine(precursor.MonoisotopicMz + "\t" + precursor.Charge
+ "\t" + precursor.FragmentationMethod);
}
}
1
2
3
4
5
PrecursorIon precursor = new PrecursorIon(652.3412, 1.2e6, 2, 652.84, 1.6);
precursor.FragmentationMethod = FragmentationType.HCD;
// The copy constructor carries every field.
PrecursorIon copy = new PrecursorIon(precursor);
This post is licensed under CC BY 4.0 by the author.