Esempio n. 1
0
        public void ConstructorError_wrongFileInput2()
        {
            string wrongFileExample1 = FileRefs.RawDataMSFiles.BrukerSolarix12TFile1 + @"\filenotfound";

            PreconditionException ex = Assert.Throws <PreconditionException>(delegate
            {
                Run run = new DeconTools.Backend.Runs.BrukerV2Run(wrongFileExample1);
            });

            Assert.That(ex.Message, Is.EqualTo("Could not initialize Dataset. Target dataset folder not found."));
        }
Esempio n. 2
0
        public void ConstructorError_wrongFileInput()
        {
            string wrongFileExample1 = FileRefs.RawDataMSFiles.BrukerSolarix12TFile1 + @"\ser";

            PreconditionException ex = Assert.Throws <PreconditionException>(delegate
            {
                Run run = new DeconTools.Backend.Runs.BrukerV2Run(wrongFileExample1);
            });

            Assert.That(ex.Message, Is.EqualTo("Could not initialize Dataset. Looking for a folder path, but user supplied a file path."));
        }
Esempio n. 3
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);
        }