Esempio n. 1
0
        protected void evaluateIdentification(IDs id)
        {
            // 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, xCorrThreshold, dCN);
            performanceEvaluator.evaluateAnalysis(exclusionList, pep);

            // add the peptide to the exclusion list if it is over the xCorr threshold
            if ((xCorr > xCorrThreshold))
            {
                performanceEvaluator.countPeptidesExcluded();
                log.Debug("xCorrThreshold passed. Peptide added to the exclusion list.");
                exclusionList.addPeptide(pep);

                // calibrates our retention time alignment if the observed time is different
                // from the predicted only if it passes this threshold
                calibrateRetentionTime(pep);
            }
            // add all of the other peptides belonging to the parent protein(s) if numDB
            // threshold is passed
            foreach (Protein parentProtein in pep.getProteins())
            {
                if ((parentProtein.getNumDB() >= numDBThreshold) && (!parentProtein.IsExcluded()))
                {
                    parentProtein.setExcluded(true);
                    log.Debug("Parent protein " + parentProtein.getAccession() + " is identified confidently "
                              + parentProtein.getNumDB() + " times!");
                    performanceEvaluator.countProteinsExcluded();
                    exclusionList.addProtein(parentProtein);
                }
                log.Debug(parentProtein);
            }
            log.Debug(pep);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        protected void evaluateIdentification(IDs id)
        {
            log.Debug("RandomExclusion. 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
            Double xCorr = id.getXCorr();
            Double dCN   = id.getDeltaCN();

            pep.addScore(xCorr, 0.0, dCN);
            performanceEvaluator.evaluateAnalysis(exclusionList, pep);
        }
Esempio n. 4
0
        protected void evaluateIdentification(IDs id)
        {
            // check if the peptide is identified or not
            if (id == null)
            {
                performanceEvaluator.countMS2UnidentifiedAnalyzed();
                return;
            }

            Peptide pep = getPeptideFromIdentification(id);             // id is null, it already returned

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

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

            pep.addScore(xCorr, dCN);
#if (!DONTEVALUATE)
            performanceEvaluator.evaluateAnalysis(exclusionList, pep);
#endif

            // exclude this peptide for analysis if the xCorr score is above a threshold
            const double XCORR_THRESHOLD = 2.5;
            // add the peptide to the exclusion list if it is over the xCorr threshold
            if ((xCorr > XCORR_THRESHOLD))
            {
                performanceEvaluator.countPeptidesExcluded();
                log.Debug("xCorrThreshold passed. Peptide added to the exclusion list.");
                exclusionList.addPeptide(pep);
                // calibrates our retention time alignment if the observed time is different
                // from the predicted only if it passes this threshold
                calibrateRetentionTime(pep);
            }

            // Add all the peptides corresponding to the parent protein, if the parent
            // protein is deemed confidently identified by the logisitc regression
            // classifier
            Dictionary <String, Boolean> identificationPredictions = IdentificationFeatureExtractionUtil
                                                                     .assessProteinIdentificationConfidence(pep.getProteins(), lrAccord);

            List <Protein> proteinsToExclude = new List <Protein>();
            foreach (Protein parentProtein in pep.getProteins())
            {
                // prevents repeated exclusion of a protein already excluded
                if ((!parentProtein.IsExcluded()))
                {
                    // determine if parent protein is confidently identified
                    bool isConfidentlyIdentified = identificationPredictions[parentProtein.getAccession()];
                    if (isConfidentlyIdentified)
                    {
                        // exclude all peptides of that protein
                        parentProtein.setExcluded(true);
                        log.Debug("Parent protein " + parentProtein.getAccession() + " is identified confidently "
                                  + parentProtein.getNumDB() + " times!");
                        performanceEvaluator.countProteinsExcluded();
                        proteinsToExclude.Add(parentProtein);
                    }
                }
            }
            exclusionList.addProteins(proteinsToExclude);
        }
        protected void evaluateIdentification(IDs id)
        {
            // check if the peptide is identified or not
            if (id == null)
            {
                performanceEvaluator.countMS2UnidentifiedAnalyzed();
                return;
            }

            Peptide pep = getPeptideFromIdentification(id); // id is null, it already returned

            //log.Info("Peptide Observed Time: {0}\tPredicted Time: {1} -----------------", id.getScanTime(),pep.getRetentionTime().getRetentionTimeStart());


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

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

            pep.addScore(xCorr, dCN);
#if (!DONTEVALUATE)
            performanceEvaluator.evaluateAnalysis(exclusionList, pep);
#endif

            //RetentionTime rt = pep.getRetentionTime();
            //if (!rtCalcPredictedRT.Keys.Contains(pep.getSequence()))
            //{
            //	rtCalcPredictedRT.Add(pep.getSequence(), rt.getRetentionTimePeak());
            //}
            //double[] values = new double[] { id.getScanTime(), id.getXCorr(), rt.getRetentionTimePeak(), rt.getRetentionTimeStart() + GlobalVar.retentionTimeWindowSize, RetentionTime.getRetentionTimeOffset(), rtCalcPredictedRT[pep.getSequence()], rt.IsPredicted() ? 1 : 0 };

            // exclude this peptide for analysis if the xCorr score is above a threshold
            const double XCORR_THRESHOLD = 2.5;
            // add the peptide to the exclusion list if it is over the xCorr threshold
            if ((xCorr > XCORR_THRESHOLD))
            {
                performanceEvaluator.countPeptidesExcluded();
                log.Debug("xCorrThreshold passed. Peptide added to the exclusion list.");
                exclusionList.addPeptide(pep);
                // calibrates our retention time alignment if the observed time is different
                // from the predicted only if it passes this threshold
                calibrateRetentionTime(pep);
            }

            // Add all the peptides corresponding to the parent protein, if the parent
            // protein is deemed confidently identified by the logisitc regression
            // classifier
            Dictionary <String, Boolean> identificationPredictions = IdentificationFeatureExtractionUtil
                                                                     .assessProteinIdentificationConfidence(pep.getProteins(), lrAccord);

            List <Protein> proteinsToExclude = new List <Protein>();
            foreach (Protein parentProtein in pep.getProteins())
            {
                // prevents repeated exclusion of a protein already excluded
                if ((!parentProtein.IsExcluded()))
                {
                    // determine if parent protein is confidently identified
                    bool isConfidentlyIdentified = identificationPredictions[parentProtein.getAccession()];
                    if (isConfidentlyIdentified)
                    {
                        // exclude all peptides of that protein
#if TRACKEXCLUDEDPROTEINFEATURE
                        excludedProteinFeatureList.Add(parentProtein.vectorize().ItemArray);
#endif
                        parentProtein.setExcluded(true);
                        log.Debug("Parent protein " + parentProtein.getAccession() + " is identified confidently "
                                  + parentProtein.getNumDB() + " times!");
                        performanceEvaluator.countProteinsExcluded();
                        proteinsToExclude.Add(parentProtein);
                    }
                }
            }
            exclusionList.addProteins(proteinsToExclude);
        }