Ejemplo n.º 1
0
        private void mbtnAddMicromass_Click(object sender, System.EventArgs e)
        {
            var fld_browser = new FolderBrowserDialog();

            fld_browser.Description         = "Please select Micromass .raw folder";
            fld_browser.ShowNewFolderButton = false;
            var res = fld_browser.ShowDialog(this);

            if (res != DialogResult.OK)
            {
                return;
            }

            mstrInFile    = fld_browser.SelectedPath;
            mtxtFile.Text = fld_browser.SelectedPath;
            menmFileType  = DeconToolsV2.Readers.FileType.MICROMASSRAWDATA;
        }
Ejemplo n.º 2
0
        public static DeconTools.Backend.Globals.MSFileType ConvertDeconEngineFileType(DeconToolsV2.Readers.FileType filetype)
        {
            switch (filetype)
            {
            case DeconToolsV2.Readers.FileType.AGILENT_TOF:
                return(Globals.MSFileType.Agilent_WIFF);

            case DeconToolsV2.Readers.FileType.ASCII:
                return(Globals.MSFileType.Ascii);

            case DeconToolsV2.Readers.FileType.BRUKER:
                return(Globals.MSFileType.Bruker);

            case DeconToolsV2.Readers.FileType.BRUKER_ASCII:
                return(Globals.MSFileType.Bruker_Ascii);

            case DeconToolsV2.Readers.FileType.FINNIGAN:
                return(Globals.MSFileType.Finnigan);

            case DeconToolsV2.Readers.FileType.ICR2LSRAWDATA:
                return(Globals.MSFileType.ICR2LS_Rawdata);

            case DeconToolsV2.Readers.FileType.MICROMASSRAWDATA:
                return(Globals.MSFileType.Micromass_Rawdata);

            case DeconToolsV2.Readers.FileType.MZXMLRAWDATA:
                return(Globals.MSFileType.MZXML_Rawdata);

            case DeconToolsV2.Readers.FileType.PNNL_IMS:
                return(Globals.MSFileType.PNNL_IMS);

            case DeconToolsV2.Readers.FileType.PNNL_UIMF:
                return(Globals.MSFileType.PNNL_UIMF);

            case DeconToolsV2.Readers.FileType.SUNEXTREL:
                return(Globals.MSFileType.SUNEXTREL);

            case DeconToolsV2.Readers.FileType.UNDEFINED:
                return(Globals.MSFileType.Undefined);

            default:
                return(Globals.MSFileType.Undefined);
            }
        }
Ejemplo n.º 3
0
#pragma warning disable 618

        private void mbtnFileSelect_Click(object sender, System.EventArgs e)
        {
            try
            {
                var openFileDialog1 = new OpenFileDialog();
                openFileDialog1.Filter           = "Xcalibur files (*.RAW)|*.RAW|Agilent files (*.wiff)|*.wiff|Micromass files (_FUNC*.DAT)|_FUNC*.DAT|PNNL IMF files (*.IMF)|*.IMF|Bruker files(acqu)|acqu|MZ XML files (*.mzxml)|*.mzXML|S files(*.*)|*.*|PNNL UIMF files (*.UIMF)|*.UIMF";
                openFileDialog1.FilterIndex      = 1;
                openFileDialog1.Multiselect      = true;
                openFileDialog1.RestoreDirectory = true;

                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    var num_files = openFileDialog1.FileNames.Length;
                    for (var i = 0; i < num_files; i++)
                    {
                        var file_name = openFileDialog1.FileNames[i];
                        var index     = file_name.LastIndexOf("\\");
                        var path_dir  = "";

                        if (index > 0)
                        {
                            path_dir = file_name.Substring(0, index);
                        }

                        string outfile_name;
                        switch (openFileDialog1.FilterIndex)
                        {
                        case 1:
                            // Open Xcalibur File.
                            outfile_name = file_name.Substring(0, file_name.Length - 4);
                            mstrInFile   = file_name;
                            menmFileType = DeconToolsV2.Readers.FileType.FINNIGAN;
                            break;

                        case 2:
                            // Open Agilent File
                            outfile_name = file_name.Substring(0, file_name.Length - 4);
                            mstrInFile   = file_name;
                            menmFileType = DeconToolsV2.Readers.FileType.AGILENT_TOF;
                            break;

                        case 3:
                            // Open Micromass File
                            outfile_name = path_dir.Substring(0, path_dir.Length - 4);
                            mstrInFile   = path_dir;
                            menmFileType = DeconToolsV2.Readers.FileType.MICROMASSRAWDATA;
                            break;

                        case 4:
                            // Open PNNL IMF File
                            outfile_name = file_name.Substring(0, file_name.Length - 4);
                            mstrInFile   = file_name;
                            menmFileType = DeconToolsV2.Readers.FileType.PNNL_IMS;
                            break;

                        case 5:
                            // Open Bruker File
                            outfile_name = file_name.Substring(0, file_name.Length - 4);
                            mstrInFile   = file_name;
                            menmFileType = DeconToolsV2.Readers.FileType.BRUKER;
                            break;

                        case 6:
                            // Open MZXML file
                            outfile_name = file_name;
                            mstrInFile   = file_name;
                            menmFileType = DeconToolsV2.Readers.FileType.MZXMLRAWDATA;
                            break;

                        case 7:
                            // Open S file (ICR2LS format) file
                            outfile_name = file_name;
                            mstrInFile   = file_name;
                            menmFileType = DeconToolsV2.Readers.FileType.ICR2LSRAWDATA;
                            break;

                        default:
                            break;
                        }
                    }
                    mtxtFile.Text = mstrInFile;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Ejemplo n.º 4
0
        public static DeconTools.Backend.Globals.MSFileType ConvertDeconEngineFileType(DeconToolsV2.Readers.FileType filetype)
        {
#pragma warning disable CS0618 // Type or member is obsolete
            switch (filetype)
            {
            case DeconToolsV2.Readers.FileType.AGILENT_TOF:
                return(Globals.MSFileType.Agilent_WIFF);

            case DeconToolsV2.Readers.FileType.ASCII:
                return(Globals.MSFileType.Ascii);

            case DeconToolsV2.Readers.FileType.BRUKER:
                return(Globals.MSFileType.Bruker);

            case DeconToolsV2.Readers.FileType.BRUKER_ASCII:
                return(Globals.MSFileType.Bruker_Ascii);

            case DeconToolsV2.Readers.FileType.FINNIGAN:
                return(Globals.MSFileType.Thermo_Raw);

            case DeconToolsV2.Readers.FileType.ICR2LSRAWDATA:
                return(Globals.MSFileType.ICR2LS_Rawdata);

            case DeconToolsV2.Readers.FileType.MICROMASSRAWDATA:
                return(Globals.MSFileType.Micromass_Rawdata);

            case DeconToolsV2.Readers.FileType.MZXMLRAWDATA:
                return(Globals.MSFileType.MZXML_Rawdata);

            case DeconToolsV2.Readers.FileType.PNNL_IMS:
                return(Globals.MSFileType.PNNL_IMS);

            case DeconToolsV2.Readers.FileType.PNNL_UIMF:
                return(Globals.MSFileType.PNNL_UIMF);

            case DeconToolsV2.Readers.FileType.SUNEXTREL:
                return(Globals.MSFileType.SUNEXTREL);

            case DeconToolsV2.Readers.FileType.UNDEFINED:
                return(Globals.MSFileType.Undefined);

            default:
                return(Globals.MSFileType.Undefined);
            }
#pragma warning restore CS0618 // Type or member is obsolete
        }