コード例 #1
0
        /*
         * Determines if a peptide's retention time is in the past, future, or present
         * Returns PAST(-1) if the retention window has passed, PRESENT(0) if the
         * retention window is in the future, FUTURE(1) if the retention window is
         * active.
         */
        public String retentionTense(Peptide pep)
        {
            RetentionTime rt         = pep.getRetentionTime();
            bool          isObserved = !rt.IsPredicted();
            double        rtStart    = rt.getRetentionTimeStart();
            double        rtEnd      = rt.getRetentionTimeEnd();

            if (isObserved)
            {
                if (pep.isExcluded(currentTime))
                {
                    return(CURRENT_OBSERVED);
                }
                else
                {
                    return(PAST_OBSERVED);
                }
            }
            else if (pep.isExcluded(currentTime))
            {
                return(PRESENT);
            }
            else if (rtStart > currentTime)
            {
                return(FUTURE);
            }
            else if (rtEnd < currentTime)
            {
                return(PAST);
            }
            return(ERROR);
        }
コード例 #2
0
ファイル: NoExclusion.cs プロジェクト: lonelu/MealTimeMS
        protected void evaluateIdentification(IDs id)
        {
            log.Debug("NoExclusion. Scores added, but nothing added to the exclusion list");

            // check if the peptide is identified or not
            if (id == null)
            {
                performanceEvaluator.countMS2UnidentifiedAnalyzed();
                return;
            }

            Peptide pep = getPeptideFromIdentification(id);             // if it was going to be null, it already returned
            // is fragmented

            // add decoy or non-existent protein connections
            // database.addProteinFromIdentification(pep, id.getParentProteinAccessions());

            Double xCorr = id.getXCorr();
            Double dCN   = id.getDeltaCN();

            pep.addScore(xCorr, 0.0, dCN);
            performanceEvaluator.evaluateAnalysis(exclusionList, pep);



            RetentionTime rt = pep.getRetentionTime();

            if (!rtCalcPredictedRT.Keys.Contains(pep.getSequence()))
            {
                rtCalcPredictedRT.Add(pep.getSequence(), rt.getRetentionTimePeak());
            }

            ObservedPeptideRtTrackerObject observedPep = new ObservedPeptideRtTrackerObject(pep.getSequence(), id.getScanTime(), id.getXCorr(),
                                                                                            rt.getRetentionTimePeak(), rt.getRetentionTimeStart() + GlobalVar.retentionTimeWindowSize,
                                                                                            RetentionTime.getRetentionTimeOffset(), rtCalcPredictedRT[pep.getSequence()], (rt.IsPredicted() ? 1 : 0));



            if ((xCorr > 2.5))
            {
                // calibrates our retention time alignment if the observed time is different
                // from the predicted only if it passes this threshold
                calibrateRetentionTime(pep);
            }
            observedPep.offset = RetentionTime.getRetentionTimeOffset();
            peptideIDRT.Add(observedPep);
        }