forked from PNNL-Comp-Mass-Spec/MASIC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clsMzBinInfo.cs
43 lines (37 loc) · 1.21 KB
/
clsMzBinInfo.cs
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
namespace MASIC
{
/// <summary>
/// Container for a binned m/z value
/// </summary>
public class clsMzBinInfo
{
// Ignore Spelling: Da
/// <summary>
/// m/z value
/// </summary>
public double MZ { get; set; }
/// <summary>
/// Search tolerance to use when creating a selected ion chromatogram
/// </summary>
public double MZTolerance { get; set; }
/// <summary>
/// When true, MZTolerance is ppm-based
/// </summary>
public bool MZToleranceIsPPM { get; set; }
/// <summary>
/// Parent ion index for this binned m/z value
/// </summary>
public int ParentIonIndex { get; set; }
/// <summary>
/// Show the m/z value and search tolerance
/// </summary>
public override string ToString()
{
if (MZToleranceIsPPM)
{
return "m/z: " + MZ.ToString("0.0") + ", MZTolerance: " + MZTolerance.ToString("0.0") + " ppm";
}
return "m/z: " + MZ.ToString("0.0") + ", MZTolerance: " + MZTolerance.ToString("0.000") + " Da";
}
}
}