Skip to content

Commit 2d7abcd

Browse files
committed
Added FAIMS CV
1 parent 6ae88ac commit 2d7abcd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Writer/MzMlSpectrumWriter.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,7 @@ private SpectrumType ConstructMSSpectrum(int scanNumber)
11471147
int? charge = null;
11481148
double? monoisotopicMz = null;
11491149
double? ionInjectionTime = null;
1150+
double? FAIMSCV = null;
11501151
List<double> SPSMasses = new List<double>();
11511152
for (var i = 0; i < trailerData.Length; i++)
11521153
{
@@ -1170,6 +1171,12 @@ private SpectrumType ConstructMSSpectrum(int scanNumber)
11701171
CultureInfo.CurrentCulture);
11711172
}
11721173

1174+
if (trailerData.Labels[i] == "FAIMS CV:")
1175+
{
1176+
FAIMSCV = double.Parse(trailerData.Values[i], NumberStyles.Any,
1177+
CultureInfo.CurrentCulture);
1178+
}
1179+
11731180
//tune version < 3 produced trailer entry like "SPS Mass #", one entry per mass
11741181
if (SPSentry.IsMatch(trailerData.Labels[i]))
11751182
{
@@ -1286,6 +1293,18 @@ private SpectrumType ConstructMSSpectrum(int scanNumber)
12861293
cvRef = "MS"
12871294
});
12881295

1296+
//FAIMS
1297+
if(FAIMSCV != null)
1298+
{
1299+
spectrumCvParams.Add(new CVParamType
1300+
{
1301+
name = "FAIMS compensation voltage",
1302+
accession = "MS:1001581",
1303+
value = FAIMSCV.ToString(),
1304+
cvRef = "MS"
1305+
});
1306+
}
1307+
12891308
double? basePeakMass;
12901309
double? basePeakIntensity;
12911310
double? lowestObservedMz = null;

0 commit comments

Comments
 (0)