Search in sources :

Example 1 with TagAssumption

use of com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption in project peptide-shaker by compomics.

the class SpectrumIdentificationPanel method populateIdResultsTable.

/**
 * Populates the assumptions table with assumptions from the selected
 * spectrum match.
 *
 * @param spectrumMatchKey the key of the selected spectrum match
 */
private void populateIdResultsTable(long spectrumMatchKey) {
    currentAssumptionsList = new ArrayList<>(8);
    searchResultsTablePeptideTooltips = new ArrayList<>(8);
    SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumMatchKey);
    if (spectrumMatch != null) {
        // sort peptides by pep, tool, and sequence
        HashMap<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> peptideAssumptions = spectrumMatch.getPeptideAssumptionsMap();
        TreeMap<Double, TreeMap<Integer, TreeMap<String, ArrayList<PeptideAssumption>>>> peptideAssumptionsByPep = new TreeMap<>();
        for (Entry<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> entry1 : peptideAssumptions.entrySet()) {
            int tool = entry1.getKey();
            for (Entry<Double, ArrayList<PeptideAssumption>> entry2 : entry1.getValue().entrySet()) {
                ArrayList<PeptideAssumption> assumptions = entry2.getValue();
                for (PeptideAssumption peptideAssumption : assumptions) {
                    PSParameter psParameter = (PSParameter) peptideAssumption.getUrParam(PSParameter.dummy);
                    double pep = psParameter.getProbability();
                    TreeMap<Integer, TreeMap<String, ArrayList<PeptideAssumption>>> mapAtPep = peptideAssumptionsByPep.get(pep);
                    if (mapAtPep == null) {
                        mapAtPep = new TreeMap<>();
                        peptideAssumptionsByPep.put(pep, mapAtPep);
                    }
                    TreeMap<String, ArrayList<PeptideAssumption>> toolMap = mapAtPep.get(tool);
                    if (toolMap == null) {
                        toolMap = new TreeMap<>();
                        mapAtPep.put(tool, toolMap);
                    }
                    String sequence = peptideAssumption.getPeptide().getSequence();
                    ArrayList<PeptideAssumption> sequenceAssumptions = toolMap.get(sequence);
                    if (sequenceAssumptions == null) {
                        sequenceAssumptions = new ArrayList<>(1);
                        toolMap.put(sequence, sequenceAssumptions);
                    }
                    sequenceAssumptions.add(peptideAssumption);
                }
            }
        }
        // Add peptides to the list to display
        peptideAssumptionsByPep.values().stream().flatMap(subMap -> subMap.values().stream()).flatMap(subMap -> subMap.values().stream()).flatMap(assumptionList -> assumptionList.stream()).forEach(peptideAssumption -> {
            Peptide peptide = peptideAssumption.getPeptide();
            if (peptideShakerGUI.getIdentificationParameters().getPeptideAssumptionFilter().validatePeptide(peptide, peptideShakerGUI.getIdentificationParameters().getSequenceMatchingParameters(), peptideShakerGUI.getIdentificationParameters().getSearchParameters().getDigestionParameters())) {
                if (vallidatedPsmsCheckBox.isSelected()) {
                    PSParameter psParameter = (PSParameter) peptideAssumption.getUrParam(PSParameter.dummy);
                    if (psParameter.getMatchValidationLevel().isValidated()) {
                        currentAssumptionsList.add(peptideAssumption);
                        searchResultsTablePeptideTooltips.add(peptideShakerGUI.getDisplayFeaturesGenerator().getPeptideModificationTooltipAsHtml(peptide));
                    }
                } else {
                    currentAssumptionsList.add(peptideAssumption);
                    searchResultsTablePeptideTooltips.add(peptideShakerGUI.getDisplayFeaturesGenerator().getPeptideModificationTooltipAsHtml(peptide));
                }
            }
        });
        // Add tags to the list to display. Scores cannot be compared between algorithms so keep sorting by tool.
        spectrumMatch.getTagAssumptionsMap().values().stream().flatMap(subMap -> subMap.values().stream()).flatMap(array -> array.stream()).forEach(tagAssumption -> {
            // @TODO: filter the tags as well? and respect the vallidatedPsmsCheckBox value!
            currentAssumptionsList.add(tagAssumption);
            String toolTip = peptideShakerGUI.getDisplayFeaturesGenerator().getTagModificationTooltipAsHtml(tagAssumption.getTag());
            searchResultsTablePeptideTooltips.add(toolTip);
        });
    }
}
Also used : NO_KEY(com.compomics.util.experiment.personalization.ExperimentObject.NO_KEY) TagAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption) JSparklinesBarChartTableCellRenderer(no.uib.jsparklines.renderers.JSparklinesBarChartTableCellRenderer) TagSpectrumAnnotator(com.compomics.util.experiment.identification.spectrum_annotation.spectrum_annotators.TagSpectrumAnnotator) JTableHeader(javax.swing.table.JTableHeader) PeptideShakerGUI(eu.isas.peptideshaker.gui.PeptideShakerGUI) SpecificAnnotationParameters(com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters) SpectrumAnnotator(com.compomics.util.experiment.identification.spectrum_annotation.SpectrumAnnotator) MouseAdapter(java.awt.event.MouseAdapter) TitledBorder(javax.swing.border.TitledBorder) SpectrumProvider(com.compomics.util.experiment.mass_spectrometry.SpectrumProvider) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel) JSparklinesIntegerIconTableCellRenderer(no.uib.jsparklines.renderers.JSparklinesIntegerIconTableCellRenderer) TableProperties(com.compomics.util.gui.TableProperties) IonMatch(com.compomics.util.experiment.identification.matches.IonMatch) ModificationParameters(com.compomics.util.parameters.identification.search.ModificationParameters) ScrollPaneConstants(javax.swing.ScrollPaneConstants) PeptideAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.PeptideAssumption) DefaultTableModel(javax.swing.table.DefaultTableModel) ToolTipManager(javax.swing.ToolTipManager) SequenceMatchingParameters(com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters) Util(com.compomics.util.Util) Component(java.awt.Component) SearchParameters(com.compomics.util.parameters.identification.search.SearchParameters) DisplayParameters(eu.isas.peptideshaker.preferences.DisplayParameters) ChartFactory(org.jfree.chart.ChartFactory) StandardCategoryItemLabelGenerator(org.jfree.chart.labels.StandardCategoryItemLabelGenerator) IdentificationParameters(com.compomics.util.parameters.identification.IdentificationParameters) MassErrorBubblePlot(com.compomics.util.gui.spectrum.MassErrorBubblePlot) PSParameter(com.compomics.util.experiment.identification.peptide_shaker.PSParameter) CategoryPlot(org.jfree.chart.plot.CategoryPlot) ArrayUtil(com.compomics.util.ArrayUtil) Entry(java.util.Map.Entry) JTable(javax.swing.JTable) ChartPanel(org.jfree.chart.ChartPanel) Precursor(com.compomics.util.experiment.mass_spectrometry.spectra.Precursor) RowSorterEvent(javax.swing.event.RowSorterEvent) AlignedListCellRenderer(com.compomics.util.gui.renderers.AlignedListCellRenderer) JPanel(javax.swing.JPanel) Toolkit(java.awt.Toolkit) BarRenderer(org.jfree.chart.renderer.category.BarRenderer) IntStream(java.util.stream.IntStream) Rectangle(java.awt.Rectangle) SpectrumIdentificationAssumption(com.compomics.util.experiment.identification.SpectrumIdentificationAssumption) HelpDialog(com.compomics.util.gui.error_handlers.HelpDialog) DefaultCategoryDataset(org.jfree.data.category.DefaultCategoryDataset) HashMap(java.util.HashMap) PlotOrientation(org.jfree.chart.plot.PlotOrientation) SwingConstants(javax.swing.SwingConstants) TreeSet(java.util.TreeSet) SpectrumMatch(com.compomics.util.experiment.identification.matches.SpectrumMatch) ArrayList(java.util.ArrayList) JSparklinesIntervalChartTableCellRenderer(no.uib.jsparklines.renderers.JSparklinesIntervalChartTableCellRenderer) HashSet(java.util.HashSet) JSparklinesIntegerColorTableCellRenderer(no.uib.jsparklines.renderers.JSparklinesIntegerColorTableCellRenderer) XYPlottingDialog(com.compomics.util.gui.XYPlottingDialog) SpectrumPanel(com.compomics.util.gui.spectrum.SpectrumPanel) SwingUtilities(javax.swing.SwingUtilities) ModificationUtils(com.compomics.util.experiment.identification.utils.ModificationUtils) JMenuItem(javax.swing.JMenuItem) StandardBarPainter(org.jfree.chart.renderer.category.StandardBarPainter) InputMap(eu.isas.peptideshaker.scoring.maps.InputMap) JFreeChart(org.jfree.chart.JFreeChart) Advocate(com.compomics.util.experiment.identification.Advocate) Spectrum(com.compomics.util.experiment.mass_spectrometry.spectra.Spectrum) MatchValidationLevel(com.compomics.util.experiment.identification.validation.MatchValidationLevel) BufferedWriter(java.io.BufferedWriter) JPopupMenu(javax.swing.JPopupMenu) FileWriter(java.io.FileWriter) RowSorterListener(javax.swing.event.RowSorterListener) DecimalFormat(java.text.DecimalFormat) SequenceProvider(com.compomics.util.experiment.io.biology.protein.SequenceProvider) ValueAxis(org.jfree.chart.axis.ValueAxis) Identification(com.compomics.util.experiment.identification.Identification) IOException(java.io.IOException) Peptide(com.compomics.util.experiment.biology.proteins.Peptide) JOptionPane(javax.swing.JOptionPane) ExportGraphicsDialog(com.compomics.util.gui.export.graphics.ExportGraphicsDialog) PSMaps(eu.isas.peptideshaker.scoring.PSMaps) MouseEvent(java.awt.event.MouseEvent) File(java.io.File) AnnotationParameters(com.compomics.util.experiment.identification.spectrum_annotation.AnnotationParameters) PeptideSpectrumAnnotator(com.compomics.util.experiment.identification.spectrum_annotation.spectrum_annotators.PeptideSpectrumAnnotator) DisplayFeaturesGenerator(eu.isas.peptideshaker.utils.DisplayFeaturesGenerator) Charge(com.compomics.util.experiment.biology.ions.Charge) HtmlLinksRenderer(no.uib.jsparklines.extra.HtmlLinksRenderer) TreeMap(java.util.TreeMap) StandardCategoryToolTipGenerator(org.jfree.chart.labels.StandardCategoryToolTipGenerator) ProgressDialogX(com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX) ArrayList(java.util.ArrayList) TreeMap(java.util.TreeMap) SpectrumMatch(com.compomics.util.experiment.identification.matches.SpectrumMatch) PeptideAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.PeptideAssumption) Peptide(com.compomics.util.experiment.biology.proteins.Peptide) PSParameter(com.compomics.util.experiment.identification.peptide_shaker.PSParameter)

