Package eu.isas.peptideshaker.preferences

Examples of eu.isas.peptideshaker.preferences.FilterPreferences


     */
    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);
View Full Code Here


     */
    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);
View Full Code Here

     */
    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);
View Full Code Here

     */
    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);
View Full Code Here

     */
    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);
View Full Code Here

     */
    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);
View Full Code Here

     */
    public void starPsm(String match) {

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

            if (!validated) {
                for (PsmFilter matchFilter : filterPreferences.getPsmStarFilters().values()) {
                    if (matchFilter.getExceptions().contains(match)) {
                        matchFilter.removeException(match);
                    }
                    if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences())) {
                        validated = true;
                    }
                }
                PsmFilter psmFilter;
                if (!filterPreferences.getPsmStarFilters().containsKey(MatchFilter.MANUAL_SELECTION)) {
                    psmFilter = new PsmFilter(MatchFilter.MANUAL_SELECTION);
                    psmFilter.setCharges(peptideShakerGUI.getMetrics().getFoundCharges());
                    psmFilter.setFileNames(peptideShakerGUI.getIdentification().getSpectrumFiles());
                    psmFilter.setDescription("Manual selection via the graphical interface");
                    filterPreferences.getPsmStarFilters().put(psmFilter.getName(), psmFilter);
                } else {
                    psmFilter = filterPreferences.getPsmStarFilters().get(MatchFilter.MANUAL_SELECTION);
                }
                psmFilter.addManualValidation(match);
            }

            psParameter.setStarred(true);
View Full Code Here

     */
    public void unStarPsm(String match) {

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

            for (PsmFilter matchFilter : filterPreferences.getPsmStarFilters().values()) {
                if (matchFilter.getManualValidation().contains(match)) {
                    matchFilter.removeManualValidation(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences())) {
                    matchFilter.addException(match);
View Full Code Here

     */
    public void hidePsm(String match) {

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

            if (!validated) {
                for (PsmFilter matchFilter : filterPreferences.getPsmHideFilters().values()) {
                    if (matchFilter.getExceptions().contains(match)) {
                        matchFilter.removeException(match);
                    }
                    if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences())) {
                        validated = true;
                    }
                }
                PsmFilter psmFilter;
                if (!filterPreferences.getPsmHideFilters().containsKey(MatchFilter.MANUAL_SELECTION)) {
                    psmFilter = new PsmFilter(MatchFilter.MANUAL_SELECTION);
                    psmFilter.setCharges(peptideShakerGUI.getMetrics().getFoundCharges());
                    psmFilter.setFileNames(peptideShakerGUI.getIdentification().getSpectrumFiles());
                    psmFilter.setDescription("Manual selection via the graphical interface");
                    filterPreferences.getPsmHideFilters().put(psmFilter.getName(), psmFilter);
                } else {
                    psmFilter = filterPreferences.getPsmHideFilters().get(MatchFilter.MANUAL_SELECTION);
                }
                psmFilter.addManualValidation(match);
            }

            psParameter.setHidden(true);
View Full Code Here

     */
    public void unHidePsm(String match) {

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

            for (PsmFilter matchFilter : filterPreferences.getPsmHideFilters().values()) {
                if (matchFilter.getManualValidation().contains(match)) {
                    matchFilter.removeManualValidation(match);
                }
                if (matchFilter.isValidated(match, peptideShakerGUI.getIdentification(), peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences())) {
                    matchFilter.addException(match);
View Full Code Here

TOP

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

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.