Package com.compomics.util.experiment.identification

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


                spectrum.setPeakWaterMarkColor(peptideShakerGUI.getUtilitiesUserPreferences().getSpectrumBackgroundPeakColor());
                spectrum.setPeakWidth(peptideShakerGUI.getUtilitiesUserPreferences().getSpectrumAnnotatedPeakWidth());
                spectrum.setBackgroundPeakWidth(peptideShakerGUI.getUtilitiesUserPreferences().getSpectrumBackgroundPeakWidth());

                // get the spectrum annotations
                PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();
                Peptide peptide = peptideAssumption.getPeptide();
                int identificationCharge = spectrumMatch.getBestPeptideAssumption().getIdentificationCharge().value;
                annotationPreferences.setCurrentSettings(peptideAssumption, !currentSpectrumKey.equalsIgnoreCase(spectrumMatch.getKey()), peptideShakerGUI.getSequenceMatchingPreferences());
                ArrayList<IonMatch> annotations = annotator.getSpectrumAnnotation(annotationPreferences.getIonTypes(),
                        annotationPreferences.getNeutralLosses(),
                        annotationPreferences.getValidatedCharges(),
View Full Code Here


                                    firstFeature = false;
                                }
                                psParameter = (PSParameter) assumption.getUrParam(psParameter);
                                String feature;
                                if (assumption instanceof PeptideAssumption) {
                                    PeptideAssumption peptideAssumption = (PeptideAssumption) assumption;
                                    feature = getPeptideAssumptionFeature(identification, identificationFeaturesGenerator,
                                            searchParameters, annotationPreferences, sequenceMatchingPreferences, keys, linePrefix,
                                            peptideAssumption, spectrumKey, psParameter, identificationAlgorithmMatchesFeature, waitingHandler);
                                } else if (assumption instanceof TagAssumption) {
                                    TagAssumption tagAssumption = (TagAssumption) assumption;
View Full Code Here

                    for (double eValue : spectrumMatch.getAllAssumptions(advocateIndex).keySet()) {
                        for (SpectrumIdentificationAssumption assumption : spectrumMatch.getAllAssumptions(advocateIndex).get(eValue)) {

                            if (assumption instanceof PeptideAssumption) {

                                PeptideAssumption peptideAssumption = (PeptideAssumption) assumption;
                                annotationPreferences.setCurrentSettings(peptideAssumption, true, sequenceMatchingPreferences);
                                PSParameter psParameter = new PSParameter();
                                MSnSpectrum spectrum = (MSnSpectrum) spectrumFactory.getSpectrum(spectrumKey);

                                for (int scoreIndex : processingPreferences.getScores(advocateIndex)) {

                                    Peptide peptide = peptideAssumption.getPeptide();
                                    boolean decoy = peptide.isDecoy(sequenceMatchingPreferences);
                                    double score;

                                    if (scoreIndex == PsmScores.native_score.index) {
                                        score = peptideAssumption.getScore();
                                    } else {
                                        score = PsmScores.getDecreasingScore(peptide, spectrum, iontypes, neutralLosses, charges,
                                                peptideAssumption.getIdentificationCharge().value, searchParameters, scoreIndex);
                                    }

                                    psParameter.setIntermediateScore(scoreIndex, score);
                                    inputMap.setIntermediateScore(spectrumFileName, advocateIndex, scoreIndex, score, decoy);
View Full Code Here

                                    }
                                }

                                assumption.setScore(score);

                                PeptideAssumption peptideAssumption = (PeptideAssumption) assumption;
                                Peptide peptide = peptideAssumption.getPeptide();
                                boolean decoy = peptide.isDecoy(sequenceMatchingPreferences);
                                inputMap.addEntry(advocateIndex, spectrumFileName, score, decoy);

//                                if (decoy) {
//                                    br.write(Spectrum.getSpectrumTitle(spectrumKey) + "\t" + peptide.getKey() + "\t" + score + "\t" + 1);
View Full Code Here

                                SpectrumIdentificationAssumption currentAssumption = currentAssumptionsList.get(searchResultsTable.getSelectedRow());

                                if (currentAssumption != null) {
                                    currentSpectrumKey = spectrumMatch.getKey();
                                    if (currentAssumption instanceof PeptideAssumption) {
                                        PeptideAssumption currentPeptideAssumption = (PeptideAssumption) currentAssumption;
                                        Peptide peptide = currentPeptideAssumption.getPeptide();
                                        annotationPreferences.setCurrentSettings(currentPeptideAssumption, !currentSpectrumKey.equalsIgnoreCase(spectrumMatch.getKey()),
                                                peptideShakerGUI.getSequenceMatchingPreferences());
                                        ArrayList<IonMatch> annotations = specificAnnotator.getSpectrumAnnotation(annotationPreferences.getIonTypes(),
                                                annotationPreferences.getNeutralLosses(),
                                                annotationPreferences.getValidatedCharges(),
                                                currentPeptideAssumption.getIdentificationCharge().value,
                                                currentSpectrum, peptide,
                                                currentSpectrum.getIntensityLimit(annotationPreferences.getAnnotationIntensityLimit()),
                                                annotationPreferences.getFragmentIonAccuracy(), false, annotationPreferences.isHighResolutionAnnotation());

                                        // add the spectrum annotations
                                        tempSpectrumPanel.setAnnotations(SpectrumAnnotator.getSpectrumAnnotation(annotations));
                                        tempSpectrumPanel.showAnnotatedPeaksOnly(!annotationPreferences.showAllPeaks());
                                        tempSpectrumPanel.setYAxisZoomExcludesBackgroundPeaks(annotationPreferences.yAxisZoomExcludesBackgroundPeaks());

                                        // add de novo sequencing
                                        tempSpectrumPanel.addAutomaticDeNovoSequencing(peptide, annotations,
                                                forwardIon, rewindIon, annotationPreferences.getDeNovoCharge(),
                                                annotationPreferences.showForwardIonDeNovoTags(),
                                                annotationPreferences.showRewindIonDeNovoTags());

                                        peptideShakerGUI.updateAnnotationMenus(currentPeptideAssumption.getIdentificationCharge().value, peptide.getModificationMatches());

                                        // update the spectrum title
                                        String modifiedSequence = peptide.getTaggedModifiedSequence(modificationProfile, false, false, true);
                                        ((TitledBorder) spectrumPanel.getBorder()).setTitle(
                                                PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING
                                                + "Spectrum & Fragment Ions (" + modifiedSequence
                                                + "   " + currentPeptideAssumption.getIdentificationCharge().toString() + "   "
                                                + Util.roundDouble(currentSpectrum.getPrecursor().getMz(), 2) + " m/z)"
                                                + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
                                    } else if (currentAssumption instanceof TagAssumption) {
                                        TagAssumption tagAssumption = (TagAssumption) currentAssumption;
View Full Code Here

                if (eValues.size() > 0) {
                    if (spectrumMatch.getAllAssumptions(advocateIndex).get(eValues.get(0)).size() > 0) {
                        for (SpectrumIdentificationAssumption assumption : spectrumMatch.getAllAssumptions(advocateIndex).get(eValues.get(0))) {
                            if (assumption instanceof PeptideAssumption) {
                                PeptideAssumption peptideAssumption = (PeptideAssumption) assumption;
                                ArrayList<PeptideAssumption> advocatePeptides = peptideAssumptions.get(advocateIndex);
                                if (advocatePeptides == null) {
                                    advocatePeptides = new ArrayList<PeptideAssumption>();
                                    peptideAssumptions.put(advocateIndex, advocatePeptides);
                                }
View Full Code Here

                        PeptideMatch currentPeptideMatch = peptideShakerGUI.getIdentification().getPeptideMatch(peptideKey);

                        tableModel = (SelfUpdatingTableModel) psmTable.getModel();
                        String spectrumKey = psmKeys.get(tableModel.getViewIndex(row));
                        SpectrumMatch spectrumMatch = peptideShakerGUI.getIdentification().getSpectrumMatch(spectrumKey);
                        PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();

                        if (peptideAssumption.getPeptide().getMatchingKey(peptideShakerGUI.getSequenceMatchingPreferences()).equals(currentPeptideMatch.getTheoreticPeptide().getMatchingKey(peptideShakerGUI.getSequenceMatchingPreferences()))) {
                            String tooltip = peptideShakerGUI.getDisplayFeaturesGenerator().getPeptideModificationTooltipAsHtml(currentPeptideMatch);
                            psmTable.setToolTipText(tooltip);
                        } else {
                            // @TODO: do we have to do anything here??
                        }
View Full Code Here

                            spectrumPanel.setPeakWaterMarkColor(peptideShakerGUI.getUtilitiesUserPreferences().getSpectrumBackgroundPeakColor());
                            spectrumPanel.setPeakWidth(peptideShakerGUI.getUtilitiesUserPreferences().getSpectrumAnnotatedPeakWidth());
                            spectrumPanel.setBackgroundPeakWidth(peptideShakerGUI.getUtilitiesUserPreferences().getSpectrumBackgroundPeakWidth());

                            // get the spectrum annotations
                            PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();
                            Peptide currentPeptide = peptideAssumption.getPeptide();
                            PeptideSpectrumAnnotator spectrumAnnotator = peptideShakerGUI.getSpectrumAnnotator();
                            AnnotationPreferences annotationPreferences = peptideShakerGUI.getAnnotationPreferences();
                            int identificationCharge = spectrumMatch.getBestPeptideAssumption().getIdentificationCharge().value;
                            annotationPreferences.setCurrentSettings(peptideAssumption, !currentSpectrumKey.equalsIgnoreCase(spectrumKey),
                                    peptideShakerGUI.getSequenceMatchingPreferences());
View Full Code Here

                if (currentSpectrum != null && peptideTable.getSelectedRow() != -1) {

                    SpectrumMatch spectrumMatch = peptideShakerGUI.getIdentification().getSpectrumMatch(spectrumKey);

                    // get the spectrum annotations
                    PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();
                    annotationPreferences.setCurrentSettings(peptideAssumption, !currentSpectrumKey.equalsIgnoreCase(spectrumKey), peptideShakerGUI.getSequenceMatchingPreferences());
                    ArrayList<IonMatch> annotations = miniAnnotator.getSpectrumAnnotation(annotationPreferences.getIonTypes(),
                            annotationPreferences.getNeutralLosses(),
                            annotationPreferences.getValidatedCharges(),
                            spectrumMatch.getBestPeptideAssumption().getIdentificationCharge().value,
                            currentSpectrum, peptideAssumption.getPeptide(),
                            currentSpectrum.getIntensityLimit(annotationPreferences.getAnnotationIntensityLimit()),
                            annotationPreferences.getFragmentIonAccuracy(), false,
                            annotationPreferences.isHighResolutionAnnotation());
                    allAnnotations.add(annotations);
                    currentSpectrumKey = spectrumKey;
View Full Code Here

                int psmIndex = psmTableModel.getViewIndex(psmTable.getSelectedRow());
                String spectrumKey = psmKeys.get(psmIndex);

                try {
                    SpectrumMatch spectrumMatch = peptideShakerGUI.getIdentification().getSpectrumMatch(spectrumKey);
                    PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();

                    if (!before.equals("")) {
                        before += " - ";
                    }
                    if (!after.equals("")) {
                        after = " - " + after;
                    }
                    String modifiedSequence = peptideShakerGUI.getDisplayFeaturesGenerator().getTaggedPeptideSequence(spectrumMatch, false, false, true);
                    ((TitledBorder) spectrumMainPanel.getBorder()).setTitle(
                            PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING
                            + "Spectrum & Fragment Ions (" + before + modifiedSequence + after
                            + "   " + peptideAssumption.getIdentificationCharge().toString() + "   "
                            + Util.roundDouble(currentSpectrum.getPrecursor().getMz(), 2) + " m/z)"
                            + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
                    spectrumMainPanel.repaint();
                } catch (Exception e) {
                    peptideShakerGUI.catchException(e);
View Full Code Here

TOP

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

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.