예제 #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            List <string> csv_filepaths = new List <string>(lstOmssaCsvFiles.Items.Count);

            foreach (string csv_filepath in lstOmssaCsvFiles.Items)
            {
                csv_filepaths.Add(csv_filepath);
            }
            string raw_folder = txtRawFolder.Text;
            List <Modification> fixed_modifications = new List <Modification>(lstSelectedFixedModifications.Items.Count);

            foreach (ListViewItem checked_item in lstSelectedFixedModifications.Items)
            {
                fixed_modifications.Add((Modification)checked_item.Tag);
            }
            double intensity_threshold = double.Parse(txtFragmentIntensityThreshold.Text);
            IntensityThresholdType intensity_threshold_type = (IntensityThresholdType)cboFragmentIntensityThresholdType.SelectedItem;
            double mz_tolerance = (double)numFragmentMZTolerance.Value;
            double ambiguity_score_threshold        = (double)numAmbiguityScoreThreshold.Value;
            bool   eliminate_precursor_interference = advanced.EliminatePrecursorInterference;
            double precursor_interference_threshold = advanced.PrecursorInterferenceThreshold / 100;
            bool   motif_x_output = advanced.MotifXOutput;
            string motif_x_fasta_protein_database_filepath = advanced.MotifXFastaProteinDatabaseFilepath;
            int    motif_x_window_size = advanced.MotifXWindowSize;
            string output_folder       = txtOutputFolder.Text;

            if (output_folder == string.Empty)
            {
                MessageBox.Show("Output folder must be specified");
                return;
            }

            Phosphinator phosphinator = new Phosphinator(csv_filepaths,
                                                         raw_folder,
                                                         fixed_modifications,
                                                         intensity_threshold, intensity_threshold_type,
                                                         mz_tolerance,
                                                         ambiguity_score_threshold,
                                                         eliminate_precursor_interference, precursor_interference_threshold,
                                                         motif_x_output, motif_x_fasta_protein_database_filepath, motif_x_window_size,
                                                         output_folder);

            phosphinator.Starting       += handleStarting;
            phosphinator.StartingFile   += handleStartingFile;
            phosphinator.UpdateProgress += handleUpdateProgress;
            phosphinator.ThrowException += handleThrowException;
            phosphinator.Finished       += handleFinished;

            lstOmssaCsvFiles.SelectedItem = null;
            prgProgress.Value             = prgProgress.Minimum;

            Thread thread = new Thread(new ThreadStart(phosphinator.Phosphinate));

            thread.IsBackground = true;
            thread.Start();
        }
예제 #2
0
public Phosphinator(IList<string> csvFilepaths,
            string rawFolder,
            IEnumerable<Modification> fixedModifications,
            double intensityThreshold, IntensityThresholdType intensityThresholdType,
            double mzTolerance,
            double ambiguityScoreThreshold,
            bool eliminatePrecursorInterference, double precursorInterferenceThreshold,
            bool motifXOutput, string motifXFastaProteinDatabaseFilepath, int motifXWindowSize,
            string outputFolder)
{
    this.csvFilepaths = csvFilepaths;
            this.rawFolder = rawFolder;
            this.fixedModifications = fixedModifications;
            this.intensityThreshold = intensityThreshold;
            this.intensityThresholdType = intensityThresholdType;
            this.mzTolerance = mzTolerance;
            this.ambiguityScoreThreshold = ambiguityScoreThreshold;
            this.eliminatePrecursorInterference = eliminatePrecursorInterference;
            this.precursorInterferenceThreshold = precursorInterferenceThreshold;
            this.motifXOutput = motifXOutput;
            this.motifXFastaProteinDatabaseFilepath = motifXFastaProteinDatabaseFilepath;
            this.motifXWindowSize = motifXWindowSize;
            this.outputFolder = outputFolder;
}
 public DtaGenerator(IList<string> rawFilepaths,
     int minimumAssumedPrecursorChargeState, int maximumAssumedPrecursorChargeState,
     bool enableLockMassRecalibration, double lockMassMZ,
     bool kenny,
     bool enableEtdSpectralPreProcessing,
     bool cleanItraq4Plex, bool cleanTmtDuplex, bool cleanTmt6Plex,
     bool enableDeIsotoping,
     double fragmentIntensityThreshold, IntensityThresholdType fragmentIntensityThresholdType,
     bool enableTopNPeaksFiltering, int numberOfTopPeaks, TopNPeaksFilteringDomain topNPeaksFilteringDomain, double mzWindow,
     bool groupByActivationEnergyTime,
     bool individualDtaOutput, bool mergedTxtOutput,
     string outputFolder)
 {
     this.rawFilepaths = rawFilepaths;
     this.minimumAssumedPrecursorChargeState = minimumAssumedPrecursorChargeState;
     this.maximumAssumedPrecursorChargeState = maximumAssumedPrecursorChargeState;
     this.enableLockMassRecalibration = enableLockMassRecalibration;
     this.lockMassMZ = lockMassMZ;
     this.kenny = kenny;
     this.enableEtdSpectralPreProcessing = enableEtdSpectralPreProcessing;
     this.cleanItraq4Plex = cleanItraq4Plex;
     this.cleanTmtDuplex = cleanTmtDuplex;
     this.cleanTmt6Plex = cleanTmt6Plex;
     this.enableDeIsotoping = enableDeIsotoping;
     this.fragmentIntensityThreshold = fragmentIntensityThreshold;
     this.fragmentIntensityThresholdType = fragmentIntensityThresholdType;
     this.enableTopNPeaksFiltering = enableTopNPeaksFiltering;
     this.numberOfTopPeaks = numberOfTopPeaks;
     this.topNPeaksFilteringDomain = topNPeaksFilteringDomain;
     this.mzWindow = mzWindow;
     this.groupByActivationEnergyTime = groupByActivationEnergyTime;
     this.individualDtaOutput = individualDtaOutput;
     this.mergedTxtOutput = mergedTxtOutput;
     this.outputFolder = outputFolder;
 }