示例#1
0
        private bool isOnCurrentObservedExclusionList(ExclusionList exclusionList, Peptide p)
        {
            exclusionList.retentionTense(p).Equals(ExclusionList.CURRENT_OBSERVED);
            List <Peptide> list = exclusionList.getCurrentObservedPeptides();

            return(containsPeptideSequence(list, p));
        }
示例#2
0
        private bool isOnPastExclusionList(ExclusionList exclusionList, Peptide p)
        {
            return(exclusionList.retentionTense(p).Equals(ExclusionList.PAST));

            List <Peptide> list = exclusionList.getPastExcludedPeptides();

            return(containsPeptideSequence(list, p));
        }
示例#3
0
 public void finalizePerformanceEvaluator(String experimentName, String experimentType, double analysisTime,
                                          double totalRunTime, ExclusionList exclusionList, ProteinProphetResult ppr, int ddaNum, ExclusionProfile exclusionProfile)
 {
     setExperimentName(experimentName, experimentType);
     setExperimentDuration(analysisTime, totalRunTime);
     setExperimentParams();
     setExclusionList(exclusionList);
     postProcessingCalculations(ddaNum, ppr, exclusionProfile);
 }
示例#4
0
        /*
         * Pre-requisite: the peptide p was selected to be excluded from analysis, and
         * thus its mass is on the exclusion list Purpose: check if the sequence of
         * peptide p is truly on the exclusion list or not. If the sequence is not on
         * the exclusion list, then the peptide was incorrectly excluded. This is
         * because the mass is on the current exclusion list
         */
        public void evaluateExclusion(ExclusionList exclusionList, Peptide p)
        {
            log.Debug("Evaluating peptide mass exclusion...");

            //		// // sanity check for the pre-requisite
            //		if (!exclusionList.isExcluded(p.getMass())) {
            //			// log.Warn(
            //			// "ERROR: Theoretical peptide mass was found on the exclusion list, but was
            //			// excluded... the spectra mass does not match the mass of the theoretical
            //			// database.");
            //			numWarnings_EvaluateExclusion++;
            //			// return;
            //		}
#if WRITE_RT_TIME
            WriteRetention(String.Format("EX\t{0}\t{1}", exclusionList.getCurrentTime(), p.getRetentionTime().getRetentionTimeStart()));
#endif
            if (containsPeptideSequence(exclusionList.getExclusionList(), p))
            {
                if (isOnCurrentExclusionList(exclusionList, p))
                {
                    log.Debug("Peptide sequence was found on the exclusion list! This is what we want.");
                    incrementValue(Header.EvaluateExclusion_FoundOnCurrentExclusionList);
                }
                else if (isOnFutureExclusionList(exclusionList, p))
                {
                    log.Debug("Peptide sequence was found on the future exclusion list.");
                    incrementValue(Header.EvaluateExclusion_FoundOnFutureExclusionList);
                }
                else if (isOnPastExclusionList(exclusionList, p))
                {
                    log.Debug("Peptide sequence was found on the past exclusion list.");
                    incrementValue(Header.EvaluateExclusion_FoundOnPastExclusionList);
                }
                else if (isOnPastObservedExclusionList(exclusionList, p))
                {
                    log.Debug("Peptide sequence was found on the past observed exclusion list.");
                    // this means that this peptide sequence was excluded, but not anymore
                    incrementValue(Header.EvaluateExclusion_FoundOnPastObservedExclusionList);
                }
                else if (isOnCurrentObservedExclusionList(exclusionList, p))
                {
                    log.Debug("Peptide sequence was found on the observed exclusion list! This is what we want.");
                    incrementValue(Header.EvaluateExclusion_FoundOnCurrentObservedExclusionList);
                }
            }
            else
            {
                log.Debug("Peptide sequence was not found on any of the lists! It was wrongly excluded!");
                // TODO figure out why this is happening.........
                // Solved: if a peptide not on the ex list has a similar mass within ppm tolorence of a peptide that's supposed to be excluded, this will happen
                incrementValue(Header.EvaluateExclusion_NotFoundOnExclusionList);
            }
            incrementValue(Header.TotalNumEvaluateExclusion);
        }
        private void ExclusionListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ExclusionList ExList = new ExclusionList();

            ExList.PersonalShips = this.PersonalShips;
            if (ExList.ShowDialog(this) == DialogResult.OK)
            {
            }
            LoadExcludedShips();
            ExList.Dispose();
            lblExcludedShips.Text = ExcludedShips.Count.ToString() + " excluded from randomization.";
        }
示例#6
0
        private void setExclusionList(ExclusionList exclusionList)
        {
            int pastSize               = exclusionList.getPastExcludedPeptides().Count;
            int currentSize            = exclusionList.getCurrentExcludedPeptides().Count;
            int futureSize             = exclusionList.getFutureExcludedPeptides().Count;
            int pastObservedSize       = exclusionList.getPastObservedPeptides().Count;
            int currentObservedSize    = exclusionList.getCurrentObservedPeptides().Count;
            int totalExclusionListSize = pastSize + currentSize + futureSize + pastObservedSize + currentObservedSize;

            ChangeValue(Header.ExclusionListPastSize, pastSize);
            ChangeValue(Header.ExclusionListCurrentSize, currentSize);
            ChangeValue(Header.ExclusionListFutureSize, futureSize);
            ChangeValue(Header.ExclusionListPastObserved, pastObservedSize);
            ChangeValue(Header.ExclusionListCurrentObserved, currentObservedSize);
            ChangeValue(Header.ExclusionListFinalTotalSize, totalExclusionListSize);
        }
