Example #1
0
        protected MassSpecMethod GetMethod(string methodFilePath)
        {
            MassSpecMethod method;

            BuildQtrapMethod.GetAcqMethod(methodFilePath, out method);

            return(method);
        }
Example #2
0
        public void TestMRMMethod()
        {
            string projectDirectory = GetProjectDirectory();

            var args = new[] { Path.Combine(projectDirectory, METHOD_FILE),
                               Path.Combine(projectDirectory, LIST_UNSCHED) };
            var builder = new BuildQtrapMethod();

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

            string methodFilePath = Path.GetFullPath(Path.Combine(projectDirectory, METHOD_UNSCHED));

            // read the updated method and make sure that the
            // transition list has been included
            MassSpecMethod method = GetMethod(methodFilePath);

            var period       = (Period)method.GetPeriod(0);
            var msExperiment = (Experiment)period.GetExperiment(0);

            Assert.AreEqual(60, msExperiment.MassRangesCount);

            // Check the first one
            // 744.839753,1087.49894,20,APR.AGLCQTFVYGGCR.y9.light,85.4,38.2
            var massRange = (MassRange)msExperiment.GetMassRange(0);

            Assert.AreEqual(20, massRange.DwellTime);
            Assert.AreEqual(744.839753, massRange.QstartMass, 0.00005);
            Assert.AreEqual(0, massRange.QstopMass);
            Assert.AreEqual(1087.49894, massRange.QstepMass, 0.00005);

            var msMassRange3 = (IMassRange3)massRange;

            Assert.AreEqual("APR.AGLCQTFVYGGCR.y9.light", msMassRange3.CompoundID);

            // Check the last one
            // 572.791863,724.375566,20,CRP.GYSIFSYATK.y6.heavy,72.6,28.2
            massRange = (MassRange)msExperiment.GetMassRange(59);
            Assert.AreEqual(20, massRange.DwellTime);
            Assert.AreEqual(572.791863, massRange.QstartMass, 0.00005);
            Assert.AreEqual(0, massRange.QstopMass);
            Assert.AreEqual(724.375566, massRange.QstepMass, 0.00005);

            msMassRange3 = (IMassRange3)massRange;
            Assert.AreEqual("CRP.GYSIFSYATK.y6.heavy", msMassRange3.CompoundID);

            DeleteOutput(methodFilePath);
        }
Example #3
0
        public void TestMRMMethod()
        {
            string projectDirectory = GetProjectDirectory();

            var args = new[] { Path.Combine(projectDirectory, METHOD_FILE),
                               Path.Combine(projectDirectory, LIST_UNSCHED) };
            var builder = new BuildQtrapMethod();
            builder.ParseCommandArgs(args);
            builder.build();

            string methodFilePath = Path.GetFullPath(Path.Combine(projectDirectory, METHOD_UNSCHED));

            // read the updated method and make sure that the
            // transition list has been included
            MassSpecMethod method = GetMethod(methodFilePath);

            var period = (Period)method.GetPeriod(0);
            var msExperiment = (Experiment)period.GetExperiment(0);

            Assert.AreEqual(60, msExperiment.MassRangesCount);

            // Check the first one
            // 744.839753,1087.49894,20,APR.AGLCQTFVYGGCR.y9.light,85.4,38.2
            var massRange = (MassRange)msExperiment.GetMassRange(0);
            Assert.AreEqual(20, massRange.DwellTime);
            Assert.AreEqual(744.839753, massRange.QstartMass, 0.00005);
            Assert.AreEqual(0, massRange.QstopMass);
            Assert.AreEqual(1087.49894, massRange.QstepMass, 0.00005);

            var msMassRange3 = (IMassRange3)massRange;
            Assert.AreEqual("APR.AGLCQTFVYGGCR.y9.light", msMassRange3.CompoundID);

            // Check the last one
            // 572.791863,724.375566,20,CRP.GYSIFSYATK.y6.heavy,72.6,28.2
            massRange = (MassRange)msExperiment.GetMassRange(59);
            Assert.AreEqual(20, massRange.DwellTime);
            Assert.AreEqual(572.791863, massRange.QstartMass, 0.00005);
            Assert.AreEqual(0, massRange.QstopMass);
            Assert.AreEqual(724.375566, massRange.QstepMass, 0.00005);

            msMassRange3 = (IMassRange3)massRange;
            Assert.AreEqual("CRP.GYSIFSYATK.y6.heavy", msMassRange3.CompoundID);

            DeleteOutput(methodFilePath);
        }