예제 #1
0
 public void TestSetup()
 {
     this.fullRawFile = new RawFileImpl();
     this.fullRawFile.Open(@TestContext.CurrentContext.TestDirectory + "/../../../data//Standard_Protein_FT2_Lock_Re5.RAW");
     this.ms2OnlyRawFile = new RawFileImpl();
     this.ms2OnlyRawFile.Open(@TestContext.CurrentContext.TestDirectory + "/../../../data//Full_scan_apiginin_ms2.RAW");
 }
        private static IRawFile2 DoGetRawFileReader(string aFileName, bool isTandemMS3 = false)
        {
            var fileName = aFileName.ToLower();

            IRawFile2 result;

            if (fileName.EndsWith(".mzdata.xml") || fileName.EndsWith(".mzdata"))
            {
                result = new MzDataImpl();
            }
            else if (fileName.EndsWith(".mzxml"))
            {
                result = new MzXMLImpl2();
            }
            //else if (Directory.Exists(fileName))
            //{
            //  result = new AgilentDirectoryImpl();
            //}
            else if (fileName.EndsWith("mgf"))
            {
                result = new MascotGenericFormatImpl();
            }
            //else if (fileName.EndsWith("wiff"))
            //{
            //  result = new WiffImpl();
            //}
            else
            {
                result = new RawFileImpl();
            }

            if (isTandemMS3)
            {
                result.MasterScanFinder = new MasterScanParallelMS3Finder();
            }

            return(result);
        }