Example 2 with TagAssumption

use of com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption in project peptide-shaker by compomics.

the class SpectrumIdentificationPanel method updateSpectrum.

/**
 * Update the spectrum based on the currently selected PSM.
 */
public void updateSpectrum() {
    if (spectrumTable.getSelectedRow() != -1) {
        spectrumChartPanel.removeAll();
        String spectrumTitle = getSelectedSpectrumTitle();
        Spectrum currentSpectrum = peptideShakerGUI.getSpectrumProvider().getSpectrum(fileSelected, spectrumTitle);
        AnnotationParameters annotationParameters = peptideShakerGUI.getIdentificationParameters().getAnnotationParameters();
        long spectrumMatchKey = SpectrumMatch.getKey(fileSelected, spectrumTitle);
        SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumMatchKey);
        // get the selected spectrum
        if (currentSpectrum != null && currentSpectrum.getNPeaks() > 0) {
            Precursor precursor = currentSpectrum.getPrecursor();
            String chargeAsString = "";
            if (spectrumMatch != null) {
                if (spectrumMatch.getBestPeptideAssumption() != null) {
                    chargeAsString = Charge.toString(spectrumMatch.getBestPeptideAssumption().getIdentificationCharge());
                } else if (spectrumMatch.getBestTagAssumption() != null) {
                    chargeAsString = Charge.toString(spectrumMatch.getBestTagAssumption().getIdentificationCharge());
                }
            } else {
                chargeAsString = precursor.getPossibleChargesAsString();
            }
            double[] intensitiesAsArray = searchResultsTable.getSelectedRowCount() == 1 ? currentSpectrum.intensity : ArrayUtil.scaleToMax(currentSpectrum.intensity);
            spectrumPanel = new SpectrumPanel(currentSpectrum.mz, intensitiesAsArray, precursor.mz, chargeAsString, "", 40, false, false, false, 2, false);
            spectrumPanel.setKnownMassDeltas(peptideShakerGUI.getCurrentMassDeltas());
            spectrumPanel.setDeltaMassWindow(annotationParameters.getFragmentIonAccuracy());
            spectrumPanel.setBorder(null);
            spectrumPanel.setDataPointAndLineColor(peptideShakerGUI.getUtilitiesUserParameters().getSpectrumAnnotatedPeakColor(), 0);
            spectrumPanel.setPeakWaterMarkColor(peptideShakerGUI.getUtilitiesUserParameters().getSpectrumBackgroundPeakColor());
            spectrumPanel.setPeakWidth(peptideShakerGUI.getUtilitiesUserParameters().getSpectrumAnnotatedPeakWidth());
            spectrumPanel.setBackgroundPeakWidth(peptideShakerGUI.getUtilitiesUserParameters().getSpectrumBackgroundPeakWidth());
            // add the mirrored spectrum
            if (searchResultsTable.getSelectedRowCount() == 2) {
                spectrumPanel.addMirroredSpectrum(currentSpectrum.mz, ArrayUtil.scaleToMax(currentSpectrum.intensity), precursor.mz, chargeAsString, "", false, peptideShakerGUI.getUtilitiesUserParameters().getSpectrumAnnotatedMirroredPeakColor(), peptideShakerGUI.getUtilitiesUserParameters().getSpectrumAnnotatedMirroredPeakColor());
            }
        }
        // add spectrum annotations
        if (spectrumMatch != null) {
            SequenceProvider sequenceProvider = peptideShakerGUI.getSequenceProvider();
            IdentificationParameters identificationParameters = peptideShakerGUI.getIdentificationParameters();
            ModificationParameters modificationParameters = identificationParameters.getSearchParameters().getModificationParameters();
            SequenceMatchingParameters modificationSequenceMatchingParameters = identificationParameters.getModificationLocalizationParameters().getSequenceMatchingParameters();
            SearchParameters searchParameters = identificationParameters.getSearchParameters();
            DisplayParameters displayParameters = peptideShakerGUI.getDisplayParameters();
            int forwardIon = searchParameters.getForwardIons().get(0);
            int rewindIon = searchParameters.getRewindIons().get(0);
            if (currentSpectrum != null && spectrumPanel != null) {
                if (currentSpectrum.getNPeaks() > 0) {
                    int maxPrecursorCharge = 1;
                    String modifiedSequence = "";
                    HashSet<String> allModifications = new HashSet<>();
                    ArrayList<IonMatch[]> allAnnotations = new ArrayList<>();
                    ArrayList<Spectrum> allSpectra = new ArrayList<>();
                    ArrayList<String> selectedIndexes = new ArrayList<>();
                    SpecificAnnotationParameters specificAnnotationParameters = null;
                    for (int i = 0; i < searchResultsTable.getSelectedRowCount(); i++) {
                        SpectrumIdentificationAssumption currentAssumption = currentAssumptionsList.get(searchResultsTable.getSelectedRows()[i]);
                        if (currentAssumption != null) {
                            selectedIndexes.add((i + 1) + " " + Charge.toString(currentAssumption.getIdentificationCharge()));
                            if (currentAssumption instanceof PeptideAssumption) {
                                PeptideAssumption currentPeptideAssumption = (PeptideAssumption) currentAssumption;
                                Peptide peptide = currentPeptideAssumption.getPeptide();
                                PeptideSpectrumAnnotator peptideSpectrumAnnotator = new PeptideSpectrumAnnotator();
                                specificAnnotationParameters = peptideShakerGUI.getSpecificAnnotationParameters(fileSelected, spectrumTitle, currentPeptideAssumption);
                                IonMatch[] annotations = peptideSpectrumAnnotator.getSpectrumAnnotation(annotationParameters, specificAnnotationParameters, fileSelected, spectrumTitle, currentSpectrum, peptide, modificationParameters, sequenceProvider, modificationSequenceMatchingParameters);
                                allAnnotations.add(annotations);
                                allSpectra.add(currentSpectrum);
                                // add the spectrum annotations
                                if (i == 0) {
                                    // @TODO: the selection of the peak to annotate should be done outside the spectrum panel
                                    spectrumPanel.setAnnotations(SpectrumAnnotator.getSpectrumAnnotation(annotations), annotationParameters.getTiesResolution() == SpectrumAnnotator.TiesResolution.mostIntense);
                                    // add de novo sequencing
                                    spectrumPanel.addAutomaticDeNovoSequencing(peptide, annotations, forwardIon, rewindIon, annotationParameters.getDeNovoCharge(), annotationParameters.showForwardIonDeNovoTags(), annotationParameters.showRewindIonDeNovoTags(), false, modificationParameters, sequenceProvider, modificationSequenceMatchingParameters);
                                } else {
                                    spectrumPanel.setAnnotationsMirrored(SpectrumAnnotator.getSpectrumAnnotation(annotations));
                                    // add de novo sequencing
                                    spectrumPanel.addAutomaticDeNovoSequencing(peptide, annotations, forwardIon, rewindIon, annotationParameters.getDeNovoCharge(), annotationParameters.showForwardIonDeNovoTags(), annotationParameters.showRewindIonDeNovoTags(), true, modificationParameters, sequenceProvider, modificationSequenceMatchingParameters);
                                }
                                if (currentPeptideAssumption.getIdentificationCharge() > maxPrecursorCharge) {
                                    maxPrecursorCharge = currentPeptideAssumption.getIdentificationCharge();
                                }
                                if (!modifiedSequence.isEmpty()) {
                                    modifiedSequence += " vs. ";
                                }
                                modifiedSequence += peptide.getTaggedModifiedSequence(modificationParameters, sequenceProvider, modificationSequenceMatchingParameters, false, false, true, displayParameters.getDisplayedModifications());
                                allModifications.addAll(ModificationUtils.getAllModifications(peptide, modificationParameters, sequenceProvider, modificationSequenceMatchingParameters));
                            } else if (currentAssumption instanceof TagAssumption) {
                                TagAssumption tagAssumption = (TagAssumption) currentAssumption;
                                TagSpectrumAnnotator spectrumAnnotator = new TagSpectrumAnnotator();
                                specificAnnotationParameters = peptideShakerGUI.getSpecificAnnotationParameters(fileSelected, spectrumTitle, tagAssumption);
                                IonMatch[] annotations = spectrumAnnotator.getSpectrumAnnotation(annotationParameters, modificationParameters, modificationSequenceMatchingParameters, specificAnnotationParameters, fileSelected, spectrumTitle, currentSpectrum, tagAssumption.getTag());
                                // add the spectrum annotations
                                // @TODO: the selection of the peak to annotate should be done outside the spectrum panel
                                spectrumPanel.setAnnotations(SpectrumAnnotator.getSpectrumAnnotation(annotations), annotationParameters.getTiesResolution() == SpectrumAnnotator.TiesResolution.mostIntense);
                                // add de novo sequencing
                                spectrumPanel.addAutomaticDeNovoSequencing(tagAssumption.getTag(), annotations, forwardIon, rewindIon, annotationParameters.getDeNovoCharge(), annotationParameters.showForwardIonDeNovoTags(), annotationParameters.showRewindIonDeNovoTags(), false);
                                // get the modifications for the tag
                                allModifications.addAll(ModificationUtils.getAllModifications(tagAssumption.getTag(), modificationParameters, modificationSequenceMatchingParameters));
                                if (tagAssumption.getIdentificationCharge() > maxPrecursorCharge) {
                                    maxPrecursorCharge = tagAssumption.getIdentificationCharge();
                                }
                                if (!modifiedSequence.isEmpty()) {
                                    modifiedSequence += " vs. ";
                                }
                                modifiedSequence += tagAssumption.getTag().getTaggedModifiedSequence(modificationParameters, false, false, true, false, modificationSequenceMatchingParameters, displayParameters.getDisplayedModifications());
                            } else {
                                throw new UnsupportedOperationException("Spectrum annotation not implemented for identification assumption of type " + currentAssumption.getClass() + ".");
                            }
                        }
                    }
                    spectrumPanel.showAnnotatedPeaksOnly(!annotationParameters.showAllPeaks());
                    spectrumPanel.setYAxisZoomExcludesBackgroundPeaks(annotationParameters.yAxisZoomExcludesBackgroundPeaks());
                    peptideShakerGUI.updateAnnotationMenus(specificAnnotationParameters, maxPrecursorCharge, allModifications);
                    // update the spectrum title
                    if (searchResultsTable.getSelectedRowCount() == 1) {
                        ((TitledBorder) spectrumPanelPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions (" + modifiedSequence + "   " + maxPrecursorCharge + "   " + Util.roundDouble(currentSpectrum.getPrecursor().mz, 2) + " m/z)" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
                    } else if (searchResultsTable.getSelectedRowCount() == 2) {
                        ((TitledBorder) spectrumPanelPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions (" + modifiedSequence + ")" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
                    } else if (searchResultsTable.getSelectedRowCount() > 2) {
                        ((TitledBorder) spectrumPanelPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions (" + searchResultsTable.getSelectedRowCount() + " PSMs)" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
                    }
                    spectrumPanelPanel.repaint();
                    if (searchResultsTable.getSelectedRowCount() > 2) {
                        SearchParameters.MassAccuracyType fragmentAccuracyType = peptideShakerGUI.getIdentificationParameters().getSearchParameters().getFragmentAccuracyType();
                        double bubbleScale = annotationParameters.getFragmentIonAccuracy() * 10 * peptideShakerGUI.getBubbleScale();
                        DisplayParameters displayPreferences = peptideShakerGUI.getDisplayParameters();
                        MassErrorBubblePlot massErrorBubblePlot = new MassErrorBubblePlot(selectedIndexes, allAnnotations, allSpectra, annotationParameters.getFragmentIonAccuracy(), bubbleScale, selectedIndexes.size() == 1, displayPreferences.showBars(), fragmentAccuracyType == SearchParameters.MassAccuracyType.PPM);
                        // hide the legend if selecting more than 20 spectra // @TODO: 20 should not be hardcoded here..
                        if (selectedIndexes.size() > 20) {
                            massErrorBubblePlot.getChartPanel().getChart().getLegend().setVisible(false);
                        }
                        // hide the outline
                        massErrorBubblePlot.getChartPanel().getChart().getPlot().setOutlineVisible(false);
                        spectrumChartPanel.add(massErrorBubblePlot);
                    }
                }
            }
            if (searchResultsTable.getSelectedRowCount() <= 2) {
                spectrumChartPanel.add(spectrumPanel);
            }
        } else {
            // update the spectrum title
            ((TitledBorder) spectrumPanelPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions (" + Util.roundDouble(currentSpectrum.getPrecursor().mz, 2) + " m/z)" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
            if (currentSpectrum.getNPeaks() > 0) {
                spectrumChartPanel.add(spectrumPanel);
            }
            spectrumPanelPanel.repaint();
        }
    }
    spectrumChartPanel.revalidate();
    spectrumChartPanel.repaint();
}
Also used : MassErrorBubblePlot(com.compomics.util.gui.spectrum.MassErrorBubblePlot) SpecificAnnotationParameters(com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters) AnnotationParameters(com.compomics.util.experiment.identification.spectrum_annotation.AnnotationParameters) DisplayParameters(eu.isas.peptideshaker.preferences.DisplayParameters) ArrayList(java.util.ArrayList) SpecificAnnotationParameters(com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters) TitledBorder(javax.swing.border.TitledBorder) Precursor(com.compomics.util.experiment.mass_spectrometry.spectra.Precursor) Spectrum(com.compomics.util.experiment.mass_spectrometry.spectra.Spectrum) SequenceProvider(com.compomics.util.experiment.io.biology.protein.SequenceProvider) SearchParameters(com.compomics.util.parameters.identification.search.SearchParameters) TagAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption) IonMatch(com.compomics.util.experiment.identification.matches.IonMatch) SpectrumMatch(com.compomics.util.experiment.identification.matches.SpectrumMatch) TagSpectrumAnnotator(com.compomics.util.experiment.identification.spectrum_annotation.spectrum_annotators.TagSpectrumAnnotator) IdentificationParameters(com.compomics.util.parameters.identification.IdentificationParameters) Peptide(com.compomics.util.experiment.biology.proteins.Peptide) HashSet(java.util.HashSet) ModificationParameters(com.compomics.util.parameters.identification.search.ModificationParameters) SpectrumIdentificationAssumption(com.compomics.util.experiment.identification.SpectrumIdentificationAssumption) SpectrumPanel(com.compomics.util.gui.spectrum.SpectrumPanel) SequenceMatchingParameters(com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters) PeptideAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.PeptideAssumption) PeptideSpectrumAnnotator(com.compomics.util.experiment.identification.spectrum_annotation.spectrum_annotators.PeptideSpectrumAnnotator)

Example 3 with TagAssumption

use of com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption in project peptide-shaker by compomics.

the class SpectrumIdentificationPanel method spectrumTableMouseMoved.

// GEN-LAST:event_spectrumTableKeyReleased
/**
 * Changes the cursor into a hand cursor if the table cell contains an HTML
 * link. Or shows a tooltip with modification details is over the sequence
 * column.
 *
 * @param evt
 */
private void spectrumTableMouseMoved(java.awt.event.MouseEvent evt) {
    // GEN-FIRST:event_spectrumTableMouseMoved
    int row = spectrumTable.rowAtPoint(evt.getPoint());
    int column = spectrumTable.columnAtPoint(evt.getPoint());
    if (spectrumTable.getValueAt(row, column) != null) {
        if (column == spectrumTable.getColumn("Protein(s)").getModelIndex()) {
            String tempValue = (String) spectrumTable.getValueAt(row, column);
            if (tempValue.lastIndexOf("a href=") != -1) {
                this.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
            } else {
                this.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
            }
            spectrumTable.setToolTipText(null);
        } else if (column == spectrumTable.getColumn("Sequence").getModelIndex()) {
            this.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
            int spectrumIndex = spectrumTable.convertRowIndexToModel(row);
            String spectrumTitle = peptideShakerGUI.getSpectrumProvider().getSpectrumTitles(fileSelected)[spectrumIndex];
            long spectrumMatchKey = SpectrumMatch.getKey(fileSelected, spectrumTitle);
            // check if we ought to show a tooltip with mod details
            DisplayFeaturesGenerator displayFeaturesGenerator = peptideShakerGUI.getDisplayFeaturesGenerator();
            SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumMatchKey);
            if (spectrumMatch.getBestPeptideAssumption() != null) {
                String tooltip = displayFeaturesGenerator.getPeptideModificationTooltipAsHtml(spectrumMatch);
                spectrumTable.setToolTipText(tooltip);
            } else if (spectrumMatch.getBestTagAssumption() != null) {
                TagAssumption tagAssumption = spectrumMatch.getBestTagAssumption();
                spectrumTable.setToolTipText(peptideShakerGUI.getDisplayFeaturesGenerator().getTagModificationTooltipAsHtml(tagAssumption.getTag()));
            } else {
                throw new IllegalArgumentException("No best match found for spectrum " + spectrumMatch.getKey() + ".");
            }
        } else {
            this.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
            spectrumTable.setToolTipText(null);
        }
    }
}
Also used : TagAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption) SpectrumMatch(com.compomics.util.experiment.identification.matches.SpectrumMatch) DisplayFeaturesGenerator(eu.isas.peptideshaker.utils.DisplayFeaturesGenerator)

