Beispiel #1
0
        private Run determineIfRunIsABrukerTypeAndCreateRun(string folderName)
        {
            Run run = null;


            var serFileInfo = findSerFile(folderName);
            var fidFileInfo = findFIDFile(folderName);


            var apexAcquisitionMethodFileInfo = findAcquisitionMethodFile(folderName);
            var acqusFileInfos = findAcqusFile(folderName);

            var hasSerOrFid    = (serFileInfo != null || fidFileInfo != null);
            var hasSettingFile = (apexAcquisitionMethodFileInfo != null || acqusFileInfos != null);

            if (hasSerOrFid && hasSettingFile)
            {
                run = new BrukerV3Run(folderName);
            }
            else
            {
                var analysisBafFileInfo    = findAnalysisBafFile(folderName);
                var maxAcquisitionFileInfo = findMaxAcquisitionMethodFile(folderName);

                if (analysisBafFileInfo != null && maxAcquisitionFileInfo != null)
                {
                    run = new BrukerTOF(folderName);
                }
            }

            return(run);
        }
Beispiel #2
0
        public Run CreateRun(Globals.MSFileType filetype, string f)
        {
            Run run;

            if (filetype == Globals.MSFileType.MZXML_Rawdata)
            {
                pwiz.ProteowizardWrapper.DependencyLoader.ValidateLoader();
            }

            var fileName = getFullPath(f);

            switch (filetype)
            {
            case Globals.MSFileType.Undefined:
                run = null;
                break;

            case Globals.MSFileType.Agilent_WIFF:
                run = null;
                break;

            case Globals.MSFileType.Agilent_D:
                run = new AgilentDRun(fileName);
                break;

            case Globals.MSFileType.Ascii:
                run = new MSScanFromTextFileRun(fileName);
                break;

            case Globals.MSFileType.Bruker:
                run = new BrukerV3Run(fileName);
                break;

#if !Disable_DeconToolsV2
            case Globals.MSFileType.Bruker_V2:
                run = new BrukerV2Run(fileName);
                break;
#endif
            case Globals.MSFileType.Bruker_Ascii:
                run = null;
                break;

            case Globals.MSFileType.Finnigan:
                run = new XCaliburRun2(fileName);
                break;

            case Globals.MSFileType.ICR2LS_Rawdata:
                run = null;
                break;

            case Globals.MSFileType.Micromass_Rawdata:
                run = null;
                break;

            case Globals.MSFileType.MZXML_Rawdata:
                run = new MzRun(fileName);
                break;

#if !Disable_DeconToolsV2
            case Globals.MSFileType.PNNL_IMS:
                run = new IMFRun(fileName);
                break;
#endif
            case Globals.MSFileType.PNNL_UIMF:
                run = new UIMFRun(fileName);
                break;

            case Globals.MSFileType.SUNEXTREL:
                run = null;
                break;

            // Deprecated in February 2017
            // case Globals.MSFileType.YAFMS:
            //    run = new YAFMSRun(fileName);
            //    break;
            default:
                run = null;
                break;
            }

            return(run);
        }