Search in sources :

Example 1 with MatchesValidator

use of eu.isas.peptideshaker.validation.MatchesValidator in project peptide-shaker by compomics.

the class PeptideShaker method createProject.

/**
 * Creates a PeptideShaker project.
 *
 * @param waitingHandler the handler displaying feedback to the user
 * @param exceptionHandler handler for exceptions
 * @param identificationParameters the identification parameters
 * @param processingParameters the processing parameters
 * @param projectType the project type
 * @param spectrumCountingParameters the spectrum counting parameters
 * @param spectrumProvider the spectrum provider
 * @param setWaitingHandlerFinshedWhenDone if true, the waiting handler is
 * set to finished when the project is created
 * @param projectDetails the project details
 *
 * @throws java.lang.InterruptedException exception thrown if a thread gets
 * interrupted
 * @throws java.util.concurrent.TimeoutException exception thrown if a
 * process times out
 * @throws java.io.IOException if an exception occurs when parsing files
 */
public void createProject(IdentificationParameters identificationParameters, ProcessingParameters processingParameters, SpectrumCountingParameters spectrumCountingParameters, SpectrumProvider spectrumProvider, ProjectDetails projectDetails, ProjectType projectType, WaitingHandler waitingHandler, boolean setWaitingHandlerFinshedWhenDone, ExceptionHandler exceptionHandler) throws InterruptedException, TimeoutException, IOException {
    identification.getObjectsDB().commit();
    identificationFeaturesGenerator = new IdentificationFeaturesGenerator(identification, identificationParameters, sequenceProvider, spectrumProvider, metrics, spectrumCountingParameters);
    matchesValidator = new MatchesValidator(new TargetDecoyMap(), new TargetDecoyMap(), new TargetDecoyMap());
    if (waitingHandler.isRunCanceled()) {
        return;
    }
    PsmScoringParameters psmScoringPreferences = identificationParameters.getPsmScoringParameters();
    FastaParameters fastaParameters = identificationParameters.getFastaParameters();
    FastaSummary fastaSummary = FastaSummary.getSummary(projectDetails.getFastaFile(), fastaParameters, waitingHandler);
    // set the background species
    identificationParameters.getGeneParameters().setBackgroundSpeciesFromFastaSummary(fastaSummary);
    ArrayList<Integer> usedAlgorithms = projectDetails.getIdentificationAlgorithms();
    if (psmScoringPreferences.isScoringNeeded(usedAlgorithms)) {
        waitingHandler.appendReport("Estimating PSM scores.", true, true);
        PsmScorer psmScorer = new PsmScorer(fastaParameters, sequenceProvider, spectrumProvider);
        psmScorer.estimateIntermediateScores(identification, inputMap, processingParameters, identificationParameters, waitingHandler, exceptionHandler);
        if (psmScoringPreferences.isTargetDecoyNeededForPsmScoring(usedAlgorithms)) {
            if (fastaParameters.isTargetDecoy()) {
                waitingHandler.appendReport("Estimating intermediate scores probabilities.", true, true);
                psmScorer.estimateIntermediateScoreProbabilities(identification, inputMap, processingParameters, waitingHandler);
            } else {
                waitingHandler.appendReport("No decoy sequences found. Impossible to " + "estimate intermediate scores probabilities.", true, true);
            }
        }
        waitingHandler.appendReport("Scoring PSMs.", true, true);
        psmScorer.scorePsms(identification, inputMap, processingParameters, identificationParameters, waitingHandler);
    }
    identification.getObjectsDB().commit();
    System.gc();
    if (fastaParameters.isTargetDecoy()) {
        waitingHandler.appendReport("Computing assumptions probabilities.", true, true);
    } else {
        waitingHandler.appendReport("Importing assumptions scores.", true, true);
    }
    inputMap.estimateProbabilities(waitingHandler);
    waitingHandler.increasePrimaryProgressCounter();
    if (waitingHandler.isRunCanceled()) {
        return;
    }
    identification.getObjectsDB().commit();
    System.gc();
    waitingHandler.appendReport("Saving assumptions probabilities, selecting best match, scoring modification localization.", true, true);
    PsmProcessor psmProcessor = new PsmProcessor(identification);
    psmProcessor.processPsms(inputMap, identificationParameters, matchesValidator, modificationLocalizationScorer, sequenceProvider, spectrumProvider, modificationFactory, proteinCount, processingParameters.getnThreads(), waitingHandler, exceptionHandler);
    waitingHandler.increasePrimaryProgressCounter();
    if (waitingHandler.isRunCanceled()) {
        return;
    }
    identification.getObjectsDB().commit();
    System.gc();
    waitingHandler.appendReport("Computing PSM probabilities.", true, true);
    matchesValidator.getPsmMap().estimateProbabilities(waitingHandler);
    if (waitingHandler.isRunCanceled()) {
        return;
    }
    identification.getObjectsDB().commit();
    System.gc();
    if (projectType == ProjectType.peptide || projectType == ProjectType.protein) {
        PeptideInference peptideInference = new PeptideInference();
        ModificationLocalizationParameters modificationScoringPreferences = identificationParameters.getModificationLocalizationParameters();
        if (modificationScoringPreferences.getAlignNonConfidentModifications()) {
            waitingHandler.appendReport("Resolving peptide inference issues.", true, true);
            peptideInference.peptideInference(identification, identificationParameters, sequenceProvider, modificationFactory, waitingHandler);
            waitingHandler.increasePrimaryProgressCounter();
            if (waitingHandler.isRunCanceled()) {
                return;
            }
        }
        identification.getObjectsDB().commit();
        System.gc();
    }
    String reportTxt = "Saving probabilities";
    String waitingTitle = "Saving Probabilities.";
    ;
    switch(projectType) {
        case psm:
            reportTxt += ".";
            break;
        case peptide:
            reportTxt += ", building peptides.";
            waitingTitle += " Building Peptides.";
            break;
        default:
            reportTxt += ", building peptides and proteins.";
            waitingTitle += " Building Peptides and Proteins.";
    }
    waitingHandler.appendReport(reportTxt, true, true);
    waitingHandler.setWaitingText(waitingTitle + " Please Wait...");
    attachSpectrumProbabilitiesAndBuildPeptidesAndProteins(sequenceProvider, identificationParameters.getSequenceMatchingParameters(), projectType, fastaParameters, waitingHandler);
    waitingHandler.increasePrimaryProgressCounter();
    if (waitingHandler.isRunCanceled()) {
        return;
    }
    identification.getObjectsDB().commit();
    System.gc();
    if (projectType == ProjectType.peptide || projectType == ProjectType.protein) {
        waitingHandler.appendReport("Generating peptide map.", true, true);
        matchesValidator.fillPeptideMaps(identification, metrics, waitingHandler, identificationParameters, sequenceProvider, spectrumProvider);
        if (waitingHandler.isRunCanceled()) {
            return;
        }
        identification.getObjectsDB().commit();
        System.gc();
        waitingHandler.appendReport("Computing peptide probabilities.", true, true);
        matchesValidator.getPeptideMap().estimateProbabilities(waitingHandler);
        if (waitingHandler.isRunCanceled()) {
            return;
        }
        identification.getObjectsDB().commit();
        System.gc();
        waitingHandler.appendReport("Saving peptide probabilities.", true, true);
        matchesValidator.attachPeptideProbabilities(identification, fastaParameters, waitingHandler);
        waitingHandler.increasePrimaryProgressCounter();
        if (waitingHandler.isRunCanceled()) {
            return;
        }
        identification.getObjectsDB().commit();
        System.gc();
        if (projectType == ProjectType.protein) {
            if (identificationParameters.getProteinInferenceParameters().getSimplifyGroups()) {
                waitingHandler.appendReport("Simplifying protein groups.", true, true);
                GroupSimplification groupSimplification = new GroupSimplification();
                groupSimplification.removeRedundantGroups(identification, identificationParameters, sequenceProvider, proteinDetailsProvider, waitingHandler);
                waitingHandler.increasePrimaryProgressCounter();
                if (waitingHandler.isRunCanceled()) {
                    return;
                }
            }
            identification.getObjectsDB().commit();
            System.gc();
            ProteinInference proteinInference = new ProteinInference();
            waitingHandler.appendReport("Mapping shared peptides.", true, true);
            proteinInference.distributeSharedPeptides(identification, waitingHandler);
            waitingHandler.increasePrimaryProgressCounter();
            if (waitingHandler.isRunCanceled()) {
                return;
            }
            identification.getObjectsDB().commit();
            System.gc();
            waitingHandler.appendReport("Generating protein map.", true, true);
            matchesValidator.fillProteinMap(identification, spectrumProvider, waitingHandler);
            waitingHandler.increasePrimaryProgressCounter();
            if (waitingHandler.isRunCanceled()) {
                return;
            }
            identification.getObjectsDB().commit();
            System.gc();
            waitingHandler.appendReport("Selecting leading proteins, inferring peptide and protein inference status.", true, true);
            proteinInference.inferPiStatus(identification, metrics, matchesValidator.getProteinMap(), identificationParameters, sequenceProvider, proteinDetailsProvider, waitingHandler);
            waitingHandler.increasePrimaryProgressCounter();
            if (waitingHandler.isRunCanceled()) {
                return;
            }
            identification.getObjectsDB().commit();
            System.gc();
            waitingHandler.appendReport("Computing protein probabilities.", true, true);
            matchesValidator.getProteinMap().estimateProbabilities(waitingHandler);
            if (waitingHandler.isRunCanceled()) {
                return;
            }
            identification.getObjectsDB().commit();
            System.gc();
            waitingHandler.appendReport("Saving protein probabilities.", true, true);
            matchesValidator.attachProteinProbabilities(identification, sequenceProvider, fastaParameters, metrics, waitingHandler, identificationParameters.getFractionParameters());
            waitingHandler.increasePrimaryProgressCounter();
            if (waitingHandler.isRunCanceled()) {
                return;
            }
            identification.getObjectsDB().commit();
            System.gc();
        }
    }
    if (fastaParameters.isTargetDecoy()) {
        IdMatchValidationParameters idMatchValidationParameters = identificationParameters.getIdValidationParameters();
        if (idMatchValidationParameters.getDefaultPsmFDR() == 1 && idMatchValidationParameters.getDefaultPeptideFDR() == 1 && idMatchValidationParameters.getDefaultProteinFDR() == 1) {
            waitingHandler.appendReport("Validating identifications at 1% FDR, quality control of matches.", true, true);
        } else {
            waitingHandler.appendReport("Validating identifications, quality control of matches.", true, true);
        }
    } else {
        waitingHandler.appendReport("Quality control of matches.", true, true);
    }
    matchesValidator.validateIdentifications(identification, metrics, inputMap, waitingHandler, exceptionHandler, identificationFeaturesGenerator, sequenceProvider, proteinDetailsProvider, spectrumProvider, geneMaps, identificationParameters, projectType, processingParameters);
    waitingHandler.increasePrimaryProgressCounter();
    if (waitingHandler.isRunCanceled()) {
        return;
    }
    identification.getObjectsDB().commit();
    System.gc();
    if (projectType == ProjectType.peptide || projectType == ProjectType.protein) {
        waitingHandler.appendReport("Scoring PTMs in peptides.", true, true);
        modificationLocalizationScorer.scorePeptidePtms(identification, modificationFactory, waitingHandler, identificationParameters);
        waitingHandler.increasePrimaryProgressCounter();
        if (waitingHandler.isRunCanceled()) {
            return;
        }
        identification.getObjectsDB().commit();
        System.gc();
        if (projectType == ProjectType.protein) {
            waitingHandler.appendReport("Estimating spectrum counting scaling values.", true, true);
            ScalingFactorsEstimators scalingFactors = new ScalingFactorsEstimators(spectrumCountingParameters);
            scalingFactors.estimateScalingFactors(identification, metrics, sequenceProvider, identificationFeaturesGenerator, waitingHandler, exceptionHandler, processingParameters);
            waitingHandler.increasePrimaryProgressCounter();
            if (waitingHandler.isRunCanceled()) {
                return;
            }
            identification.getObjectsDB().commit();
            System.gc();
            waitingHandler.appendReport("Scoring PTMs in proteins, gathering summary metrics.", true, true);
            ProteinProcessor proteinProcessor = new ProteinProcessor(identification, identificationParameters, identificationFeaturesGenerator, sequenceProvider);
            proteinProcessor.processProteins(modificationLocalizationScorer, metrics, modificationFactory, waitingHandler, exceptionHandler, processingParameters);
            waitingHandler.increasePrimaryProgressCounter();
            if (waitingHandler.isRunCanceled()) {
                return;
            }
            identification.getObjectsDB().commit();
            System.gc();
        }
    }
    projectCreationDuration.end();
    String report = "Identification processing completed (" + projectCreationDuration.toString() + ").";
    waitingHandler.appendReport(report, true, true);
    waitingHandler.appendReportEndLine();
    waitingHandler.appendReportEndLine();
    identification.addUrParam(new PSMaps(inputMap, matchesValidator.getPsmMap(), matchesValidator.getPeptideMap(), matchesValidator.getProteinMap()));
    if (setWaitingHandlerFinshedWhenDone) {
        waitingHandler.setRunFinished();
    }
}
Also used : ProteinInference(eu.isas.peptideshaker.protein_inference.ProteinInference) IdentificationFeaturesGenerator(com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator) PeptideInference(com.compomics.util.experiment.identification.peptide_inference.PeptideInference) MatchesValidator(eu.isas.peptideshaker.validation.MatchesValidator) ScalingFactorsEstimators(com.compomics.util.experiment.quantification.spectrumcounting.ScalingFactorsEstimators) PSMaps(eu.isas.peptideshaker.scoring.PSMaps) IdMatchValidationParameters(com.compomics.util.parameters.identification.advanced.IdMatchValidationParameters) FastaSummary(com.compomics.util.experiment.io.biology.protein.FastaSummary) PsmScorer(eu.isas.peptideshaker.scoring.psm_scoring.PsmScorer) TargetDecoyMap(eu.isas.peptideshaker.scoring.targetdecoy.TargetDecoyMap) PsmScoringParameters(com.compomics.util.parameters.identification.advanced.PsmScoringParameters) ModificationLocalizationParameters(com.compomics.util.parameters.identification.advanced.ModificationLocalizationParameters) ProteinProcessor(eu.isas.peptideshaker.processing.ProteinProcessor) GroupSimplification(eu.isas.peptideshaker.protein_inference.GroupSimplification) FastaParameters(com.compomics.util.experiment.io.biology.protein.FastaParameters) PsmProcessor(eu.isas.peptideshaker.processing.PsmProcessor)