示例#7
0
        public void massValidator(double spectra_mass, double id_mass, double database_mass, ExclusionList exclusionList)
        {
            // make sure each double falls ewithin ppmTolerance of each other
            bool spectraMassOnExclusionList  = exclusionList.isExcluded(spectra_mass);
            bool idMassOnExclusionList       = exclusionList.isExcluded(id_mass);
            bool databaseMassOnExclusionList = exclusionList.isExcluded(database_mass);

            if (!(spectraMassOnExclusionList && idMassOnExclusionList && databaseMassOnExclusionList))
            {
                log.Debug("$" + spectra_mass + "\t" + id_mass + "\t" + database_mass + "\t" + (spectra_mass - id_mass)
                          + "\t" + (database_mass - id_mass) + "\t" + (spectra_mass - database_mass));
                // spectra_mass id_mass database_mass spec-id db-id spec-db
            }
        }
示例#8
0
        public void evaluateAnalysis(ExclusionList exclusionList, Peptide p)
        {
            log.Debug("Evaluating peptide analysis...");
#if WRITE_RT_TIME
            WriteRetention(String.Format("AN\t{0}\t{1}", exclusionList.getCurrentTime(), p.getRetentionTime().getRetentionTimeStart()));
#endif
            // // sanity check for the pre-requisite
            // if (exclusionList.isExcluded(p.getMass())) {
            // // log.Warn(
            // // "ERROR: Theoretical peptide mass was found on the exclusion list, but was
            // // analyzed... the spectra mass does not match the mass of the theoretical
            // // database.");
            // numWarnings_EvaluateAnalysis++;
            // }

            if (containsPeptideSequence(exclusionList.getExclusionList(), p))
            {
                if (isOnCurrentExclusionList(exclusionList, p))
                {
                    WriteEvaluation("Peptide sequence was found in the current exclusion list, but was analyzed anyways");
                    log.Debug("Peptide sequence was found in the current exclusion list, but was analyzed anyways");
                    log.Debug("Mass of peptide: " + p.getMass());
                    log.Debug("ppmTolerance: " + exclusionList.getPPMTolerance());
                    // this means the ppm mass tolerance is not high enough
                    // it's on the EL but not excluded this is a ppm tolerance problem
                    incrementValue(Header.EvaluateAnalysis_FoundOnCurrentExclusionList);
                }
                else if (isOnFutureExclusionList(exclusionList, p))
                {
                    WriteEvaluation("Peptide sequence was found on the future exclusion list.");
                    log.Debug("Peptide sequence was found on the future exclusion list.");
                    log.Debug("Retention time of peptide: " + p.getRetentionTime());
                    log.Debug("current_time: " + exclusionList.getCurrentTime());
                    // this means that this peptide sequence is to be excluded, but not rn
                    // this is a retention time prediction problem
                    incrementValue(Header.EvaluateAnalysis_FoundOnFutureExclusionList);
                }
                else if (isOnPastExclusionList(exclusionList, p))
                {
                    WriteEvaluation("Peptide sequence was found on the past exclusion list.");
                    log.Debug("Peptide sequence was found on the past exclusion list.");
                    log.Debug("Retention time of peptide: " + p.getRetentionTime());
                    log.Debug("current_time: " + exclusionList.getCurrentTime());
                    // this means that this peptide sequence was excluded, but not anymore
                    // this is a retention time prediction problem
                    incrementValue(Header.EvaluateAnalysis_FoundOnPastExclusionList);
                }
                else if (isOnPastObservedExclusionList(exclusionList, p))
                {
                    WriteEvaluation("Peptide sequence was found on the past observed exclusion list.");
                    log.Debug("Peptide sequence was found on the past observed exclusion list.");
                    // this means that this peptide sequence was excluded, but not anymore
                    incrementValue(Header.EvaluateAnalysis_FoundOnPastObservedExclusionList);
                }
                else if (isOnCurrentObservedExclusionList(exclusionList, p))
                {
                    WriteEvaluation("Peptide sequence was found on the observed exclusion list but was analyzed anyways.");
                    log.Debug("Peptide sequence was found on the observed exclusion list but was analyzed anyways.");
                    log.Debug("Retention time of peptide: " + p.getRetentionTime());
                    log.Debug("current_time: " + exclusionList.getCurrentTime());
                    log.Debug("Mass of peptide: " + p.getMass());
                    log.Debug("ppmTolerance: " + exclusionList.getPPMTolerance());
                    incrementValue(Header.EvaluateAnalysis_FoundOnCurrentObservedExclusionList);
                }
            }
            else
            {
                WriteEvaluation("Peptide sequence was not found on any of the lists!");
                log.Debug("Peptide sequence was not found on any of the lists!");
                incrementValue(Header.EvaluateAnalysis_NotFoundOnExclusionList);
            }
            incrementValue(Header.TotalNumEvaluateAnalysis);
            count++;
        }