Package com.compomics.util.experiment.identification

Examples of com.compomics.util.experiment.identification.Identification


        if (proteinIndex != -1) {

            this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));

            try {
                Identification identification = peptideShakerGUI.getIdentification();
                IdentificationFeaturesGenerator identificationFeaturesGenerator = peptideShakerGUI.getIdentificationFeaturesGenerator();

                String proteinMatchKey = proteinKeys.get(proteinIndex);
                ProteinMatch proteinMatch = identification.getProteinMatch(proteinMatchKey);
                String accession = proteinMatch.getMainMatch();

                try {
                    peptideKeys = identificationFeaturesGenerator.getSortedPeptideKeys(proteinMatchKey);
                } catch (Exception e) {
View Full Code Here


        int aa;

        if (changed) {
            try {
                // save changes in the peptide match
                Identification identification = peptideShakerGUI.getIdentification();
                identification.updatePeptideMatch(peptideMatch);

                // update protein level PTM scoring
                ArrayList<String> proteins = peptideMatch.getTheoreticPeptide().getParentProteins(peptideShakerGUI.getSequenceMatchingPreferences());
                PSMaps psMaps = new PSMaps();
                psMaps = (PSMaps) identification.getUrParam(psMaps);
                PsmPTMMap psmPTMMap = psMaps.getPsmPTMMap();
                PtmScorer ptmScorer = new PtmScorer(psmPTMMap);

                for (String proteinKey : peptideShakerGUI.getIdentification().getProteinIdentification()) {
                    boolean candidate = false;
View Full Code Here

     * @throws java.sql.SQLException
     * @throws java.lang.InterruptedException
     */
    public void starProtein(String match) throws IOException, ClassNotFoundException, SQLException, InterruptedException {
        try {
            Identification identification = peptideShakerGUI.getIdentification();
            FilterPreferences filterPreferences = peptideShakerGUI.getFilterPreferences();
            PSParameter psParameter = new PSParameter();
            psParameter = (PSParameter) identification.getProteinMatchParameter(match, psParameter);
            boolean validated = false;

            for (ProteinFilter matchFilter : filterPreferences.getProteinStarFilters().values()) {
                if (matchFilter.getExceptions().contains(match)) {
                    matchFilter.removeException(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationFeaturesGenerator(), peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences())) {
                    validated = true;
                }
            }

            if (!validated) {
                ProteinFilter proteinFilter;
                if (!filterPreferences.getProteinStarFilters().containsKey(MatchFilter.MANUAL_SELECTION)) {
                    proteinFilter = new ProteinFilter(MatchFilter.MANUAL_SELECTION);
                    proteinFilter.setDescription("Manual selection via the graphical interface");
                    filterPreferences.getProteinStarFilters().put(proteinFilter.getName(), proteinFilter);
                } else {
                    proteinFilter = filterPreferences.getProteinStarFilters().get(MatchFilter.MANUAL_SELECTION);
                }
                proteinFilter.addManualValidation(match);
            }

            psParameter.setStarred(true);
            identification.updateProteinMatchParameter(match, psParameter);
            peptideShakerGUI.setDataSaved(false);
        } catch (Exception e) {
            peptideShakerGUI.catchException(e);
        }
    }
View Full Code Here

     * @throws java.lang.InterruptedException
     */
    public void unStarProtein(String match) throws IOException, ClassNotFoundException, SQLException, InterruptedException {

        try {
            Identification identification = peptideShakerGUI.getIdentification();
            FilterPreferences filterPreferences = peptideShakerGUI.getFilterPreferences();
            PSParameter psParameter = new PSParameter();
            psParameter = (PSParameter) identification.getProteinMatchParameter(match, psParameter);

            for (ProteinFilter matchFilter : filterPreferences.getProteinStarFilters().values()) {
                if (matchFilter.getManualValidation().contains(match)) {
                    matchFilter.removeManualValidation(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationFeaturesGenerator(), peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences())) {
                    matchFilter.addException(match);
                }
            }

            psParameter.setStarred(false);
            identification.updateProteinMatchParameter(match, psParameter);
            peptideShakerGUI.setDataSaved(false);
        } catch (Exception e) {
            peptideShakerGUI.catchException(e);
        }
    }
View Full Code Here

     * @throws java.lang.InterruptedException
     */
    public void hideProtein(String match) throws IOException, ClassNotFoundException, SQLException, InterruptedException {

        try {
            Identification identification = peptideShakerGUI.getIdentification();
            FilterPreferences filterPreferences = peptideShakerGUI.getFilterPreferences();
            PSParameter psParameter = new PSParameter();
            psParameter = (PSParameter) identification.getProteinMatchParameter(match, psParameter);
            boolean validated = false;

            for (ProteinFilter matchFilter : filterPreferences.getProteinHideFilters().values()) {
                if (matchFilter.getExceptions().contains(match)) {
                    matchFilter.removeException(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationFeaturesGenerator(), peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences())) {
                    validated = true;
                }
            }

            if (!validated) {
                ProteinFilter proteinFilter;
                if (!filterPreferences.getProteinHideFilters().containsKey(MatchFilter.MANUAL_SELECTION)) {
                    proteinFilter = new ProteinFilter(MatchFilter.MANUAL_SELECTION);
                    proteinFilter.setDescription("Manual selection via the graphical interface");
                    filterPreferences.getProteinHideFilters().put(proteinFilter.getName(), proteinFilter);
                } else {
                    proteinFilter = filterPreferences.getProteinHideFilters().get(MatchFilter.MANUAL_SELECTION);
                }
                proteinFilter.addManualValidation(match);
            }

            psParameter.setHidden(true);
            identification.updateProteinMatchParameter(match, psParameter);
            peptideShakerGUI.setDataSaved(false);
        } catch (Exception e) {
            peptideShakerGUI.catchException(e);
        }
    }
View Full Code Here

     * @throws java.lang.InterruptedException
     */
    public void unHideProtein(String match) throws IOException, ClassNotFoundException, SQLException, InterruptedException {

        try {
            Identification identification = peptideShakerGUI.getIdentification();
            FilterPreferences filterPreferences = peptideShakerGUI.getFilterPreferences();
            PSParameter psParameter = new PSParameter();
            psParameter = (PSParameter) identification.getProteinMatchParameter(match, psParameter);
            for (ProteinFilter matchFilter : filterPreferences.getProteinHideFilters().values()) {
                if (matchFilter.getManualValidation().contains(match)) {
                    matchFilter.removeManualValidation(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationFeaturesGenerator(), peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences())) {
                    matchFilter.addException(match);
                }
            }

            psParameter.setHidden(true);
            identification.updateProteinMatchParameter(match, psParameter);
            peptideShakerGUI.setDataSaved(false);
        } catch (Exception e) {
            peptideShakerGUI.catchException(e);
        }
    }
View Full Code Here

     * @param match the key of the match
     */
    public void starPeptide(String match) {

        try {
            Identification identification = peptideShakerGUI.getIdentification();
            FilterPreferences filterPreferences = peptideShakerGUI.getFilterPreferences();
            PSParameter psParameter = new PSParameter();
            psParameter = (PSParameter) identification.getPeptideMatchParameter(match, psParameter);
            boolean validated = false;

            for (PeptideFilter matchFilter : filterPreferences.getPeptideStarFilters().values()) {
                if (matchFilter.getExceptions().contains(match)) {
                    matchFilter.removeException(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationFeaturesGenerator())) {
                    validated = true;
                }
            }

            if (!validated) {
                PeptideFilter peptideFilter;
                if (!filterPreferences.getPeptideStarFilters().containsKey(MatchFilter.MANUAL_SELECTION)) {
                    peptideFilter = new PeptideFilter(MatchFilter.MANUAL_SELECTION);
                    peptideFilter.setDescription("Manual selection via the graphical interface");
                    filterPreferences.getPeptideStarFilters().put(peptideFilter.getName(), peptideFilter);
                } else {
                    peptideFilter = filterPreferences.getPeptideStarFilters().get(MatchFilter.MANUAL_SELECTION);
                }
                peptideFilter.addManualValidation(match);
            }

            psParameter.setStarred(true);
            identification.updatePeptideMatchParameter(match, psParameter);
            peptideShakerGUI.setDataSaved(false);
        } catch (Exception e) {
            peptideShakerGUI.catchException(e);
        }
    }
View Full Code Here

     * @param match the key of the match
     */
    public void unStarPeptide(String match) {

        try {
            Identification identification = peptideShakerGUI.getIdentification();
            FilterPreferences filterPreferences = peptideShakerGUI.getFilterPreferences();
            PSParameter psParameter = new PSParameter();
            psParameter = (PSParameter) identification.getPeptideMatchParameter(match, psParameter);

            for (PeptideFilter matchFilter : filterPreferences.getPeptideStarFilters().values()) {
                if (matchFilter.getManualValidation().contains(match)) {
                    matchFilter.removeManualValidation(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationFeaturesGenerator())) {
                    matchFilter.addException(match);
                }
            }

            psParameter.setStarred(false);
            identification.updatePeptideMatchParameter(match, psParameter);
            peptideShakerGUI.setDataSaved(false);
        } catch (Exception e) {
            peptideShakerGUI.catchException(e);
        }
    }
View Full Code Here

     * @param match the key of the match
     */
    public void hidePeptide(String match) {

        try {
            Identification identification = peptideShakerGUI.getIdentification();
            FilterPreferences filterPreferences = peptideShakerGUI.getFilterPreferences();
            PSParameter psParameter = new PSParameter();
            psParameter = (PSParameter) identification.getPeptideMatchParameter(match, psParameter);
            boolean validated = false;

            for (PeptideFilter matchFilter : filterPreferences.getPeptideHideFilters().values()) {
                if (matchFilter.getExceptions().contains(match)) {
                    matchFilter.removeException(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationFeaturesGenerator())) {
                    validated = true;
                }
            }

            if (!validated) {
                PeptideFilter peptideFilter;
                if (!filterPreferences.getPeptideHideFilters().containsKey(MatchFilter.MANUAL_SELECTION)) {
                    peptideFilter = new PeptideFilter(MatchFilter.MANUAL_SELECTION);
                    peptideFilter.setDescription("Manual selection via the graphical interface");
                    filterPreferences.getPeptideHideFilters().put(peptideFilter.getName(), peptideFilter);
                } else {
                    peptideFilter = filterPreferences.getPeptideHideFilters().get(MatchFilter.MANUAL_SELECTION);
                }
                peptideFilter.addManualValidation(match);
            }

            psParameter.setHidden(true);
            identification.updatePeptideMatchParameter(match, psParameter);
            peptideShakerGUI.setDataSaved(false);
        } catch (Exception e) {
            peptideShakerGUI.catchException(e);
        }
    }
View Full Code Here

     * @param match the key of the match
     */
    public void unHidePeptide(String match) {

        try {
            Identification identification = peptideShakerGUI.getIdentification();
            FilterPreferences filterPreferences = peptideShakerGUI.getFilterPreferences();
            PSParameter psParameter = new PSParameter();
            psParameter = (PSParameter) identification.getPeptideMatchParameter(match, psParameter);

            for (PeptideFilter matchFilter : filterPreferences.getPeptideHideFilters().values()) {
                if (matchFilter.getManualValidation().contains(match)) {
                    matchFilter.removeManualValidation(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getIdentificationFeaturesGenerator())) {
                    matchFilter.addException(match);
                }
            }

            psParameter.setHidden(false);
            identification.updatePeptideMatchParameter(match, psParameter);
            peptideShakerGUI.setDataSaved(false);
        } catch (Exception e) {
            peptideShakerGUI.catchException(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.compomics.util.experiment.identification.Identification

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.