Example 2 with MatchesValidator

use of eu.isas.peptideshaker.validation.MatchesValidator in project peptide-shaker by compomics.

the class PeptideShakerGUI method validationQcMenuItemActionPerformed.

// GEN-LAST:event_configurationFilesSettingsActionPerformed
/**
 * Open the ValidationQCPreferencesDialog.
 *
 * @param evt
 */
private void validationQcMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_validationQcMenuItemActionPerformed
    final IdMatchValidationParameters idValidationParameters = getIdentificationParameters().getIdValidationParameters();
    final ValidationQcParameters validationQCParameters = idValidationParameters.getValidationQCParameters();
    ValidationQCParametersDialog validationQCParametersDialog = new ValidationQCParametersDialog(this, validationQCParameters, getIdentificationParameters().getSearchParameters().getModificationParameters().getAllModifications(), true);
    if (!validationQCParametersDialog.isCanceled()) {
        ValidationQcParameters newParameters = validationQCParametersDialog.getValidationQCParameters();
        if (!newParameters.isSameAs(validationQCParameters)) {
            idValidationParameters.setValidationQCParameters(newParameters);
            // Update the assumptions QC filters
            for (Filter filter : newParameters.getPsmFilters()) {
                PsmFilter psmFilter = (PsmFilter) filter;
                AssumptionFilter assumptionFilter = psmFilter.getAssumptionFilter();
                assumptionFilter.clear();
                for (String itemName : psmFilter.getItemsNames()) {
                    assumptionFilter.setFilterItem(itemName, psmFilter.getComparatorForItem(itemName), psmFilter.getValue(itemName));
                }
            }
            progressDialog = new ProgressDialogX(PeptideShakerGUI.this, Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker.gif")), Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker-orange.gif")), true);
            progressDialog.setTitle("Validating. Please Wait...");
            progressDialog.setPrimaryProgressCounterIndeterminate(false);
            new Thread(new Runnable() {

                public void run() {
                    try {
                        progressDialog.setVisible(true);
                    } catch (IndexOutOfBoundsException e) {
                    // ignore
                    }
                }
            }, "ProgressDialog").start();
            new Thread("RecalculateThread") {

                @Override
                public void run() {
                    PeptideShakerGUI peptideShakerGUI = PeptideShakerGUI.this;
                    try {
                        PSMaps pSMaps = new PSMaps();
                        pSMaps = (PSMaps) peptideShakerGUI.getIdentification().getUrParam(pSMaps);
                        MatchesValidator matchesValidator = new MatchesValidator(pSMaps.getPsmMap(), pSMaps.getPeptideMap(), pSMaps.getProteinMap());
                        matchesValidator.validateIdentifications(peptideShakerGUI.getIdentification(), peptideShakerGUI.getMetrics(), pSMaps.getInputMap(), progressDialog, exceptionHandler, peptideShakerGUI.getIdentificationFeaturesGenerator(), peptideShakerGUI.getSequenceProvider(), peptideShakerGUI.getProteinDetailsProvider(), peptideShakerGUI.getSpectrumProvider(), peptideShakerGUI.getGeneMaps(), peptideShakerGUI.getIdentificationParameters(), peptideShakerGUI.getProjectType(), peptideShakerGUI.getProcessingParameters());
                        progressDialog.setPrimaryProgressCounterIndeterminate(true);
                        ProteinProcessor proteinProcessor = new ProteinProcessor(peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationParameters(), peptideShakerGUI.getIdentificationFeaturesGenerator(), peptideShakerGUI.getSequenceProvider());
                        proteinProcessor.processProteins(new ModificationLocalizationScorer(), peptideShakerGUI.getMetrics(), modificationFactory, progressDialog, peptideShakerGUI.getExceptionHandler(), peptideShakerGUI.getProcessingParameters());
                        if (!progressDialog.isRunCanceled()) {
                            // update the other tabs
                            peptideShakerGUI.getMetrics().setnValidatedProteins(-1);
                            peptideShakerGUI.getMetrics().setnConfidentProteins(-1);
                            peptideShakerGUI.setUpdated(PeptideShakerGUI.OVER_VIEW_TAB_INDEX, false);
                            peptideShakerGUI.setUpdated(PeptideShakerGUI.PROTEIN_FRACTIONS_TAB_INDEX, false);
                            peptideShakerGUI.setUpdated(PeptideShakerGUI.STRUCTURES_TAB_INDEX, false);
                            peptideShakerGUI.setUpdated(PeptideShakerGUI.MODIFICATIONS_TAB_INDEX, false);
                            peptideShakerGUI.setUpdated(PeptideShakerGUI.QC_PLOTS_TAB_INDEX, false);
                            peptideShakerGUI.setUpdated(PeptideShakerGUI.SPECTRUM_ID_TAB_INDEX, false);
                            peptideShakerGUI.setDataSaved(false);
                        } else {
                            idValidationParameters.setValidationQCParameters(validationQCParameters);
                        }
                    } catch (Exception e) {
                        peptideShakerGUI.catchException(e);
                    }
                    progressDialog.setRunFinished();
                    PeptideShakerGUI.this.repaintPanels();
                }
            }.start();
        }
    }
}
Also used : MatchesValidator(eu.isas.peptideshaker.validation.MatchesValidator) PSMaps(eu.isas.peptideshaker.scoring.PSMaps) IdMatchValidationParameters(com.compomics.util.parameters.identification.advanced.IdMatchValidationParameters) ModificationLocalizationScorer(eu.isas.peptideshaker.ptm.ModificationLocalizationScorer) AssumptionFilter(com.compomics.util.experiment.identification.filtering.AssumptionFilter) ConnectException(java.net.ConnectException) UnknownHostException(java.net.UnknownHostException) ProgressDialogX(com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX) PsmFilter(com.compomics.util.experiment.identification.filtering.PsmFilter) FileFilter(javax.swing.filechooser.FileFilter) Filter(com.compomics.util.experiment.filtering.Filter) FileAndFileFilter(com.compomics.util.gui.file_handling.FileAndFileFilter) AssumptionFilter(com.compomics.util.experiment.identification.filtering.AssumptionFilter) ValidationQcParameters(com.compomics.util.parameters.identification.advanced.ValidationQcParameters) ProteinProcessor(eu.isas.peptideshaker.processing.ProteinProcessor) PsmFilter(com.compomics.util.experiment.identification.filtering.PsmFilter) ValidationQCParametersDialog(com.compomics.util.gui.parameters.identification.advanced.ValidationQCParametersDialog)

