Skip to content

Commit 4e47244

Browse files
committed
Use CVTerm "Orbitrap" for FTMS scans in Orbitrap-based instruments
1 parent 7dcd125 commit 4e47244

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Writer/MzMlSpectrumWriter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc
279279
instrumentModel = OntologyMapping.GetInstrumentModel(instrumentData.Model);
280280
SerializeCvParam(instrumentModel);
281281

282+
//Update the definition of FTMS
283+
OntologyMapping.UpdateFTMSDefinition(instrumentData.Model);
284+
282285
SerializeCvParam(new CVParamType
283286
{
284287
cvRef = "MS",

Writer/OntologyMapping.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,38 @@ public static CVParamType GetInstrumentModel(string instrumentName)
718718
return instrumentModel;
719719
}
720720

721+
/// <summary>
722+
/// Changes the mapping of `MassAnalyserFTMS` for Orbitrap-based instruments
723+
/// updates OntologyMapping dictionarty in place
724+
/// </summary>
725+
/// <param name="instrumentName">the instrument name</param>
726+
/// <returns>Void</returns>
727+
public static void UpdateFTMSDefinition(string instrumentName)
728+
{
729+
instrumentName = instrumentName.ToUpper();
730+
731+
if (instrumentName.Contains("ORBITRAP") || instrumentName.Contains("EXACTIVE"))
732+
{
733+
MassAnalyzerTypes[MassAnalyzerType.MassAnalyzerFTMS] = new CVParamType
734+
{
735+
accession = "MS:1000484",
736+
name = "orbitrap",
737+
cvRef = "MS",
738+
value = ""
739+
};
740+
}
741+
else
742+
{
743+
MassAnalyzerTypes[MassAnalyzerType.MassAnalyzerFTMS] = new CVParamType
744+
{
745+
accession = "MS:1000079",
746+
name = "fourier transform ion cyclotron resonance mass spectrometer",
747+
cvRef = "MS",
748+
value = ""
749+
};
750+
}
751+
}
752+
721753
/// <summary>
722754
/// Get a list of detectors for the given instrument
723755
/// </summary>

0 commit comments

Comments
 (0)