Examples of ProteinMatch


Examples of com.compomics.util.experiment.identification.matches.ProteinMatch

                switch (column) {
                    case 0:
                        return row + 1;
                    case 1:
                        ProteinMatch proteinMatch = identification.getProteinMatch(proteinKey);
                        String mainMatch = proteinMatch.getMainMatch();
                        return peptideShakerGUI.getDisplayFeaturesGenerator().addDatabaseLink(mainMatch);
                    case 2:
                        proteinMatch = identification.getProteinMatch(proteinKey);
                        String description = "";
                        try {
                            description = sequenceFactory.getHeader(proteinMatch.getMainMatch()).getSimpleProteinDescription();
                        } catch (Exception e) {
                            peptideShakerGUI.catchException(e);
                        }
                        return description;
                    case 3:
                        HashMap<Integer, Double> sequenceCoverage;
                        try {
                            sequenceCoverage = peptideShakerGUI.getIdentificationFeaturesGenerator().getSequenceCoverage(proteinKey);
                        } catch (Exception e) {
                            peptideShakerGUI.catchException(e);
                            return Double.NaN;
                        }
                        Double sequenceCoverageConfident = 100 * sequenceCoverage.get(MatchValidationLevel.confident.getIndex());
                        Double sequenceCoverageDoubtful = 100 * sequenceCoverage.get(MatchValidationLevel.doubtful.getIndex());
                        Double sequenceCoverageNotValidated = 100 * sequenceCoverage.get(MatchValidationLevel.not_validated.getIndex()); //@TODO: this does not seem to be used?
                        double possibleCoverage = 100;
                        try {
                            possibleCoverage = 100 * peptideShakerGUI.getIdentificationFeaturesGenerator().getObservableCoverage(proteinKey);
                        } catch (Exception e) {
                            peptideShakerGUI.catchException(e);
                        }
                        ArrayList<Double> doubleValues = new ArrayList<Double>();
                        doubleValues.add(sequenceCoverageConfident);
                        doubleValues.add(sequenceCoverageDoubtful);
                        doubleValues.add(sequenceCoverageNotValidated);
                        doubleValues.add(possibleCoverage - sequenceCoverageConfident - sequenceCoverageDoubtful - sequenceCoverageNotValidated);
                        ArrrayListDataPoints arrrayListDataPoints = new ArrrayListDataPoints(doubleValues, JSparklinesArrayListBarChartTableCellRenderer.ValueDisplayType.sumExceptLastNumber);
                        return arrrayListDataPoints;
                    case 4:
                        try {
                            proteinMatch = identification.getProteinMatch(proteinKey);
                            double nConfidentPeptides = peptideShakerGUI.getIdentificationFeaturesGenerator().getNConfidentPeptides(proteinKey);
                            double nDoubtfulPeptides = peptideShakerGUI.getIdentificationFeaturesGenerator().getNValidatedPeptides(proteinKey) - nConfidentPeptides;

                            doubleValues = new ArrayList<Double>();
                            doubleValues.add(nConfidentPeptides);
                            doubleValues.add(nDoubtfulPeptides);
                            doubleValues.add(proteinMatch.getPeptideCount() - nConfidentPeptides - nDoubtfulPeptides);
                            arrrayListDataPoints = new ArrrayListDataPoints(doubleValues, JSparklinesArrayListBarChartTableCellRenderer.ValueDisplayType.sumOfNumbers);
                            return arrrayListDataPoints;
                        } catch (Exception e) {
                            peptideShakerGUI.catchException(e);
                            return Double.NaN;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.