Example 3 with MatchesValidator

use of eu.isas.peptideshaker.validation.MatchesValidator in project peptide-shaker by compomics.

the class ValidationPanel method validateButtonActionPerformed.

// GEN-LAST:event_formComponentResized
/**
 * Validate the data using the current settings.
 *
 * @param evt
 */
private void validateButtonActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_validateButtonActionPerformed
    double lastThreshold = Double.valueOf(thresholdInput.getText());
    thresholdInputActionPerformed(null);
    if (lastThreshold < 0 || lastThreshold > 100) {
        JOptionPane.showMessageDialog(this, "Please verify the given threshold. Interval: [0, 100].", "Threshold Error", JOptionPane.WARNING_MESSAGE);
    } else {
        progressDialog = new ProgressDialogX(peptideShakerGUI, Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker.gif")), Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker-orange.gif")), true);
        progressDialog.setTitle("Recalculating. Please Wait...");
        progressDialog.setPrimaryProgressCounterIndeterminate(false);
        new Thread(new Runnable() {

            public void run() {
                try {
                    progressDialog.setVisible(true);
                } catch (IndexOutOfBoundsException e) {
                // ignore
                }
            }
        }, "ProgressDialog").start();
        new Thread("RecalculateThread") {

            @Override
            public void run() {
                try {
                    PSMaps pSMaps = new PSMaps();
                    pSMaps = (PSMaps) peptideShakerGUI.getIdentification().getUrParam(pSMaps);
                    MatchesValidator matchesValidator = new MatchesValidator(pSMaps.getPsmMap(), pSMaps.getPeptideMap(), pSMaps.getProteinMap());
                    matchesValidator.validateIdentifications(peptideShakerGUI.getIdentification(), peptideShakerGUI.getMetrics(), pSMaps.getInputMap(), progressDialog, peptideShakerGUI.getExceptionHandler(), peptideShakerGUI.getIdentificationFeaturesGenerator(), peptideShakerGUI.getSequenceProvider(), peptideShakerGUI.getProteinDetailsProvider(), peptideShakerGUI.getSpectrumProvider(), peptideShakerGUI.getGeneMaps(), peptideShakerGUI.getIdentificationParameters(), peptideShakerGUI.getProjectType(), peptideShakerGUI.getProcessingParameters());
                    progressDialog.setPrimaryProgressCounterIndeterminate(true);
                    if (peptideShakerGUI.getProjectType() == ProjectType.protein) {
                        ProteinProcessor proteinProcessor = new ProteinProcessor(peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationParameters(), peptideShakerGUI.getIdentificationFeaturesGenerator(), peptideShakerGUI.getSequenceProvider());
                        proteinProcessor.processProteins(new ModificationLocalizationScorer(), peptideShakerGUI.getMetrics(), modificationFactory, progressDialog, peptideShakerGUI.getExceptionHandler(), peptideShakerGUI.getProcessingParameters());
                    }
                    if (!progressDialog.isRunCanceled()) {
                        // update the other tabs
                        peptideShakerGUI.getMetrics().setnValidatedProteins(-1);
                        peptideShakerGUI.getMetrics().setnConfidentProteins(-1);
                        peptideShakerGUI.setUpdated(PeptideShakerGUI.OVER_VIEW_TAB_INDEX, false);
                        peptideShakerGUI.setUpdated(PeptideShakerGUI.PROTEIN_FRACTIONS_TAB_INDEX, false);
                        peptideShakerGUI.setUpdated(PeptideShakerGUI.STRUCTURES_TAB_INDEX, false);
                        peptideShakerGUI.setUpdated(PeptideShakerGUI.MODIFICATIONS_TAB_INDEX, false);
                        peptideShakerGUI.setUpdated(PeptideShakerGUI.QC_PLOTS_TAB_INDEX, false);
                        peptideShakerGUI.setUpdated(PeptideShakerGUI.SPECTRUM_ID_TAB_INDEX, false);
                        dataValidated = true;
                        validateButton.setEnabled(false);
                        double input = Double.valueOf(thresholdInput.getText());
                        int inputType = thresholdTypeCmb.getSelectedIndex();
                        TargetDecoyResults currentResults = currentTargetDecoyMap.getTargetDecoyResults();
                        currentResults.setUserInput(input);
                        currentResults.setInputType(inputType);
                        String selectedGroup = (String) groupSelectionTable.getValueAt(groupSelectionTable.getSelectedRow(), 1);
                        originalThresholds.put(selectedGroup, input);
                        originalThresholdTypes.put(selectedGroup, inputType);
                        peptideShakerGUI.setDataSaved(false);
                    } else {
                    // @TODO: ideally the validation settings ought to be reset as well..?
                    }
                } catch (Exception e) {
                    peptideShakerGUI.catchException(e);
                }
                progressDialog.setRunFinished();
            }
        }.start();
    }
}
Also used : MatchesValidator(eu.isas.peptideshaker.validation.MatchesValidator) PSMaps(eu.isas.peptideshaker.scoring.PSMaps) ModificationLocalizationScorer(eu.isas.peptideshaker.ptm.ModificationLocalizationScorer) ProgressDialogX(com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX) ProteinProcessor(eu.isas.peptideshaker.processing.ProteinProcessor) TargetDecoyResults(eu.isas.peptideshaker.scoring.targetdecoy.TargetDecoyResults)

