Package com.compomics.util.experiment.identification.matches

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


        }

        for (String spectrumFileName : identification.getSpectrumFiles()) {
            identification.loadSpectrumMatches(spectrumFileName, null);
            for (String spectrumKey : spectrumKeys.get(spectrumFileName)) {
                SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                if (spectrumMatch.getBestPeptideAssumption() != null) {
                    scorePTMs(identification, spectrumMatch, searchParameters, annotationPreferences, ptmScoringPreferences, sequenceMatchingPreferences, waitingHandler);
                }
            }
        }
View Full Code Here


        HashMap<String, HashMap<Double, ArrayList<String>>> notConfidentPeptideInference = new HashMap<String, HashMap<Double, ArrayList<String>>>();

        for (String spectrumFileName : identification.getSpectrumFiles()) {
            identification.loadSpectrumMatches(spectrumFileName, null);
            for (String spectrumKey : identification.getSpectrumIdentification(spectrumFileName)) {
                SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                if (spectrumMatch.getBestPeptideAssumption() != null) {
                    boolean variableAA = false;
                    for (ModificationMatch modificationMatch : spectrumMatch.getBestPeptideAssumption().getPeptide().getModificationMatches()) {
                        if (modificationMatch.isVariable()) {
                            String modName = modificationMatch.getTheoreticPtm();
                            PTM ptm = ptmFactory.getPTM(modName);
                            if (ptm.getType() == PTM.MODAA) {
                                variableAA = true;
                                break;
                            }
                        }
                    }
                    if (variableAA) {
                        ptmSiteInference(spectrumMatch, ptmScoringPreferences, searchParameters, sequenceMatchingPreferences);
                        boolean confident = true;
                        for (ModificationMatch modMatch : spectrumMatch.getBestPeptideAssumption().getPeptide().getModificationMatches()) {
                            if (modMatch.isVariable()) {
                                String modName = modMatch.getTheoreticPtm();
                                PTM ptm = ptmFactory.getPTM(modName);
                                double ptmMass = ptm.getMass();
                                if (ptm.getType() == PTM.MODAA) {
                                    if (!modMatch.isConfident()) {
                                        HashMap<Double, ArrayList<String>> fileMap = notConfidentPeptideInference.get(spectrumFileName);
                                        if (fileMap == null) {
                                            fileMap = new HashMap<Double, ArrayList<String>>();
                                            notConfidentPeptideInference.put(spectrumFileName, fileMap);
                                        }
                                        ArrayList<String> spectra = fileMap.get(ptmMass);
                                        if (spectra == null) {
                                            spectra = new ArrayList<String>();
                                            fileMap.put(ptmMass, spectra);
                                        }
                                        spectra.add(spectrumKey);
                                        confident = false;
                                    } else {
                                        HashMap<String, ArrayList<String>> modMap = confidentPeptideInference.get(ptmMass);
                                        if (modMap == null) {
                                            modMap = new HashMap<String, ArrayList<String>>();
                                            confidentPeptideInference.put(ptmMass, modMap);
                                        }
                                        String sequence = spectrumMatch.getBestPeptideAssumption().getPeptide().getSequence();
                                        ArrayList<String> spectra = modMap.get(sequence);
                                        if (spectra == null) {
                                            spectra = new ArrayList<String>();
                                            modMap.put(sequence, spectra);
                                        }
                                        spectra.add(spectrumKey);
                                    }
                                }
                            }
                        }
                        identification.updateSpectrumMatch(spectrumMatch);
                        if (confident) {
                            waitingHandler.increaseSecondaryProgressCounter();
                        }
                        if (waitingHandler.isRunCanceled()) {
                            return;
                        }
                    } else {
                        waitingHandler.increaseSecondaryProgressCounter();
                        if (waitingHandler.isRunCanceled()) {
                            return;
                        }
                    }
                }
            }
        }
        // try to infer the modification site based on any related peptide
        for (String spectrumFile : notConfidentPeptideInference.keySet()) {

            HashSet<String> progress = new HashSet<String>();
            HashMap<Double, ArrayList<String>> peptidesOfFile = notConfidentPeptideInference.get(spectrumFile);

            for (Double ptmMass : peptidesOfFile.keySet()) {

                ArrayList<String> spectrumKeys = peptidesOfFile.get(ptmMass);

                identification.loadSpectrumMatches(spectrumKeys, null);

                for (String spectrumKey : spectrumKeys) {

                    SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                    Peptide peptide = spectrumMatch.getBestPeptideAssumption().getPeptide();
                    String sequence = peptide.getSequence();
                    String notConfidentKey = peptide.getMatchingKey(sequenceMatchingPreferences);
                    int nMod = Peptide.getModificationCount(notConfidentKey, ptmMass);
                    ArrayList<Integer> tempLocalizations, oldLocalizations = Peptide.getNModificationLocalized(notConfidentKey, ptmMass);
                    ArrayList<Integer> newLocalizationCandidates = new ArrayList<Integer>();

                    HashMap<String, ArrayList<String>> ptmConfidentPeptides = confidentPeptideInference.get(ptmMass);

                    if (ptmConfidentPeptides != null) {

                        // See if we can explain this peptide by another already identified peptide with the same number of modifications (the two peptides will be merged)
                        ArrayList<String> keys = ptmConfidentPeptides.get(sequence);

                        if (keys != null) {
                            for (String tempKey : keys) {
                                SpectrumMatch secondaryMatch = identification.getSpectrumMatch(tempKey);
                                String secondaryKey = secondaryMatch.getBestPeptideAssumption().getPeptide().getMatchingKey(sequenceMatchingPreferences);
                                if (Peptide.getModificationCount(secondaryKey, ptmMass) == nMod) {
                                    tempLocalizations = Peptide.getNModificationLocalized(secondaryKey, ptmMass);
                                    for (int localization : tempLocalizations) {
                                        if (!oldLocalizations.contains(localization) && !newLocalizationCandidates.contains(localization)) {
                                            newLocalizationCandidates.add(localization);
                                        }
                                    }
                                }
                            }
                            if (oldLocalizations.size() + newLocalizationCandidates.size() < nMod) {
                                // we cannot merge this peptide, see whether we can explain the remaining modifications using peptides with the same sequence but other modification profile
                                for (String tempKey : keys) {
                                    SpectrumMatch secondaryMatch = identification.getSpectrumMatch(tempKey);
                                    String secondaryKey = secondaryMatch.getBestPeptideAssumption().getPeptide().getMatchingKey(sequenceMatchingPreferences);
                                    tempLocalizations = Peptide.getNModificationLocalized(secondaryKey, ptmMass);
                                    for (int localization : tempLocalizations) {
                                        if (!oldLocalizations.contains(localization) && !newLocalizationCandidates.contains(localization)) {
                                            newLocalizationCandidates.add(localization);
                                        }
                                    }
                                }
                            }
                        }
                        if (oldLocalizations.size() + newLocalizationCandidates.size() < nMod) {
                            // There are still unexplained sites, let's see if we find a related peptide which can help.
                            HashMap<String, ArrayList<String>> confidentAtMass = confidentPeptideInference.get(ptmMass);
                            for (String otherSequence : confidentAtMass.keySet()) {
                                if (!sequence.equals(otherSequence) && sequence.contains(otherSequence)) {
                                    for (String tempKey : confidentAtMass.get(otherSequence)) {
                                        SpectrumMatch secondaryMatch = identification.getSpectrumMatch(tempKey);
                                        String secondaryKey = secondaryMatch.getBestPeptideAssumption().getPeptide().getMatchingKey(sequenceMatchingPreferences);
                                        tempLocalizations = Peptide.getNModificationLocalized(secondaryKey, ptmMass);
                                        int tempIndex, ref = 0;
                                        String tempSequence = sequence;
                                        while ((tempIndex = tempSequence.indexOf(otherSequence)) >= 0) {
                                            ref += tempIndex;
                                            for (int localization : tempLocalizations) {
                                                int shiftedLocalization = ref + localization;
                                                if (!oldLocalizations.contains(shiftedLocalization) && !newLocalizationCandidates.contains(shiftedLocalization)) {
                                                    boolean candidatePtm = false;
                                                    for (String ptmName : searchParameters.getModificationProfile().getAllNotFixedModifications()) {
                                                        PTM ptm = ptmFactory.getPTM(ptmName);
                                                        if (ptm.getType() == PTM.MODAA && ptm.getMass() == ptm.getMass() && peptide.getPotentialModificationSites(ptm, sequenceMatchingPreferences).contains(shiftedLocalization)) {
                                                            candidatePtm = true;
                                                            break;
                                                        }
                                                    }
                                                    if (candidatePtm) {
                                                        newLocalizationCandidates.add(shiftedLocalization);
                                                    }
                                                }
                                            }
                                            tempSequence = tempSequence.substring(tempIndex + 1);
                                            ref++;
                                        }
                                    }
                                } else if (!sequence.equals(otherSequence) && otherSequence.contains(sequence)) {
                                    for (String tempKey : confidentAtMass.get(otherSequence)) {
                                        SpectrumMatch secondaryMatch = identification.getSpectrumMatch(tempKey);
                                        String secondaryKey = secondaryMatch.getBestPeptideAssumption().getPeptide().getMatchingKey(sequenceMatchingPreferences);
                                        tempLocalizations = Peptide.getNModificationLocalized(secondaryKey, ptmMass);
                                        int tempIndex, ref = 0;
                                        String tempSequence = otherSequence;
                                        while ((tempIndex = tempSequence.indexOf(sequence)) >= 0) {
                                            ref += tempIndex;
View Full Code Here

                        if (identification.matchExists(spectrumKey)) {
                            psParameter = (PSParameter) identification.getSpectrumMatchParameter(spectrumKey, psParameter);

                            if (psParameter.getMatchValidationLevel().isValidated()) {

                                SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                                if (spectrumMatch.getBestPeptideAssumption() != null) {
                                    Peptide peptide = spectrumMatch.getBestPeptideAssumption().getPeptide();

                                    if (exportType != ExportType.confident_ptms || isTargetedPeptide(peptide, targetedPTMs)) {

                                        boolean decoy = false;
                                        for (String protein : peptide.getParentProteins(sequenceMatchingPreferences)) {
View Full Code Here

     * @throws InterruptedException
     */
    private static void writePsm(BufferedWriter writer, String spectrumKey, ArrayList<String> accessions, Identification identification, SequenceMatchingPreferences sequenceMatchingPreferences)
            throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException, InterruptedException {

        SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
        PSParameter psParameter = new PSParameter();
        psParameter = (PSParameter) identification.getSpectrumMatchParameter(spectrumKey, psParameter);
        PeptideAssumption bestAssumption = spectrumMatch.getBestPeptideAssumption();

        if (accessions == null) {
            accessions = bestAssumption.getPeptide().getParentProteins(sequenceMatchingPreferences);
        }

        for (String protein : accessions) {

            // peptide sequence
            writer.write(bestAssumption.getPeptide().getSequence() + SEPARATOR);

            // modifications
            HashMap<String, ArrayList<Integer>> modMap = new HashMap<String, ArrayList<Integer>>();
            for (ModificationMatch modificationMatch : bestAssumption.getPeptide().getModificationMatches()) {

                if (modificationMatch.isVariable()) {
                    if (!modMap.containsKey(modificationMatch.getTheoreticPtm())) {
                        modMap.put(modificationMatch.getTheoreticPtm(), new ArrayList<Integer>());
                    }
                    modMap.get(modificationMatch.getTheoreticPtm()).add(modificationMatch.getModificationSite());
                }
            }

            ArrayList<String> mods = new ArrayList<String>(modMap.keySet());

            for (int i = 0; i < bestAssumption.getPeptide().getSequence().length() + 1; i++) {

                String allMods = "";

                for (int k = 0; k < mods.size(); k++) {

                    String tempMod = mods.get(k);

                    if (modMap.get(tempMod).contains(Integer.valueOf(i))) {

                        if (allMods.length() > 0) {
                            allMods += ", ";
                        }

                        allMods += tempMod;
                    }
                }

                writer.write(allMods + ":");
            }

            writer.write(SEPARATOR);

            // score
            writer.write(psParameter.getPsmConfidence() + SEPARATOR);

            // main AC
            writer.write(protein + SEPARATOR);

            // description
            String description = SequenceFactory.getInstance().getHeader(protein).getSimpleProteinDescription();
            writer.write(description + SEPARATOR);

            // compound
            writer.write(Spectrum.getSpectrumTitle(spectrumMatch.getKey()) + SEPARATOR);

            // jobid
            writer.write("N/A" + SEPARATOR);

            // pmkey
View Full Code Here

                    }
                    if (!precursorRawMap.get(precursorRT).containsKey(precursorMz)) {
                        precursorRawMap.get(precursorRT).put(precursorMz, new ArrayList<Double>());
                    }

                    SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);

                    if (spectrumMatch.getBestPeptideAssumption() != null) {

                        double error = spectrumMatch.getBestPeptideAssumption().getDeltaMass(precursorMz, false);
                        precursorRawMap.get(precursorRT).get(precursorMz).add(error);

                        MSnSpectrum currentSpectrum = (MSnSpectrum) spectrumFactory.getSpectrum(spectrumKey);
                        ArrayList<IonMatch> annotations = spectrumAnnotator.getSpectrumAnnotation(
                                annotationPreferences.getIonTypes(),
                                annotationPreferences.getNeutralLosses(),
                                annotationPreferences.getValidatedCharges(),
                                spectrumMatch.getBestPeptideAssumption().getIdentificationCharge().value,
                                currentSpectrum,
                                spectrumMatch.getBestPeptideAssumption().getPeptide(),
                                currentSpectrum.getIntensityLimit(annotationPreferences.getAnnotationIntensityLimit()),
                                annotationPreferences.getFragmentIonAccuracy(), false, annotationPreferences.isHighResolutionAnnotation());
                        spectrumFragmentMap = new HashMap<Double, ArrayList<Double>>();

                        for (IonMatch ionMatch : annotations) {
View Full Code Here

                updateSpectrumMatchValidationLevel(identification, identificationFeaturesGenerator, searchParameters, sequenceMatchingPreferences, annotationPreferences, peptideSpectrumAnnotator, psmMap, spectrumKey);
                psParameter = (PSParameter) identification.getSpectrumMatchParameter(spectrumKey, psParameter);

                if (psParameter.getMatchValidationLevel().isValidated()) {

                    SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                    PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();

                    if (peptideAssumption != null) {

                        Precursor precursor = spectrumFactory.getPrecursor(spectrumKey);
                        double precursorMzError = peptideAssumption.getDeltaMass(precursor.getMz(), searchParameters.isPrecursorAccuracyTypePpm());
                        precursorMzDeviations.add(precursorMzError);
                        Integer charge = peptideAssumption.getIdentificationCharge().value;

                        if (!charges.contains(charge)) {
                            charges.add(charge);
                            PsmFilter psmFilter = new PsmFilter(">30% Fragment Ion Sequence Coverage");
                            psmFilter.setDescription("<30% sequence coverage by fragment ions");
                            psmFilter.setSequenceCoverage(30.0); // @TODO: make the doubtfulThreshold editable by the user!
                            psmFilter.setSequenceCoverageComparison(RowFilter.ComparisonType.AFTER);
                            psmMap.addDoubtfulMatchesFilter(charge, spectrumFileName, psmFilter);
                        }

                        if (inputMap != null) {

                            Peptide bestPeptide = peptideAssumption.getPeptide();
                            ArrayList<Integer> agreementAdvocates = new ArrayList<Integer>();

                            for (int advocateId : spectrumMatch.getAdvocates()) {
                                for (SpectrumIdentificationAssumption spectrumIdentificationAssumption : spectrumMatch.getFirstHits(advocateId)) {
                                    if (spectrumIdentificationAssumption instanceof PeptideAssumption) {
                                        Peptide advocatePeptide = ((PeptideAssumption) spectrumIdentificationAssumption).getPeptide();
                                        if (bestPeptide.isSameSequenceAndModificationStatus(advocatePeptide, sequenceMatchingPreferences)) {
                                            agreementAdvocates.add(advocateId);
                                            break;
                                        }
                                    }
                                }
                            }

                            boolean unique = agreementAdvocates.size() == 1;

                            for (int advocateId : agreementAdvocates) {
                                inputMap.addAdvocateContribution(advocateId, spectrumFileName, unique);
                            }

                            inputMap.addAdvocateContribution(Advocate.peptideShaker.getIndex(), spectrumFileName, agreementAdvocates.isEmpty());
                        }
                    }
                }

                // go through the peptide assumptions
                if (inputMap != null) { //backward compatibility check
                    SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);

                    for (Integer advocateId : spectrumMatch.getAdvocates()) {

                        HashMap<Double, ArrayList<SpectrumIdentificationAssumption>> assumptions = spectrumMatch.getAllAssumptions(advocateId);

                        for (double eValue : assumptions.keySet()) {
                            for (SpectrumIdentificationAssumption spectrumIdAssumption : assumptions.get(eValue)) {
                                if (spectrumIdAssumption instanceof PeptideAssumption) {
                                    PeptideAssumption peptideAssumption = (PeptideAssumption) spectrumIdAssumption;
                                    updatePeptideAssumptionValidationLevel(identificationFeaturesGenerator, searchParameters, annotationPreferences, inputMap, spectrumKey, peptideAssumption, peptideSpectrumAnnotator);
                                } else if (spectrumIdAssumption instanceof TagAssumption) {
                                    TagAssumption tagAssumption = (TagAssumption) spectrumIdAssumption;
                                    updateTagAssumptionValidationLevel(identificationFeaturesGenerator, searchParameters, annotationPreferences, inputMap, spectrumKey, tagAssumption);
                                }
                            }
                        }
                    }
                }

                if (waitingHandler != null) {
                    waitingHandler.increaseSecondaryProgressCounter();
                    if (waitingHandler.isRunCanceled()) {
                        return;
                    }
                }
            }

            // check if we should narrow the mass accuracy window, if yes, do a second pass validation
            if (!precursorMzDeviations.isEmpty()) {

                NonSymmetricalNormalDistribution precDeviationDistribution = NonSymmetricalNormalDistribution.getRobustNonSymmetricalNormalDistribution(precursorMzDeviations);
                Double minDeviation = precDeviationDistribution.getMinValueForProbability(0.0001);
                Double maxDeviation = precDeviationDistribution.getMaxValueForProbability(0.0001);
                boolean needSecondPass = false;

                if (minDeviation < maxDeviation) {
                    String unit = "ppm";
                    if (!searchParameters.isPrecursorAccuracyTypePpm()) {
                        unit = "Da";
                    }
                    if (minDeviation != Double.NaN && minDeviation > -searchParameters.getPrecursorAccuracy()) {
                        needSecondPass = true;
                        PsmFilter psmFilter = new PsmFilter("Precursor m/z deviation > " + Util.roundDouble(minDeviation, 2) + " " + unit);
                        psmFilter.setDescription("Precursor m/z deviation < " + Util.roundDouble(minDeviation, 2) + " " + unit);
                        psmFilter.setMinPrecursorMzError(minDeviation);
                        psmFilter.setPrecursorMinMzErrorComparison(RowFilter.ComparisonType.AFTER);
                        for (int charge : charges) {
                            psmMap.addDoubtfulMatchesFilter(charge, spectrumFileName, psmFilter);
                        }
                    }
                    if (minDeviation != Double.NaN && maxDeviation < searchParameters.getPrecursorAccuracy()) {
                        needSecondPass = true;
                        PsmFilter psmFilter = new PsmFilter("Precursor m/z deviation < " + Util.roundDouble(maxDeviation, 2) + " " + unit);
                        psmFilter.setDescription("Precursor m/z deviation > " + Util.roundDouble(maxDeviation, 2) + " " + unit);
                        psmFilter.setMaxPrecursorMzError(maxDeviation);
                        psmFilter.setPrecursorMaxMzErrorComparison(RowFilter.ComparisonType.BEFORE);
                        for (int charge : charges) {
                            psmMap.addDoubtfulMatchesFilter(charge, spectrumFileName, psmFilter);
                        }
                    }
                }

                if (needSecondPass) {

                    if (inputMap != null) {
                        inputMap.resetAdvocateContributions(spectrumFileName);
                    }

                    for (String spectrumKey : identification.getSpectrumIdentification(spectrumFileName)) {

                        updateSpectrumMatchValidationLevel(identification, identificationFeaturesGenerator, searchParameters, sequenceMatchingPreferences, annotationPreferences, peptideSpectrumAnnotator, psmMap, spectrumKey);
                        psParameter = (PSParameter) identification.getSpectrumMatchParameter(spectrumKey, psParameter);

                        if (psParameter.getMatchValidationLevel().isValidated()) {

                            SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                            PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();

                            if (peptideAssumption != null) {
                                if (inputMap != null) {
                                    Peptide bestPeptide = peptideAssumption.getPeptide();
                                    ArrayList<Integer> agreementAdvocates = new ArrayList<Integer>();
                                    for (int advocateId : spectrumMatch.getAdvocates()) {
                                        for (SpectrumIdentificationAssumption spectrumIdentificationAssumption : spectrumMatch.getFirstHits(advocateId)) {
                                            if (spectrumIdentificationAssumption instanceof PeptideAssumption) {
                                                Peptide advocatePeptide = ((PeptideAssumption) spectrumIdentificationAssumption).getPeptide();
                                                if (bestPeptide.isSameSequenceAndModificationStatus(advocatePeptide, sequenceMatchingPreferences)) {
                                                    agreementAdvocates.add(advocateId);
                                                    break;
View Full Code Here

        SpectrumFactory spectrumFactory = SpectrumFactory.getInstance();

        for (String spectrumKey : spectrumKeys) {
            try {
                MSnSpectrum spectrum = (MSnSpectrum) spectrumFactory.getSpectrum(spectrumKey);
                SpectrumMatch spectrumMatch = peptideShakerGUI.getIdentification().getSpectrumMatch(spectrumKey);
                tempContent = PtmtableContent.getPTMTableContent(peptide, ptm, nPTM, spectrum, annotationPreferences.getIonTypes(),
                        annotationPreferences.getNeutralLosses(), annotationPreferences.getValidatedCharges(),
                        spectrumMatch.getBestPeptideAssumption().getIdentificationCharge().value,
                        annotationPreferences.getFragmentIonAccuracy(), spectrum.getIntensityLimit(annotationPreferences.getAnnotationIntensityLimit()));
                tempContent.normalize();
                tableContent.addAll(tempContent);
            } catch (Exception e) {
                peptideShakerGUI.catchException(e);
View Full Code Here

            }

            if (!noValidated && psParameter.getPsmProbabilityScore() <= psmThreshold) {

                String spectrumFile = Spectrum.getSpectrumFile(spectrumKey);
                SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                if (spectrumMatch.getBestPeptideAssumption() != null) {
                    // update the annotation preferences for the new psm, mainly the charge
                    annotationPreferences.setCurrentSettings(spectrumMatch.getBestPeptideAssumption(), true, sequenceMatchingPreferences);
                } else if (spectrumMatch.getBestTagAssumption() != null) {
                    charge = spectrumMatch.getBestTagAssumption().getIdentificationCharge().value;
                } else {
                    throw new IllegalArgumentException("No best tag or peptide found for spectrum " + spectrumKey);
                }

                String reasonDoubtful = null;
View Full Code Here

    private void insertBarCharts() {

        AnnotationPreferences annotationPreferences = peptideShakerGUI.getAnnotationPreferences();
        PtmtableContent tempContent, tableContent = new PtmtableContent();
        MSnSpectrum spectrum;
        SpectrumMatch spectrumMatch;
        SpectrumFactory spectrumFactory = SpectrumFactory.getInstance();
        PTMFactory ptmFactory = PTMFactory.getInstance();
        String ptmName = ptm.getName(), shortName = ptmFactory.getShortName(ptmName);

        for (String spectrumKey : spectrumKeys) {
            try {
                spectrum = (MSnSpectrum) spectrumFactory.getSpectrum(spectrumKey);
                spectrumMatch = peptideShakerGUI.getIdentification().getSpectrumMatch(spectrumKey);
                tempContent = PtmtableContent.getPTMTableContent(peptide, ptm, nPTM, spectrum, annotationPreferences.getIonTypes(),
                        annotationPreferences.getNeutralLosses(), annotationPreferences.getValidatedCharges(),
                        spectrumMatch.getBestPeptideAssumption().getIdentificationCharge().value,
                        annotationPreferences.getFragmentIonAccuracy(), spectrum.getIntensityLimit(annotationPreferences.getAnnotationIntensityLimit()));
                tempContent.normalize();
                tableContent.addAll(tempContent);
            } catch (Exception e) {
                peptideShakerGUI.catchException(e);
View Full Code Here

TOP

Related Classes of com.compomics.util.experiment.identification.matches.SpectrumMatch

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.