Beispiel #1
0
        public void TestReadingCorruptedRawFile()
        {
            var methodName = MethodBase.GetCurrentMethod().Name;
            TestUtils.ShowStarting(methodName);

            const string rawFilePath = @"\\proto-2\UnitTest_Files\InformedProteomics_TestFiles\Corrupted\YS_Shew_testHCD_CID.raw";
            if (!File.Exists(rawFilePath))
            {
                Assert.Ignore(@"Skipping test {0} since file not found: {1}", methodName, rawFilePath);
            }

            var reader = new XCaliburReader(rawFilePath);
            reader.ReadMassSpectrum(17957);
            try
            {
                reader.ReadMassSpectrum(17957);
            }
            catch (System.Runtime.InteropServices.COMException e)
            {
                Console.WriteLine(e.Message);
            }

            Console.Write("Done");
        }
Beispiel #2
0
        public void TestXCaliburReader()
        {
            var methodName = MethodBase.GetCurrentMethod().Name;
            TestUtils.ShowStarting(methodName);

            var xcaliburReader = new XCaliburReader(TestTopDownRawFilePathCid);
            var scans = new[] {423, 425};
            foreach (var scan in scans)
            {
                var spec = xcaliburReader.ReadMassSpectrum(scan) as ProductSpectrum;
                Assert.True(spec != null);
                var isolationWindow = spec.IsolationWindow;
                Console.WriteLine("MsLevel: {0}", spec.MsLevel);
                Console.WriteLine("ActivationMethod: {0}", spec.ActivationMethod);
                Console.WriteLine("Rt: {0}", spec.ElutionTime);
                Console.WriteLine("IsolationWindowTargetMz: {0}", isolationWindow.IsolationWindowTargetMz);
                Console.WriteLine("IsolationWindowLowerOffset: {0}", isolationWindow.IsolationWindowLowerOffset);
                Console.WriteLine("IsolationWindowUpperOffset: {0}", isolationWindow.IsolationWindowUpperOffset);
                Console.WriteLine("MonoisotopicMz: {0}", isolationWindow.MonoisotopicMz);
                Console.WriteLine("PrecursorCharge: {0}", isolationWindow.Charge);
            }
        }