Aggregations

ProteinProcessor (eu.isas.peptideshaker.processing.ProteinProcessor)3 PSMaps (eu.isas.peptideshaker.scoring.PSMaps)3 MatchesValidator (eu.isas.peptideshaker.validation.MatchesValidator)3 ProgressDialogX (com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX)2 IdMatchValidationParameters (com.compomics.util.parameters.identification.advanced.IdMatchValidationParameters)2 ModificationLocalizationScorer (eu.isas.peptideshaker.ptm.ModificationLocalizationScorer)2 Filter (com.compomics.util.experiment.filtering.Filter)1 IdentificationFeaturesGenerator (com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator)1 AssumptionFilter (com.compomics.util.experiment.identification.filtering.AssumptionFilter)1 PsmFilter (com.compomics.util.experiment.identification.filtering.PsmFilter)1 PeptideInference (com.compomics.util.experiment.identification.peptide_inference.PeptideInference)1 FastaParameters (com.compomics.util.experiment.io.biology.protein.FastaParameters)1 FastaSummary (com.compomics.util.experiment.io.biology.protein.FastaSummary)1 ScalingFactorsEstimators (com.compomics.util.experiment.quantification.spectrumcounting.ScalingFactorsEstimators)1 FileAndFileFilter (com.compomics.util.gui.file_handling.FileAndFileFilter)1 ValidationQCParametersDialog (com.compomics.util.gui.parameters.identification.advanced.ValidationQCParametersDialog)1 ModificationLocalizationParameters (com.compomics.util.parameters.identification.advanced.ModificationLocalizationParameters)1 PsmScoringParameters (com.compomics.util.parameters.identification.advanced.PsmScoringParameters)1 ValidationQcParameters (com.compomics.util.parameters.identification.advanced.ValidationQcParameters)1 PsmProcessor (eu.isas.peptideshaker.processing.PsmProcessor)1