Package com.compomics.util.preferences

Examples of com.compomics.util.preferences.UtilitiesUserPreferences


        File fastaFile = searchParameters.getFastaFile();
        if (!fastaFile.exists()) {
            boolean found = false;
            // look in the database folder {
            try {
                UtilitiesUserPreferences utilitiesUserPreferences = UtilitiesUserPreferences.loadUserPreferences();
                File dbFolder = utilitiesUserPreferences.getDbFolder();
                File newFile = new File(dbFolder, fastaFile.getName());
                if (newFile.exists()) {
                    fastaFile = newFile;
                    searchParameters.setFastaFile(fastaFile);
                    found = true;
View Full Code Here


        boolean openSearchGUI = true;

        // check if we have a valid SearchGUI location.
        try {
            UtilitiesUserPreferences utilitiesUserPreferences = UtilitiesUserPreferences.loadUserPreferences();
            if (utilitiesUserPreferences.getSearchGuiPath() == null || !(new File(utilitiesUserPreferences.getSearchGuiPath()).exists())) {
                SearchGuiSetupDialog searchGuiSetupDialog = new SearchGuiSetupDialog(prideReShakeGUI, true);
                openSearchGUI = !searchGuiSetupDialog.isDialogCanceled();
            }
        } catch (Exception e) {
            prideReShakeGUI.getPeptideShakerGUI().catchException(e);
View Full Code Here

            if (fastaFile.exists()) {
                found = true;
            } else {
                // look in the database folder
                try {
                    UtilitiesUserPreferences utilitiesUserPreferences = UtilitiesUserPreferences.loadUserPreferences();
                    File dbFolder = utilitiesUserPreferences.getDbFolder();
                    File newFile = new File(dbFolder, fastaFile.getName());
                    if (newFile.exists()) {
                        fastaFile = newFile;
                        searchParameters.setFastaFile(fastaFile);
                        found = true;
View Full Code Here

            }

            waitingHandler.resetSecondaryProgressCounter();
            waitingHandler.setSecondaryProgressCounterIndeterminate(true);

            UtilitiesUserPreferences userPreferences = UtilitiesUserPreferences.loadUserPreferences();
            int memoryPreference = userPreferences.getMemoryPreference();
            long fileSize = fastaFile.length();
            int fileSizeInMb = Math.max((int) fileSize / 1048576, 1);
            long nSequences;
            if (!sequenceFactory.isDefaultReversed() || fileSizeInMb < memoryPreference / 4) {
                nSequences = sequenceFactory.getNSequences();
View Full Code Here

            for (File file : spectrumFiles) {
                this.spectrumFiles.put(file.getName(), file);
            }

            UtilitiesUserPreferences userPreferences = UtilitiesUserPreferences.loadUserPreferences();
            if (userPreferences.getMemoryPreference() > 2000) {
                peptideMapper = new PeptideMapper(sequenceMatchingPreferences, idFilter, waitingHandler, exceptionHandler);
            }
        }
View Full Code Here

     * @param evt
     */
    private void browseDatabaseSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseDatabaseSettingsActionPerformed

        File startLocation = new File(peptideShakerGUI.getLastSelectedFolder());
        UtilitiesUserPreferences utilitiesUserPreferences = UtilitiesUserPreferences.loadUserPreferences();
        if (utilitiesUserPreferences.getDbFolder() != null && utilitiesUserPreferences.getDbFolder().exists()) {
            startLocation = utilitiesUserPreferences.getDbFolder();
        }

        // First check whether a file has already been selected.
        // If so, start from that file's parent.
        if (databaseSettingsTxt.getText() != null && new File(databaseSettingsTxt.getText()).exists()) {
View Full Code Here

TOP

Related Classes of com.compomics.util.preferences.UtilitiesUserPreferences

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.