Example 4 with TagAssumption

use of com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption in project peptide-shaker by compomics.

the class PsmProcessorRunnable method attachAssumptionsProbabilities.

/**
 * Attaches the spectrum posterior error probabilities to the peptide
 * assumptions.
 *
 * @param inputMap map of the input scores
 * @param fastaParameters the FASTA parsing parameters
 * @param sequenceMatchingPreferences the sequence matching preferences
 * @param waitingHandler the handler displaying feedback to the user
 */
private void attachAssumptionsProbabilities(SpectrumMatch spectrumMatch) {
    FastaParameters fastaParameters = identificationParameters.getFastaParameters();
    SequenceMatchingParameters sequenceMatchingParameters = identificationParameters.getSequenceMatchingParameters();
    // Peptides
    HashMap<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> peptideAssumptionsMap = spectrumMatch.getPeptideAssumptionsMap();
    TreeMap<Double, ArrayList<PSParameter>> pepToParameterMap = new TreeMap<>();
    for (Map.Entry<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> entry : peptideAssumptionsMap.entrySet()) {
        int searchEngine = entry.getKey();
        TreeMap<Double, ArrayList<PeptideAssumption>> seMapping = entry.getValue();
        double previousP = 0.0;
        ArrayList<PSParameter> previousAssumptionsParameters = new ArrayList<>(2);
        PeptideAssumption previousAssumption = null;
        for (Map.Entry<Double, ArrayList<PeptideAssumption>> entry2 : seMapping.entrySet()) {
            double eValue = entry2.getKey();
            ArrayList<PeptideAssumption> peptideAssumptions = entry2.getValue();
            for (PeptideAssumption assumption : peptideAssumptions) {
                PSParameter psParameter = (PSParameter) assumption.getUrParam(PSParameter.dummy);
                if (psParameter == null) {
                    psParameter = new PSParameter();
                }
                if (fastaParameters.isTargetDecoy()) {
                    double newP = inputMap.getProbability(searchEngine, eValue);
                    double pep = previousP;
                    if (newP > previousP) {
                        pep = newP;
                        previousP = newP;
                    }
                    psParameter.setProbability(pep);
                    ArrayList<PSParameter> pSParameters = pepToParameterMap.get(pep);
                    if (pSParameters == null) {
                        pSParameters = new ArrayList<>(1);
                        pepToParameterMap.put(pep, pSParameters);
                    }
                    pSParameters.add(psParameter);
                    if (previousAssumption != null) {
                        Peptide newPeptide = assumption.getPeptide();
                        Peptide previousPeptide = previousAssumption.getPeptide();
                        if (!newPeptide.isSameSequenceAndModificationStatus(previousPeptide, sequenceMatchingParameters)) {
                            for (PSParameter previousParameter : previousAssumptionsParameters) {
                                double deltaPEP = pep - previousParameter.getProbability();
                                previousParameter.setAlgorithmDeltaPEP(deltaPEP);
                            }
                            previousAssumptionsParameters.clear();
                        }
                    }
                    previousAssumption = assumption;
                    previousAssumptionsParameters.add(psParameter);
                } else {
                    psParameter.setProbability(1.0);
                }
                assumption.addUrParam(psParameter);
            }
        }
        for (PSParameter previousParameter : previousAssumptionsParameters) {
            double deltaPEP = 1 - previousParameter.getProbability();
            previousParameter.setAlgorithmDeltaPEP(deltaPEP);
        }
    }
    // Compute the delta pep score accross all search engines
    double previousPEP = Double.NaN;
    ArrayList<PSParameter> previousParameters = new ArrayList<>();
    for (Map.Entry<Double, ArrayList<PSParameter>> entry : pepToParameterMap.entrySet()) {
        double pep = entry.getKey();
        if (!Double.isNaN(previousPEP)) {
            for (PSParameter previousParameter : previousParameters) {
                double delta = pep - previousPEP;
                previousParameter.setDeltaPEP(delta);
            }
        }
        previousParameters = entry.getValue();
        previousPEP = pep;
    }
    for (PSParameter previousParameter : previousParameters) {
        double delta = 1 - previousParameter.getProbability();
        previousParameter.setDeltaPEP(delta);
    }
    if (waitingHandler.isRunCanceled()) {
        return;
    }
    // Assumptions
    HashMap<Integer, TreeMap<Double, ArrayList<TagAssumption>>> tagAssumptionsMap = spectrumMatch.getTagAssumptionsMap();
    for (Map.Entry<Integer, TreeMap<Double, ArrayList<TagAssumption>>> entry : tagAssumptionsMap.entrySet()) {
        int algorithm = entry.getKey();
        TreeMap<Double, ArrayList<TagAssumption>> seMapping = entry.getValue();
        double previousP = 0;
        ArrayList<PSParameter> previousAssumptionsParameters = new ArrayList<>();
        TagAssumption previousAssumption = null;
        for (Map.Entry<Double, ArrayList<TagAssumption>> entry2 : seMapping.entrySet()) {
            double score = entry2.getKey();
            for (TagAssumption assumption : entry2.getValue()) {
                PSParameter psParameter = (PSParameter) assumption.getUrParam(PSParameter.dummy);
                if (psParameter == null) {
                    psParameter = new PSParameter();
                }
                if (fastaParameters.isTargetDecoy()) {
                    double newP = inputMap.getProbability(algorithm, score);
                    double pep = previousP;
                    if (newP > previousP) {
                        pep = newP;
                        previousP = newP;
                    }
                    psParameter.setProbability(pep);
                    ArrayList<PSParameter> pSParameters = pepToParameterMap.get(pep);
                    if (pSParameters == null) {
                        pSParameters = new ArrayList<>(1);
                        pepToParameterMap.put(pep, pSParameters);
                    }
                    pSParameters.add(psParameter);
                    if (previousAssumption != null) {
                        boolean same = false;
                        Tag newTag = ((TagAssumption) assumption).getTag();
                        Tag previousTag = previousAssumption.getTag();
                        if (newTag.isSameSequenceAndModificationStatusAs(previousTag, sequenceMatchingParameters)) {
                            same = true;
                        }
                        if (!same) {
                            for (PSParameter previousParameter : previousAssumptionsParameters) {
                                double deltaPEP = pep - previousParameter.getProbability();
                                previousParameter.setAlgorithmDeltaPEP(deltaPEP);
                            }
                            previousAssumptionsParameters.clear();
                        }
                    }
                    previousAssumption = assumption;
                    previousAssumptionsParameters.add(psParameter);
                } else {
                    psParameter.setProbability(1.0);
                }
                assumption.addUrParam(psParameter);
            }
        }
        for (PSParameter previousParameter : previousAssumptionsParameters) {
            double deltaPEP = 1 - previousParameter.getProbability();
            previousParameter.setAlgorithmDeltaPEP(deltaPEP);
        }
    }
}
Also used : ArrayList(java.util.ArrayList) TagAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption) FastaParameters(com.compomics.util.experiment.io.biology.protein.FastaParameters) Peptide(com.compomics.util.experiment.biology.proteins.Peptide) PSParameter(com.compomics.util.experiment.identification.peptide_shaker.PSParameter) TreeMap(java.util.TreeMap) Tag(com.compomics.util.experiment.identification.amino_acid_tags.Tag) SequenceMatchingParameters(com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters) PeptideAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.PeptideAssumption) HashMap(java.util.HashMap) Map(java.util.Map) InputMap(eu.isas.peptideshaker.scoring.maps.InputMap) TreeMap(java.util.TreeMap)

