Package eu.isas.peptideshaker.preferences

Examples of eu.isas.peptideshaker.preferences.DisplayPreferences


        // backwards compatability for the display preferences
        if (displayPreferences != null) {
            displayPreferences.compatibilityCheck(searchParameters.getModificationProfile());
        } else {
            displayPreferences = new DisplayPreferences();
            displayPreferences.setDefaultSelection(searchParameters.getModificationProfile());
        }

        // backwards compatability for the sequence matching preferences
        if (sequenceMatchingPreferences == null) {
View Full Code Here


    public void clearPreferences() {
        annotationPreferences = new AnnotationPreferences();
        spectrumCountingPreferences = new SpectrumCountingPreferences();
        ptmScoringPreferences = new PTMScoringPreferences();
        filterPreferences = new FilterPreferences();
        displayPreferences = new DisplayPreferences();
        searchParameters = new SearchParameters();
        processingPreferences = new ProcessingPreferences();
        genePreferences = new GenePreferences();
        sequenceMatchingPreferences = null;
        idFilter = new IdFilter();
View Full Code Here

        }

        // remove old labels
        jmolPanel.getViewer().evalString("select all; label off");

        DisplayPreferences displayPreferences = peptideShakerGUI.getDisplayPreferences();

        // annotate the modified covered residues
        for (int i = 0; i < peptideTable.getRowCount() && !progressDialog.isRunCanceled(); i++) {

            peptideKey = peptideTableMap.get(getPeptideIndex(i));
            peptideSequence = Peptide.getSequence(peptideKey);
            aminoAcidPattern = new AminoAcidPattern(peptideSequence);

            ArrayList<ModificationMatch> modifications = new ArrayList<ModificationMatch>();
            try {
                modifications = peptideShakerGUI.getIdentification().getPeptideMatch(peptideKey).getTheoreticPeptide().getModificationMatches();
            } catch (Exception e) {
                peptideShakerGUI.catchException(e);
            }

            for (int peptideTempStart : aminoAcidPattern.getIndexes(proteinSequence, peptideShakerGUI.getSequenceMatchingPreferences())) {
                if (progressDialog.isRunCanceled()) {
                    break;
                }

                int peptideTempEnd = peptideTempStart + peptideSequence.length() - 1;
                int peptideIndex = 1;

                for (int j = peptideTempStart; j < peptideTempEnd && !progressDialog.isRunCanceled(); j++) {
                    for (ModificationMatch modMatch : modifications) {
                        String modName = modMatch.getTheoreticPtm();
                        if (displayPreferences.isDisplayedPTM(modName)) {
                            if (modMatch.getModificationSite() == peptideIndex) {

                                Color ptmColor = peptideShakerGUI.getSearchParameters().getModificationProfile().getColor(modName);

                                jmolPanel.getViewer().evalString(
View Full Code Here

                // get the fixed ptms
                HashMap<Integer, String> fixedPtms = new HashMap<Integer, String>(); // @TODO: note this this only supports one fixed ptm per residue

                Identification identification = peptideShakerGUI.getIdentification();
                identification.loadPeptideMatches(peptideKeys, null);
                DisplayPreferences displayPreferences = peptideShakerGUI.getDisplayPreferences();

                for (String peptideKey : peptideKeys) {
                    boolean modified = false;
                    for (String ptmName : displayPreferences.getDisplayedPtms()) {
                        if (Peptide.isModified(peptideKey, ptmName)) {
                            modified = true;
                            break;
                        }
                    }
                    if (modified) {
                        PeptideMatch peptideMatch = identification.getPeptideMatch(peptideKey);
                        for (ModificationMatch modMatch : peptideMatch.getTheoreticPeptide().getModificationMatches()) {
                            if (!modMatch.isVariable()) {
                                String ptmName = modMatch.getTheoreticPtm();
                                if (displayPreferences.isDisplayedPTM(ptmName)) {
                                    ArrayList<Integer> indexes = sequenceFactory.getProtein(proteinAccession).getPeptideStart(Peptide.getSequence(peptideKey),
                                            peptideShakerGUI.getSequenceMatchingPreferences());
                                    for (Integer index : indexes) {
                                        fixedPtms.put(modMatch.getModificationSite() + index - 2, ptmName);
                                    }
                                }
                            }
                        }
                    }
                }

                for (int aa = 0; aa < sequence.length(); aa++) {

                    String ptmName = fixedPtms.get(aa);
                    for (String variablePTM : psPtmScores.getPtmsAtRepresentativeSite(aa)) {
                        if (displayPreferences.isDisplayedPTM(variablePTM)) {
                            ptmName = variablePTM;
                            break;
                        }
                    }
                    for (String variablePTM : psPtmScores.getConfidentModificationsAt(aa)) {
                        if (displayPreferences.isDisplayedPTM(variablePTM)) {
                            ptmName = variablePTM;
                            break;
                        }
                    }
View Full Code Here

    /**
     * Updates the sequence label based on the selection in the table.
     */
    private void updateSequenceLabel() {
        try {
            DisplayPreferences displayPreferences = peptideShakerGUI.getDisplayPreferences();
            ModificationProfile modificationProfile = peptideShakerGUI.getSearchParameters().getModificationProfile();
            Peptide peptide = peptideMatch.getTheoreticPeptide();
            PSPtmScores ptmScores = new PSPtmScores();
            ptmScores = (PSPtmScores) peptideMatch.getUrParam(ptmScores);
            HashMap<Integer, ArrayList<String>> fixedModifications = DisplayFeaturesGenerator.getFilteredModifications(peptide.getIndexedFixedModifications(), displayPreferences.getDisplayedPtms());
            HashMap<Integer, ArrayList<String>> confidentLocations = DisplayFeaturesGenerator.getFilteredConfidentModificationsSites(ptmScores, displayPreferences.getDisplayedPtms());
            HashMap<Integer, ArrayList<String>> representativeAmbiguousLocations = DisplayFeaturesGenerator.getFilteredAmbiguousModificationsRepresentativeSites(ptmScores, displayPreferences.getDisplayedPtms());
            HashMap<Integer, ArrayList<String>> secondaryAmbiguousLocations = DisplayFeaturesGenerator.getFilteredAmbiguousModificationsRepresentativeSites(ptmScores, displayPreferences.getDisplayedPtms());

            String modName = ptm.getName();
            int aa;

            for (int i = 0; i < mainSelection.length; i++) {
View Full Code Here

TOP

Related Classes of eu.isas.peptideshaker.preferences.DisplayPreferences

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.