protected bool IsQSTAR() { var analyst = new ApplicationClass(); // Make sure that Analyst is fully started var acqMethodDir = (IAcqMethodDirConfig)analyst.Acquire(); if (acqMethodDir == null) { throw new IOException("Failed to initialize. Analyst may need to be started."); } string methodFilePath = Path.GetFullPath(Path.Combine(GetProjectDirectory(), METHOD_FILE_IDA_QSTAR)); object acqMethodObj; acqMethodDir.LoadNonUIMethod(methodFilePath, out acqMethodObj); var acqMethod = (IAcqMethod)acqMethodObj; var method = BuildAnalystFullScanMethod.ExtractMsMethod(acqMethod); // there must be a better way to figure out which version of Analyst we have return(method != null); }
protected MassSpecMethod GetMethod(string methodFilePath) { MassSpecMethod method; BuildAnalystFullScanMethod.GetAcqMethod(methodFilePath, out method); return(method); }
public void TestFailOnIncorrectInstrumentTemplate() { string projectDirectory = GetProjectDirectory(); var template = IsQSTAR() ? METHOD_FILE_5600 : METHOD_FILE_QSTAR; var args = new[] { Path.Combine(projectDirectory, template), Path.Combine(projectDirectory, TRANS_LIST_UNSCHED) }; var builder = new BuildAnalystFullScanMethod(); builder.ParseCommandArgs(args); // This should throw an exception builder.build(); }
public void TestFailOnIncorrectTemplateTypeForTargetedMSMS() { string projectDirectory = GetProjectDirectory(); var template = IsQSTAR() ? METHOD_FILE_IDA_QSTAR : METHOD_FILE_IDA_5600; var args = new[] { Path.Combine(projectDirectory, template), Path.Combine(projectDirectory, TRANS_LIST_UNSCHED) }; var builder = new BuildAnalystFullScanMethod(); builder.ParseCommandArgs(args); // This should throw an exception builder.build(); }
private void TestIDAUnscheduled(string templateMethodFile) { var args = new[] { "-i", GetTemplateFilePath(templateMethodFile), GetTransListUnschedPath() }; var builder = new BuildAnalystFullScanMethod(); builder.ParseCommandArgs(args); builder.build(); TestIDACommon(GetMethodUnschedPath(), false); }
private void TestIDAScheduled(string templateMethodFile) { var args = new[] { "-i", "-r", "-mq", GetTemplateFilePath(templateMethodFile), GetTransListSchedPath() }; var builder = new BuildAnalystFullScanMethod(); builder.ParseCommandArgs(args); builder.build(); TestIDACommon(GetMethodSchedPath(), true); TestMultiQuantFile(Path.ChangeExtension(GetMethodSchedPath(), ".MultiQuant.txt")); }
private void TestTargetedMsmsNoTOFMs(string templateMethodFile) { var args = new[] { GetTemplateFilePath(templateMethodFile), GetTransListUnschedPath() }; var builder = new BuildAnalystFullScanMethod(); builder.ParseCommandArgs(args); builder.build(); string methodFilePath = GetMethodUnschedPath(); string templateFilePath = GetTemplateFilePath(templateMethodFile); TestTargetedMsmsCommon(templateFilePath, methodFilePath, false); DeleteOutput(methodFilePath); }
private void TestIDAScheduled(string templateMethodFile) { var args = new[] { "-i", "-r" , "-mq", GetTemplateFilePath(templateMethodFile), GetTransListSchedPath() }; var builder = new BuildAnalystFullScanMethod(); builder.ParseCommandArgs(args); builder.build(); TestIDACommon(GetMethodSchedPath(), true); TestMultiQuantFile(Path.ChangeExtension(GetMethodSchedPath(), ".MultiQuant.txt")); }
private void TestTargetedMsmsTOFMs(string templateMethodFile) { var args = new[] { "-1", GetTemplateFilePath(templateMethodFile), GetTransListUnschedPath() }; var builder = new BuildAnalystFullScanMethod(); builder.ParseCommandArgs(args); builder.build(); string methodFilePath = GetMethodUnschedPath(); string templateFilePath = GetTemplateFilePath(templateMethodFile); TestTargetedMsmsCommon(templateFilePath, methodFilePath, true); DeleteOutput(methodFilePath); }