Package eu.isas.peptideshaker.scoring.targetdecoy

Examples of eu.isas.peptideshaker.scoring.targetdecoy.TargetDecoyResults


    public static void updateProteinMatchValidationLevel(Identification identification, IdentificationFeaturesGenerator identificationFeaturesGenerator,
            SearchParameters searchParameters, AnnotationPreferences annotationPreferences, ProteinMap proteinMap, String proteinKey)
            throws SQLException, IOException, ClassNotFoundException, InterruptedException, MzMLUnmarshallerException {

        TargetDecoyMap targetDecoyMap = proteinMap.getTargetDecoyMap();
        TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
        double proteinThreshold = targetDecoyResults.getScoreLimit();
        double proteinConfidentThreshold = targetDecoyResults.getConfidenceLimit() + targetDecoyMap.getResolution();

        if (proteinConfidentThreshold > 100) {
            proteinConfidentThreshold = 100;
        }
View Full Code Here


        psParameter = (PSParameter) identification.getPeptideMatchParameter(peptideKey, psParameter);
        psParameter.resetQcResults();

        if (sequenceFactory.concatenatedTargetDecoy()) {
            TargetDecoyMap targetDecoyMap = peptideMap.getTargetDecoyMap(peptideMap.getCorrectedKey(psParameter.getSpecificMapKey()));
            TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
            double peptideThreshold = targetDecoyResults.getScoreLimit();
            double confidenceThreshold = targetDecoyResults.getConfidenceLimit() + targetDecoyMap.getResolution();
            if (confidenceThreshold > 100) {
                confidenceThreshold = 100;
            }
            boolean noValidated = peptideMap.getTargetDecoyMap(peptideMap.getCorrectedKey(psParameter.getSpecificMapKey())).getTargetDecoyResults().noValidated();
            if (!noValidated && psParameter.getPeptideProbabilityScore() <= peptideThreshold) {
View Full Code Here

            double psmThreshold = 0;
            double confidenceThreshold = 100;
            boolean noValidated = true;

            if (targetDecoyMap != null) {
                TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
                psmThreshold = targetDecoyResults.getScoreLimit();
                confidenceThreshold = targetDecoyResults.getConfidenceLimit() + targetDecoyMap.getResolution();
                if (confidenceThreshold > 100) {
                    confidenceThreshold = 100;
                }
                noValidated = targetDecoyResults.noValidated();
            }

            if (!noValidated && psParameter.getPsmProbabilityScore() <= psmThreshold) {

                String spectrumFile = Spectrum.getSpectrumFile(spectrumKey);
View Full Code Here

        psParameter = (PSParameter) tagAssumption.getUrParam(psParameter);

        if (sequenceFactory.concatenatedTargetDecoy()) {

            TargetDecoyMap targetDecoyMap = inputMap.getTargetDecoyMap(tagAssumption.getAdvocate());
            TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
            double seThreshold = targetDecoyResults.getScoreLimit();
            double confidenceThreshold = targetDecoyResults.getConfidenceLimit() + targetDecoyMap.getResolution();

            if (confidenceThreshold > 100) {
                confidenceThreshold = 100;
            }

            boolean noValidated = targetDecoyResults.noValidated();

            if (!noValidated && tagAssumption.getScore() <= seThreshold) { //@TODO: include ascending/descending scores

                String reasonDoubtful = null;
                boolean filterPassed = true;
View Full Code Here

        psParameter.resetQcResults();

        if (sequenceFactory.concatenatedTargetDecoy()) {

            TargetDecoyMap targetDecoyMap = inputMap.getTargetDecoyMap(peptideAssumption.getAdvocate());
            TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
            double seThreshold = targetDecoyResults.getScoreLimit();
            double confidenceThreshold = targetDecoyResults.getConfidenceLimit() + targetDecoyMap.getResolution();

            if (confidenceThreshold > 100) {
                confidenceThreshold = 100;
            }

            boolean noValidated = targetDecoyResults.noValidated();

            if (!noValidated && peptideAssumption.getScore() <= seThreshold) { //@TODO: include ascending/descending scores

                String reasonDoubtful = null;
                boolean filterPassed = true;
View Full Code Here

        } else {
            PSMaps psMaps = new PSMaps();
            psMaps = (PSMaps) identification.getUrParam(psMaps);
            ProteinMap proteinMap = psMaps.getProteinMap();
            TargetDecoyMap targetDecoyMap = proteinMap.getTargetDecoyMap();
            TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();

            double threshold = targetDecoyResults.getUserInput() / 100;
            int thresholdType = targetDecoyResults.getInputType();

            if (thresholdType == 0) {
                writeCvTerm(new CvTerm("PSI-MS", "MS:1002461", "protein group-level global confidence", Double.toString(Util.roundDouble(threshold, CONFIDENCE_DECIMALS)))); // confidence
            } else if (targetDecoyResults.getInputType() == 1) {
                writeCvTerm(new CvTerm("PSI-MS", "MS:1002369", "protein group-level global FDR", Double.toString(Util.roundDouble(threshold, CONFIDENCE_DECIMALS)))); // FDR
            } else if (targetDecoyResults.getInputType() == 2) {
                writeCvTerm(new CvTerm("PSI-MS", "MS:1002460", "protein group-level global FNR", Double.toString(Util.roundDouble(threshold, CONFIDENCE_DECIMALS)))); // FNR
            }
        }
        tabCounter--;
        br.write(getCurrentTabSpace() + "</Threshold>" + System.getProperty("line.separator"));
View Full Code Here

                    break;
                case none:
                    validationStatusLbl.setForeground(Color.gray);
            }

            TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
            String validationThresholdTxt = "";
            double threshold = targetDecoyResults.getUserInput();
            int thresholdType = targetDecoyResults.getInputType();
            if (thresholdType == 0) {
                validationThresholdTxt += "Validation Threshold: " + Util.roundDouble(threshold, 2) + "%";
            } else if (targetDecoyResults.getInputType() == 1) {
                validationThresholdTxt += "FDR Threshold: " + Util.roundDouble(threshold, 2) + "%";
            } else if (targetDecoyResults.getInputType() == 2) {
                validationThresholdTxt += "FNR Threshold: " + Util.roundDouble(threshold, 2) + "%";
            }
            validationThresholdLbl.setText(validationThresholdTxt);

            confidenceLbl.setText("Confidence: " + Util.roundDouble(confidence, 2) + "%");
            double validationThreshold = targetDecoyResults.getConfidenceLimit();
            confidenceThresholdLbl.setText("Expected Confidence: " + Util.roundDouble(validationThreshold, 2) + "%");
            double resolution = targetDecoyMap.getResolution();
            double confidenceThreshold = validationThreshold + resolution;
            if (confidenceThreshold > 100) {
                confidenceThreshold = 100;
View Full Code Here

     *
     * @return the fdr threshold to be used
     */
    private static double getFdrThreshold(PsmSpecificMap psmSpecificMap, int charge, String spectrumFileName, Double fdr) {
        double fdrThreshold;
        TargetDecoyResults currentResults = psmSpecificMap.getTargetDecoyMap(charge, spectrumFileName).getTargetDecoyResults();
        if (fdr == null) {
            if (currentResults.getInputType() == 1) {
                fdrThreshold = currentResults.getUserInput();
            } else {
                fdrThreshold = currentResults.getFdrLimit();
            }
        } else {
            fdrThreshold = fdr;
        }
        return fdrThreshold;
View Full Code Here

     *
     * @return the confidence threshold corresponding to this match at the
     * desired FDR
     */
    private static double getHighConfidenceThreshold(PsmSpecificMap psmSpecificMap, int charge, String spectrumFileName, Double fdrThreshold) {
        TargetDecoyResults trainingResults = new TargetDecoyResults();
        trainingResults.setClassicalEstimators(true);
        trainingResults.setClassicalValidation(true);
        trainingResults.setFdrLimit(fdrThreshold);
        TargetDecoySeries currentSeries = psmSpecificMap.getTargetDecoyMap(charge, spectrumFileName).getTargetDecoySeries();
        currentSeries.getFDRResults(trainingResults);
        return trainingResults.getConfidenceLimit();
    }
View Full Code Here

        if (fnr == null) {
            fnrThreshold = fdrThreshold;
        } else {
            fnrThreshold = fnr;
        }
        TargetDecoyResults trainingResults = new TargetDecoyResults();
        trainingResults.setClassicalEstimators(true);
        trainingResults.setClassicalValidation(true);
        trainingResults.setFnrLimit(fnrThreshold);
        TargetDecoySeries currentSeries = psmSpecificMap.getTargetDecoyMap(charge, spectrumFileName).getTargetDecoySeries();
        currentSeries.getFNRResults(trainingResults);
        return trainingResults.getConfidenceLimit();
    }
View Full Code Here

TOP

Related Classes of eu.isas.peptideshaker.scoring.targetdecoy.TargetDecoyResults

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.