Package com.compomics.util.gui.waiting.waitinghandlers

Examples of com.compomics.util.gui.waiting.waitinghandlers.WaitingDialog


                    // Do something here?
                }

                PeptideShakerGUI peptideShakerGUI = new PeptideShakerGUI(); // dummy object to get at the version and tips
                peptideShakerGUI.setUpLogFile(false); // redirect the error stream to the PeptideShaker log file
                waitingHandler = new WaitingDialog(new DummyFrame("PeptideShaker " + PeptideShaker.getVersion(), "/icons/peptide-shaker.gif"),
                        Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker.gif")),
                        Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker-orange.gif")),
                        false, tips, "Importing Data", "PeptideShaker", PeptideShaker.getVersion(), true);
                ((WaitingDialog) waitingHandler).setCloseDialogWhenImportCompletes(false, false);
                ((WaitingDialog) waitingHandler).setLocationRelativeTo(null);
View Full Code Here


            } catch (Exception e) {
                tips = new ArrayList<String>();
                // Do something here?
            }

            WaitingDialog waitingDialog = new WaitingDialog(peptideShakerGUI,
                    Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker.gif")),
                    Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker-orange.gif")),
                    true, tips, "Importing Data", "PeptideShaker", PeptideShaker.getVersion(), true);
            waitingDialog.setCloseDialogWhenImportCompletes(true, true);

            int progressCounter = idFiles.size() + spectrumFiles.size();

            progressCounter++; // establishing the database connection
            progressCounter++; // the FASTA file
            progressCounter++; // the peptide to protein map
            progressCounter += 6; // computing probabilities etc
            progressCounter += 2; // resolving protein inference
            progressCounter += 4; // Correcting protein probabilities, Validating identifications at 1% FDR, Scoring PTMs in peptides, Scoring PTMs in proteins.
            progressCounter += 3; // Scoring PTMs in PSMs. Estimating PTM FLR. Resolving peptide inference issues.

            // add one more just to not start at 0%
            progressCounter++;

            waitingDialog.setMaxPrimaryProgressCounter(progressCounter);
            waitingDialog.increasePrimaryProgressCounter(); // just to not start at 0%

            boolean needDialog = false;

            // load the identification files
            if (idFiles.size() > 0
                    || searchParameters != null
                    || searchParameters.getFastaFile() != null
                    || spectrumFiles.size() > 0) {
                needDialog = true;
                importIdentificationFiles(waitingDialog);
            }

            if (needDialog) {
                try {
                    waitingDialog.setVisible(true);
                } catch (IndexOutOfBoundsException e) {
                    // ignore
                }
                this.dispose();
            }

            if (!needDialog || !waitingDialog.isRunCanceled()) {

                // show the warnings
                Iterator<String> iterator = peptideShaker.getWarnings().keySet().iterator();
                int counter = 0;
                while (iterator.hasNext()) {
                    FeedBack warning = peptideShaker.getWarnings().get(iterator.next());
                    if (warning.getType() == FeedBack.FeedBackType.WARNING) {
                        peptideShakerGUI.addNote("<b>" + ++counter + " " + warning.getTitle() + "</b><br><br>" + warning.getMessage()); // @TODO: better interaction between notes and feedback objetcs...
                    }
                }

                peptideShakerGUI.setProcessingPreferences(processingPreferences);
                peptideShakerGUI.setPtmScoringPreferences(ptmScoringPreferences);
                peptideShakerGUI.setIdFilter(idFilter);
                peptideShakerGUI.updateAnnotationPreferencesFromSearchSettings();
                peptideShakerGUI.setProject(experiment, sample, replicateNumber);
                peptideShakerGUI.setMetrics(peptideShaker.getMetrics());
                peptideShakerGUI.setIdentificationFeaturesGenerator(peptideShaker.getIdentificationFeaturesGenerator());
                peptideShakerGUI.setCache(peptideShaker.getCache());
                peptideShakerGUI.setUpInitialFilters();
                peptideShakerGUI.displayResults();
                peptideShakerGUI.initiateDisplay(); // display the overview tab
                peptideShakerGUI.getProjectDetails().setReport(waitingDialog.getReport(null));
                this.dispose();
            } else if (waitingDialog.isRunCanceled()) {

                // close the database
                try {
                    ProteomicAnalysis proteomicAnalysis = experiment.getAnalysisSet(sample).getProteomicAnalysis(replicateNumber);
                    Identification identification = proteomicAnalysis.getIdentification(IdentificationMethod.MS2_IDENTIFICATION);
View Full Code Here

TOP

Related Classes of com.compomics.util.gui.waiting.waitinghandlers.WaitingDialog

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.