Example 5 with TagAssumption

use of com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption in project peptide-shaker by compomics.

the class BestMatchSelection method selectBestHit.

/**
 * Selects the best hit.
 *
 * @param spectrumMatch The spectrum match.
 * @param inputMap The input map.
 * @param psmTargetDecoyMap The PSM target decoy map.
 * @param identification The identification class.
 */
public void selectBestHit(SpectrumMatch spectrumMatch, InputMap inputMap, TargetDecoyMap psmTargetDecoyMap, Identification identification) {
    boolean multiSE = inputMap.isMultipleAlgorithms();
    PSParameter psmParameter = new PSParameter();
    psmParameter.setMatchValidationLevel(MatchValidationLevel.none);
    spectrumMatch.addUrParam(psmParameter);
    String spectrumFile = spectrumMatch.getSpectrumFile();
    String spectrumTitle = spectrumMatch.getSpectrumTitle();
    HashSet<Long> ids = new HashSet<>(2);
    ArrayList<PeptideAssumption> assumptions = new ArrayList<>(4);
    Double bestP = null;
    HashMap<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> assumptionMap = spectrumMatch.getPeptideAssumptionsMap();
    for (Entry<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> entry1 : assumptionMap.entrySet()) {
        int searchEngine1 = entry1.getKey();
        TreeMap<Double, ArrayList<PeptideAssumption>> advocate1Map = entry1.getValue();
        searchEngine1loop: for (Entry<Double, ArrayList<PeptideAssumption>> advocate1Entry : advocate1Map.entrySet()) {
            for (PeptideAssumption peptideAssumption1 : advocate1Entry.getValue()) {
                Peptide peptide1 = peptideAssumption1.getPeptide();
                long id = peptide1.getMatchingKey(sequenceMatchingParameters);
                if (!ids.contains(id)) {
                    ids.add(id);
                    if (peptide1.getProteinMapping() != null && !peptide1.getProteinMapping().isEmpty() && peptideAssumptionFilter.validatePeptide(peptide1, sequenceMatchingParameters, searchParameters.getDigestionParameters()) && peptideAssumptionFilter.validateModifications(peptide1, sequenceMatchingParameters, modificationSequenceMatchingParameters, searchParameters.getModificationParameters()) && peptideAssumptionFilter.validatePrecursor(peptideAssumption1, spectrumFile, spectrumTitle, spectrumProvider, searchParameters) && peptideAssumptionFilter.validateProteins(peptide1, sequenceMatchingParameters, sequenceProvider)) {
                        PSParameter psParameter1 = (PSParameter) peptideAssumption1.getUrParam(PSParameter.dummy);
                        double p = multiSE && fastaParameters.isTargetDecoy() ? psParameter1.getProbability() : peptideAssumption1.getScore();
                        searchEngine2loop: for (Entry<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> entry2 : assumptionMap.entrySet()) {
                            int searchEngine2 = entry2.getKey();
                            if (searchEngine1 != searchEngine2) {
                                TreeMap<Double, ArrayList<PeptideAssumption>> advocate2Map = entry2.getValue();
                                for (Entry<Double, ArrayList<PeptideAssumption>> advocate2Entry : advocate2Map.entrySet()) {
                                    for (PeptideAssumption peptideAssumption2 : advocate2Entry.getValue()) {
                                        if (peptideAssumption1.getPeptide().isSameSequenceAndModificationStatus(peptideAssumption2.getPeptide(), sequenceMatchingParameters)) {
                                            PSParameter psParameter2 = (PSParameter) peptideAssumption2.getUrParam(PSParameter.dummy);
                                            p *= psParameter2.getProbability();
                                            break searchEngine2loop;
                                        }
                                    }
                                }
                            }
                        }
                        psmTargetDecoyMap.put(p, PeptideUtils.isDecoy(peptide1, sequenceProvider));
                        if (bestP == null) {
                            bestP = p;
                            assumptions.add(peptideAssumption1);
                        } else {
                            if (p < bestP) {
                                bestP = p;
                                assumptions.clear();
                            }
                            if (p <= bestP) {
                                assumptions.add(peptideAssumption1);
                            }
                        }
                    }
                }
            }
        }
    }
    if (!assumptions.isEmpty()) {
        PeptideAssumption bestPeptideAssumption;
        bestPeptideAssumption = getBestMatch(spectrumFile, spectrumTitle, assumptions);
        psmParameter.setMatchValidationLevel(MatchValidationLevel.not_validated);
        if (multiSE) {
            // try to find the most likely modification localization based on the search engine results
            ArrayList<PeptideAssumption> inspectedAssumptions = new ArrayList<>(1);
            HashMap<Long, TreeSet<Double>> assumptionPEPs = new HashMap<>(1);
            long bestAssumptionKey = bestPeptideAssumption.getPeptide().getMatchingKey(sequenceMatchingParameters);
            assumptionsLoop: for (Entry<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> assumptionsEmtry : assumptionMap.entrySet()) {
                TreeMap<Double, ArrayList<PeptideAssumption>> advocateMap = assumptionsEmtry.getValue();
                for (Entry<Double, ArrayList<PeptideAssumption>> advocateEntry : advocateMap.entrySet()) {
                    for (PeptideAssumption peptideAssumption : advocateEntry.getValue()) {
                        long assumptionKey = peptideAssumption.getPeptide().getMatchingKey(sequenceMatchingParameters);
                        if (assumptionKey == bestAssumptionKey) {
                            boolean found2 = false;
                            PSParameter assumptionParameter = (PSParameter) peptideAssumption.getUrParam(PSParameter.dummy);
                            for (PeptideAssumption assumption1 : inspectedAssumptions) {
                                if (assumption1.getPeptide().sameModificationsAs(peptideAssumption.getPeptide())) {
                                    found2 = true;
                                    long key = assumption1.getPeptide().getKey();
                                    TreeSet<Double> peps = assumptionPEPs.get(key);
                                    peps.add(assumptionParameter.getProbability());
                                    break;
                                }
                            }
                            if (!found2) {
                                TreeSet<Double> peps = new TreeSet<>();
                                peps.add(assumptionParameter.getProbability());
                                long key = peptideAssumption.getPeptide().getKey();
                                assumptionPEPs.put(key, peps);
                            }
                            break assumptionsLoop;
                        }
                    }
                }
            }
            Double bestSeP = null;
            int nSe = -1;
            for (PeptideAssumption peptideAssumption : inspectedAssumptions) {
                TreeSet<Double> peps = assumptionPEPs.get(peptideAssumption.getPeptide().getKey());
                double sep = peps.first();
                if (bestSeP == null || bestSeP > sep) {
                    bestSeP = sep;
                    nSe = peps.size();
                    bestPeptideAssumption = peptideAssumption;
                } else if (peps.size() > nSe) {
                    if (Math.abs(sep - bestSeP) <= 1e-10) {
                        nSe = peps.size();
                        bestPeptideAssumption = peptideAssumption;
                    }
                }
            }
        }
        // create a PeptideShaker match based on the best search engine match
        Peptide sePeptide = bestPeptideAssumption.getPeptide();
        Peptide psPeptide = new Peptide(sePeptide.getSequence());
        ModificationMatch[] seModificationMatches = sePeptide.getVariableModifications();
        if (seModificationMatches.length > 0) {
            psPeptide.setVariableModifications(Arrays.stream(seModificationMatches).map(modMatch -> new ModificationMatch(modMatch.getModification(), modMatch.getSite())).toArray(ModificationMatch[]::new));
        }
        psPeptide.setProteinMapping(sePeptide.getProteinMapping());
        psPeptide.estimateTheoreticMass(modificationParameters, sequenceProvider, modificationSequenceMatchingParameters);
        PeptideAssumption psAssumption = new PeptideAssumption(psPeptide, 1, Advocate.peptideShaker.getIndex(), bestPeptideAssumption.getIdentificationCharge(), bestP, bestP);
        spectrumMatch.setBestPeptideAssumption(psAssumption);
        identification.updateObject(spectrumMatch.getKey(), spectrumMatch);
        psmParameter = (PSParameter) spectrumMatch.getUrParam(PSParameter.dummy);
        psmParameter.setScore(bestP);
        PSParameter matchParameter = (PSParameter) bestPeptideAssumption.getUrParam(psmParameter);
        psmParameter.setAlgorithmDeltaPEP(matchParameter.getAlgorithmDeltaPEP());
        psmParameter.setDeltaPEP(matchParameter.getDeltaPEP());
    }
    // map of the tag first hits: score -> assumptions
    TreeMap<Double, ArrayList<TagAssumption>> tagAssumptions = spectrumMatch.getAllTagAssumptions().collect(Collectors.groupingBy(TagAssumption::getScore, TreeMap::new, Collectors.toCollection(ArrayList::new)));
    if (!tagAssumptions.isEmpty()) {
        Entry<Double, ArrayList<TagAssumption>> firstEntry = tagAssumptions.firstEntry();
        double bestEvalue = firstEntry.getKey();
        TagAssumption bestAssumption = firstEntry.getValue().get(0);
        identification.updateObject(spectrumMatch.getKey(), spectrumMatch);
        spectrumMatch.setBestTagAssumption(bestAssumption);
        if (spectrumMatch.getBestPeptideAssumption() == null) {
            psmParameter = new PSParameter();
            if (!multiSE) {
                psmParameter.setScore(bestEvalue);
            }
            psmParameter = (PSParameter) spectrumMatch.getUrParam(PSParameter.dummy);
            PSParameter matchParameter = (PSParameter) bestAssumption.getUrParam(psmParameter);
            psmParameter.setAlgorithmDeltaPEP(matchParameter.getAlgorithmDeltaPEP());
            psmParameter.setDeltaPEP(matchParameter.getDeltaPEP());
        }
    }
}
Also used : ModificationMatch(com.compomics.util.experiment.identification.matches.ModificationMatch) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Entry(java.util.Map.Entry) TagAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption) TreeSet(java.util.TreeSet) Peptide(com.compomics.util.experiment.biology.proteins.Peptide) PSParameter(com.compomics.util.experiment.identification.peptide_shaker.PSParameter) HashSet(java.util.HashSet) TreeMap(java.util.TreeMap) PeptideAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.PeptideAssumption)

