示例#1
0
        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);
        }
示例#2
0
        protected MassSpecMethod GetMethod(string methodFilePath)
        {
            MassSpecMethod method;

            BuildAnalystFullScanMethod.GetAcqMethod(methodFilePath, out method);

            return(method);
        }
示例#3
0
        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();
        }
示例#4
0
        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();
        }
示例#5
0
        private void TestIDAUnscheduled(string templateMethodFile)
        {
            var args = new[] {
                "-i",
                GetTemplateFilePath(templateMethodFile),
                GetTransListUnschedPath()
            };

            var builder = new BuildAnalystFullScanMethod();

            builder.ParseCommandArgs(args);
            builder.build();


            TestIDACommon(GetMethodUnschedPath(), false);
        }
示例#6
0
        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"));
        }
示例#7
0
        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);
        }
示例#8
0
        private void TestIDAUnscheduled(string templateMethodFile)
        {
            var args = new[] {
                                "-i",
                                GetTemplateFilePath(templateMethodFile),
                                GetTransListUnschedPath()
                             };

            var builder = new BuildAnalystFullScanMethod();
            builder.ParseCommandArgs(args);
            builder.build();

            TestIDACommon(GetMethodUnschedPath(), false);
        }
示例#9
0
        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);
        }