Aggregations

TagAssumption (com.compomics.util.experiment.identification.spectrum_assumptions.TagAssumption)12 PeptideAssumption (com.compomics.util.experiment.identification.spectrum_assumptions.PeptideAssumption)11 ArrayList (java.util.ArrayList)10 SpectrumMatch (com.compomics.util.experiment.identification.matches.SpectrumMatch)8 TreeMap (java.util.TreeMap)8 Peptide (com.compomics.util.experiment.biology.proteins.Peptide)7 SequenceMatchingParameters (com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters)7 PSParameter (com.compomics.util.experiment.identification.peptide_shaker.PSParameter)6 PeptideSpectrumAnnotator (com.compomics.util.experiment.identification.spectrum_annotation.spectrum_annotators.PeptideSpectrumAnnotator)5 SequenceProvider (com.compomics.util.experiment.io.biology.protein.SequenceProvider)5 IdentificationParameters (com.compomics.util.parameters.identification.IdentificationParameters)5 ModificationParameters (com.compomics.util.parameters.identification.search.ModificationParameters)5 HashMap (java.util.HashMap)5 HashSet (java.util.HashSet)5 IonMatch (com.compomics.util.experiment.identification.matches.IonMatch)4 AnnotationParameters (com.compomics.util.experiment.identification.spectrum_annotation.AnnotationParameters)4 SpecificAnnotationParameters (com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters)4 TagSpectrumAnnotator (com.compomics.util.experiment.identification.spectrum_annotation.spectrum_annotators.TagSpectrumAnnotator)4 Spectrum (com.compomics.util.experiment.mass_spectrometry.spectra.Spectrum)4 SpectrumIdentificationAssumption (com.compomics.util.experiment.identification.SpectrumIdentificationAssumption)3