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

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


            waitingHandler.appendReport("Mapping de novo tags to peptides.", true, true);
            for (String key : tagMap.keySet()) {
            TagMatcher tagMatcher = new TagMatcher(searchParameters.getModificationProfile().getFixedModifications(), searchParameters.getModificationProfile().getAllNotFixedModifications(), sequenceMatchingPreferences);
                Iterator<SpectrumMatch> matchIterator = tagMap.get(key).iterator();
                while (matchIterator.hasNext()) {
                    SpectrumMatch spectrumMatch = matchIterator.next();
                    mapTagsForSpectrumMatch(spectrumMatch, tagMatcher, key, waitingHandler, !matchIterator.hasNext());
                }
            }
        }
    }
View Full Code Here


            for (String key : tagMap.keySet()) {
            TagMatcher tagMatcher = new TagMatcher(searchParameters.getModificationProfile().getFixedModifications(), searchParameters.getModificationProfile().getAllNotFixedModifications(), sequenceMatchingPreferences);
            tagMatcher.setSynchronizedIndexing(true);
                Iterator<SpectrumMatch> matchIterator = tagMap.get(key).iterator();
                while (matchIterator.hasNext()) {
                    SpectrumMatch spectrumMatch = matchIterator.next();
                    SpectrumMatchTagMapperRunnable tagMapperRunnable = new SpectrumMatchTagMapperRunnable(spectrumMatch, tagMatcher, key, waitingHandler, !matchIterator.hasNext());
                    pool.submit(tagMapperRunnable);
                    if (waitingHandler.isRunCanceled()) {
                        pool.shutdownNow();
                        return;
View Full Code Here

        identification.loadSpectrumMatchParameters(spectrumKeys, psParameter, null);

        for (String spectrumKey : spectrumKeys) {

            psParameter = (PSParameter) identification.getSpectrumMatchParameter(spectrumKey, psParameter);
            SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);

            if (spectrumMatch.getBestPeptideAssumption() != null) { // Should always be the case

                PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();
                peptide = peptideAssumption.getPeptide();

                int column = 1;
                HSSFRow rowHead = sheet.createRow(++currentRow);
                rowHead.setHeightInPoints(12.75f);
View Full Code Here

        public void run() {

            try {
                Iterator<SpectrumMatch> matchIterator = spectrumMatches.iterator();
                while (matchIterator.hasNext()) {
                    SpectrumMatch spectrumMatch = matchIterator.next();
                    if (!waitingHandler.isRunCanceled()) {
                        mapTagsForSpectrumMatch(spectrumMatch, tagMatcher, key, waitingHandler, !matchIterator.hasNext());
                    }
                }
            } catch (Exception e) {
View Full Code Here

                                if (progressDialog.isRunCanceled()) {
                                    break;
                                }

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

                                if (!bestAssumption.getPeptide().isDecoy(peptideShakerGUI.getSequenceMatchingPreferences()) || !onlyValidated) {
                                    if ((onlyValidated && psParameter.getMatchValidationLevel().isValidated()) || !onlyValidated) {
                                        if ((!includeHidden && !psParameter.isHidden()) || includeHidden) {
                                            if ((onlyStarred && psParameter.isStarred()) || !onlyStarred) {

                                                if (indexes) {
                                                    writer.write(++psmCounter + SEPARATOR);
                                                }

                                                if (accessions || proteinDescription) {

                                                    String proteinAccessions = "";
                                                    String proteinDescriptions = "";

                                                    boolean first = true;
                                                    for (String protein : bestAssumption.getPeptide().getParentProteins(peptideShakerGUI.getSequenceMatchingPreferences())) {
                                                        if (first) {
                                                            first = false;
                                                        } else {
                                                            if (accessions) {
                                                                proteinAccessions += ", ";
                                                            }
                                                            if (proteinDescription) {
                                                                proteinDescriptions += "; ";
                                                            }
                                                        }
                                                        if (accessions) {
                                                            proteinAccessions += protein;
                                                        }
                                                        if (proteinDescription) {
                                                            proteinDescriptions += sequenceFactory.getHeader(protein).getSimpleProteinDescription();
                                                        }
                                                    }
                                                    if (accessions) {
                                                        writer.write(proteinAccessions + SEPARATOR);
                                                    }
                                                    if (proteinDescription) {
                                                        writer.write(proteinDescriptions + SEPARATOR);
                                                    }
                                                }
                                                if (sequence) {
                                                    writer.write(bestAssumption.getPeptide().getSequence() + SEPARATOR);
                                                }
                                                if (modification) {
                                                    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());
                                                        }
                                                    }
                                                    boolean first = true, first2;
                                                    ArrayList<String> mods = new ArrayList<String>(modMap.keySet());
                                                    Collections.sort(mods);
                                                    for (String mod : mods) {
                                                        if (first) {
                                                            first = false;
                                                        } else {
                                                            writer.write(", ");
                                                        }
                                                        first2 = true;
                                                        writer.write(mod + "(");
                                                        for (int aa : modMap.get(mod)) {
                                                            if (first2) {
                                                                first2 = false;
                                                            } else {
                                                                writer.write(", ");
                                                            }
                                                            writer.write(aa + "");
                                                        }
                                                        writer.write(")");
                                                    }
                                                    writer.write(SEPARATOR);
                                                }
                                                if (location) {
                                                    ArrayList<String> modList = new ArrayList<String>();
                                                    for (ModificationMatch modificationMatch : bestAssumption.getPeptide().getModificationMatches()) {
                                                        if (modificationMatch.isVariable()) {
                                                            PTM refPtm = ptmFactory.getPTM(modificationMatch.getTheoreticPtm());
                                                            for (String equivalentPtm : ptmProfile.getSimilarNotFixedModifications(refPtm.getMass())) {
                                                                if (!modList.contains(equivalentPtm)) {
                                                                    modList.add(equivalentPtm);
                                                                }
                                                            }
                                                        }
                                                    }
                                                    Collections.sort(modList);
                                                    PSPtmScores ptmScores = new PSPtmScores();
                                                    boolean first = true;
                                                    for (String mod : modList) {
                                                        if (spectrumMatch.getUrParam(ptmScores) != null) {
                                                            if (first) {
                                                                first = false;
                                                            } else {
                                                                writer.write(", ");
                                                            }
                                                            ptmScores = (PSPtmScores) spectrumMatch.getUrParam(new PSPtmScores());
                                                            writer.write(mod + " (");
                                                            if (ptmScores != null && ptmScores.getPtmScoring(mod) != null) {
                                                                PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
                                                                boolean firstSite = true;
                                                                for (int site : ptmScoring.getOrderedPtmLocations()) {
                                                                    if (firstSite) {
                                                                        firstSite = false;
                                                                    } else {
                                                                        writer.write(", ");
                                                                    }
                                                                    int ptmConfidence = ptmScoring.getLocalizationConfidence(site);
                                                                    if (ptmConfidence == PtmScoring.NOT_FOUND) {
                                                                        writer.write(site + ": Not Scored"); // Well this should not happen
                                                                    } else if (ptmConfidence == PtmScoring.RANDOM) {
                                                                        writer.write(site + ": Random");
                                                                    } else if (ptmConfidence == PtmScoring.DOUBTFUL) {
                                                                        writer.write(site + ": Doubtfull");
                                                                    } else if (ptmConfidence == PtmScoring.CONFIDENT) {
                                                                        writer.write(site + ": Confident");
                                                                    } else if (ptmConfidence == PtmScoring.VERY_CONFIDENT) {
                                                                        writer.write(site + ": Very Confident");
                                                                    }
                                                                }
                                                            } else {
                                                                writer.write("Not Scored");
                                                            }
                                                            writer.write(")");
                                                        }
                                                    }
                                                    writer.write(SEPARATOR);
                                                    if (ptmScoringPreferences.isProbabilitsticScoreCalculation()) {
                                                        first = true;
                                                        for (String mod : modList) {
                                                            if (spectrumMatch.getUrParam(ptmScores) != null) {
                                                                if (first) {
                                                                    first = false;
                                                                } else {
                                                                    writer.write(", ");
                                                                }
                                                                ptmScores = (PSPtmScores) spectrumMatch.getUrParam(new PSPtmScores());
                                                                writer.write(mod + " (");
                                                                if (ptmScores != null && ptmScores.getPtmScoring(mod) != null) {
                                                                    PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
                                                                    boolean firstSite = true;
                                                                    ArrayList<Integer> sites = new ArrayList<Integer>(ptmScoring.getProbabilisticSites());
                                                                    Collections.sort(sites);
                                                                    for (int site : sites) {
                                                                        if (firstSite) {
                                                                            firstSite = false;
                                                                        } else {
                                                                            writer.write(", ");
                                                                        }
                                                                        writer.write(site + ": " + ptmScoring.getProbabilisticScore(site));
                                                                    }
                                                                } else {
                                                                    writer.write("Not Scored");
                                                                }
                                                                writer.write(")");
                                                            }
                                                        }
                                                    }
                                                    writer.write(SEPARATOR);
                                                    first = true;
                                                    for (String mod : modList) {
                                                        if (spectrumMatch.getUrParam(ptmScores) != null) {
                                                            if (first) {
                                                                first = false;
                                                            } else {
                                                                writer.write(", ");
                                                            }
                                                            ptmScores = (PSPtmScores) spectrumMatch.getUrParam(new PSPtmScores());
                                                            writer.write(mod + " (");
                                                            if (ptmScores != null && ptmScores.getPtmScoring(mod) != null) {
                                                                PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
                                                                boolean firstSite = true;
                                                                ArrayList<Integer> sites = new ArrayList<Integer>(ptmScoring.getDSites());
                                                                Collections.sort(sites);
                                                                for (int site : sites) {
                                                                    if (firstSite) {
                                                                        firstSite = false;
                                                                    } else {
                                                                        writer.write(", ");
                                                                    }
                                                                    writer.write(site + ": " + ptmScoring.getDeltaScore(site));
                                                                }
                                                            } else {
                                                                writer.write("Not Scored");
                                                            }
                                                            writer.write(")");
                                                        }
                                                    }
                                                    writer.write(SEPARATOR);
                                                }
                                                if (file) {
                                                    writer.write(spectrumFile + SEPARATOR);
                                                }
                                                if (title) {
                                                    writer.write(Spectrum.getSpectrumTitle(spectrumMatch.getKey()) + SEPARATOR);
                                                }
                                                if (precursor) {
                                                    Precursor prec = spectrumFactory.getPrecursor(spectrumMatch.getKey());
                                                    writer.write(prec.getMz() + SEPARATOR);
                                                    writer.write(prec.getPossibleChargesAsString() + SEPARATOR);
                                                    writer.write(bestAssumption.getIdentificationCharge().value + SEPARATOR);
                                                    writer.write(prec.getRt() + SEPARATOR);
                                                    writer.write(bestAssumption.getPeptide().getMass() + SEPARATOR);
View Full Code Here

                                if (progressDialog.isRunCanceled()) {
                                    break;
                                }

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

                                writer.write(++psmCounter + SEPARATOR);

                                String proteinAccessions = "";
                                String proteinDescriptions = "";

                                for (String protein : bestAssumption.getPeptide().getParentProteins(peptideShakerGUI.getSequenceMatchingPreferences())) {
                                    if (!proteinAccessions.equals("")) {
                                        proteinAccessions += ", ";
                                        proteinDescriptions += "; ";
                                    }
                                    proteinAccessions += protein;
                                    proteinDescriptions += sequenceFactory.getHeader(protein).getSimpleProteinDescription();
                                }
                                writer.write(proteinAccessions + SEPARATOR);
                                writer.write(proteinDescriptions + SEPARATOR);
                                String sequence = bestAssumption.getPeptide().getSequence();
                                writer.write(sequence + SEPARATOR);
                                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());
                                    }
                                }
                                boolean first = true, first2;
                                ArrayList<String> mods = new ArrayList<String>(modMap.keySet());
                                Collections.sort(mods);
                                for (String mod : mods) {
                                    if (first) {
                                        first = false;
                                    } else {
                                        writer.write(", ");
                                    }
                                    first2 = true;
                                    writer.write(mod + "(");
                                    for (int aa : modMap.get(mod)) {
                                        if (first2) {
                                            first2 = false;
                                        } else {
                                            writer.write(", ");
                                        }
                                        writer.write(aa + "");
                                    }
                                    writer.write(")");
                                }
                                writer.write(SEPARATOR);
                                int nPhospho = 0;
                                ArrayList<String> modList = new ArrayList<String>();
                                for (ModificationMatch modificationMatch : bestAssumption.getPeptide().getModificationMatches()) {
                                    if (modificationMatch.isVariable()) {
                                        String ptmName = modificationMatch.getTheoreticPtm();
                                        if (ptmName.contains("phospho")) {
                                            nPhospho++;
                                        }
                                        PTM refPtm = ptmFactory.getPTM(ptmName);
                                        for (String equivalentPtm : ptmProfile.getSimilarNotFixedModifications(refPtm.getMass())) {
                                            if (!modList.contains(equivalentPtm)) {
                                                modList.add(equivalentPtm);
                                            }
                                        }
                                    }
                                }

                                Collections.sort(modList);
                                PSPtmScores ptmScores = new PSPtmScores();
                                first = true;
                                StringBuilder dLocalizations = new StringBuilder();
                                StringBuilder probabilisticLocalizations = new StringBuilder();
                                String mdLocation = "";
                                String mdScore = "";
                                String[] split = sequence.split("[STY]");
                                int nSites = split.length - 1;
                                ArrayList<String> phosphoNames = new ArrayList<String>();

                                for (String mod : modList) {
                                    if (mod.contains("phospho")) {
                                        phosphoNames.add(mod);
                                        if (spectrumMatch.getUrParam(ptmScores) != null) {
                                            ptmScores = (PSPtmScores) spectrumMatch.getUrParam(new PSPtmScores());
                                            if (ptmScores != null && ptmScores.getPtmScoring(mod) != null) {
                                                PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
                                                ArrayList<Integer> sites = new ArrayList<Integer>(ptmScoring.getProbabilisticSites());
                                                Collections.sort(sites);
                                                for (Integer site : sites) {
                                                    if (probabilisticLocalizations.length() > 0) {
                                                        probabilisticLocalizations.append(", ");
                                                    }
                                                    probabilisticLocalizations.append(site.toString()).append(": ").append(ptmScoring.getProbabilisticScore(site));
                                                }
                                                sites = new ArrayList<Integer>(ptmScoring.getDSites());
                                                Collections.sort(sites);
                                                for (Integer site : sites) {
                                                    if (dLocalizations.length() > 0) {
                                                        dLocalizations.append(", ");
                                                    }
                                                    dLocalizations.append(site.toString()).append(": ").append(ptmScoring.getDeltaScore(site));
                                                }
                                            }
                                        }
                                    }
                                }
                                if (algorithms.size() == 1 && algorithms.get(0) == Advocate.mascot.getIndex()) {
                                    if (!phosphoNames.isEmpty() && spectrumMatch.hasAssumption(Advocate.mascot.getIndex())) {
                                        PeptideAssumption mascotAssumption = null;
                                        double bestScore = 0;
                                        for (ArrayList<SpectrumIdentificationAssumption> peptideAssumptionList : spectrumMatch.getAllAssumptions(Advocate.mascot.getIndex()).values()) {
                                            for (SpectrumIdentificationAssumption assumption : peptideAssumptionList) {
                                                PeptideAssumption peptideAssumption = (PeptideAssumption) assumption;
                                                MascotScore mascotScore = new MascotScore();
                                                mascotScore = (MascotScore) peptideAssumption.getUrParam(mascotScore);
                                                if (mascotScore.getScore() > bestScore) {
                                                    mascotAssumption = peptideAssumption;
                                                    bestScore = mascotScore.getScore();
                                                }
                                            }
                                        }
                                        if (mascotAssumption != null) {
                                            Peptide mascotPeptide = mascotAssumption.getPeptide();
                                            Double score = MDScore.getMDScore(spectrumMatch, mascotPeptide, phosphoNames, peptideShakerGUI.getSequenceMatchingPreferences());
                                            if (score != null) {
                                                mdScore = score.toString();
                                            }
                                            ArrayList<Integer> sites = new ArrayList<Integer>();
                                            for (ModificationMatch modificationMatch : mascotPeptide.getModificationMatches()) {
                                                if (modificationMatch.getTheoreticPtm().contains("phospho")) {
                                                    sites.add(modificationMatch.getModificationSite());
                                                }
                                            }
                                            Collections.sort(sites);
                                            for (int site : sites) {
                                                if (!mdLocation.equals("")) {
                                                    mdLocation += ", ";
                                                }
                                                mdLocation += site;
                                            }
                                        }
                                    }
                                }
                                if (ptmScoringPreferences.isProbabilitsticScoreCalculation()) {
                                    writer.write(probabilisticLocalizations + SEPARATOR);
                                }
                                writer.write(dLocalizations + SEPARATOR);
                                if (algorithms.size() == 1 && algorithms.get(0) == Advocate.mascot.getIndex()) {
                                    writer.write(mdLocation + SEPARATOR);
                                    writer.write(mdScore + SEPARATOR);
                                }
                                writer.write(nPhospho + SEPARATOR);
                                writer.write(nSites + SEPARATOR);
                                writer.write(spectrumFile + SEPARATOR);
                                writer.write(Spectrum.getSpectrumTitle(spectrumMatch.getKey()) + SEPARATOR);
                                Precursor prec = spectrumFactory.getPrecursor(spectrumMatch.getKey());
                                writer.write(prec.getMz() + SEPARATOR);
                                writer.write(bestAssumption.getIdentificationCharge().value + SEPARATOR);
                                writer.write(prec.getRt() + SEPARATOR);
                                writer.write(bestAssumption.getPeptide().getMass() + SEPARATOR);
                                writer.write(bestAssumption.getDeltaMass(prec.getMz(), peptideShakerGUI.getSearchParameters().isPrecursorAccuracyTypePpm()) + SEPARATOR);
View Full Code Here

                                if (progressDialog.isRunCanceled()) {
                                    break;
                                }

                                SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                                psParameter = (PSParameter) identification.getSpectrumMatchParameter(spectrumKey, psParameter);

                                if (!onlyValidated || psParameter.getMatchValidationLevel().isValidated()) {
                                    for (int se : spectrumMatch.getAdvocates()) {
                                        ArrayList<Double> eValues = new ArrayList<Double>(spectrumMatch.getAllAssumptions(se).keySet());
                                        Collections.sort(eValues);
                                        rank = 1;
                                        for (double eValue : eValues) {
                                            for (SpectrumIdentificationAssumption assumption : spectrumMatch.getAllAssumptions(se).get(eValue)) {
                                                if (assumption instanceof PeptideAssumption) {
                                                    PeptideAssumption peptideAssumption = (PeptideAssumption) assumption;
                                                    writer.write(Advocate.getAdvocate(se).getName() + SEPARATOR);
                                                    writer.write(rank + SEPARATOR);
                                                    if (accession || proteinDescription) {

                                                        String proteinAccessions = "";
                                                        String proteinDescriptions = "";

                                                        boolean first = true;
                                                        for (String protein : peptideAssumption.getPeptide().getParentProteins(peptideShakerGUI.getSequenceMatchingPreferences())) {
                                                            if (first) {
                                                                first = false;
                                                            } else {
                                                                if (accession) {
                                                                    proteinAccessions += ", ";
                                                                }
                                                                if (proteinDescription) {
                                                                    proteinDescriptions += "; ";
                                                                }
                                                            }
                                                            if (accession) {
                                                                proteinAccessions += protein;
                                                            }
                                                            if (proteinDescription) {
                                                                proteinDescriptions += sequenceFactory.getHeader(protein).getSimpleProteinDescription();
                                                            }
                                                        }
                                                        if (accession) {
                                                            writer.write(proteinAccessions + SEPARATOR);
                                                        }
                                                        if (proteinDescription) {
                                                            writer.write(proteinDescriptions + SEPARATOR);
                                                        }
                                                    }
                                                    if (sequence) {
                                                        writer.write(peptideAssumption.getPeptide().getSequence() + SEPARATOR);
                                                    }
                                                    if (modifications) {
                                                        boolean first = true;
                                                        for (ModificationMatch modificationMatch : peptideAssumption.getPeptide().getModificationMatches()) {
                                                            if (modificationMatch.isVariable()) {
                                                                if (first) {
                                                                    first = false;
                                                                } else {
                                                                    writer.write(", ");
                                                                }
                                                                String modName = modificationMatch.getTheoreticPtm();
                                                                writer.write(modName + "(" + modificationMatch.getModificationSite() + ")");
                                                            }
                                                        }
                                                        writer.write(SEPARATOR);
                                                    }
                                                    if (file) {
                                                        writer.write(Spectrum.getSpectrumFile(spectrumMatch.getKey()) + SEPARATOR);
                                                    }
                                                    if (title) {
                                                        writer.write(Spectrum.getSpectrumTitle(spectrumMatch.getKey()) + SEPARATOR);
                                                    }
                                                    if (precursor) {
                                                        Precursor prec = spectrumFactory.getPrecursor(spectrumMatch.getKey());
                                                        writer.write(prec.getMz() + SEPARATOR);
                                                        writer.write(peptideAssumption.getIdentificationCharge().value + SEPARATOR);
                                                        writer.write(prec.getRt() + SEPARATOR);
                                                        writer.write(peptideAssumption.getPeptide().getMass() + SEPARATOR);
                                                        writer.write(peptideAssumption.getDeltaMass(prec.getMz(),
                                                                peptideShakerGUI.getSearchParameters().isPrecursorAccuracyTypePpm()) + SEPARATOR);
                                                        writer.write(peptideAssumption.getIsotopeNumber(prec.getMz()) + SEPARATOR);
                                                    }
                                                    if (scores) {
                                                        for (Integer advocateIndex : peptideShakerGUI.getProjectDetails().getIdentificationAlgorithms()) {
                                                            if (se == advocateIndex) {
                                                                writer.write("" + eValue);
                                                            }
                                                            writer.write(SEPARATOR);
                                                        }
                                                    }
                                                    if (confidence) {
                                                        psParameter = (PSParameter) peptideAssumption.getUrParam(psParameter);
                                                        writer.write(psParameter.getSearchEngineConfidence() + SEPARATOR);
                                                    }
                                                    if (peptideAssumption.getPeptide().isSameSequenceAndModificationStatus(spectrumMatch.getBestPeptideAssumption().getPeptide(), peptideShakerGUI.getSequenceMatchingPreferences())) {
                                                        writer.write(1 + SEPARATOR);
                                                    } else {
                                                        writer.write(0 + SEPARATOR);
                                                    }
                                                    if (peptideAssumption.getPeptide().isDecoy(peptideShakerGUI.getSequenceMatchingPreferences())) {
View Full Code Here

    public void importPsmsMultipleThreads(LinkedList<SpectrumMatch> idFileSpectrumMatches, int nThreads, WaitingHandler waitingHandler)
            throws IOException, SQLException, FileNotFoundException, InterruptedException, ClassNotFoundException, MzMLUnmarshallerException {

        ExecutorService pool = Executors.newFixedThreadPool(nThreads);
        while (!idFileSpectrumMatches.isEmpty()) {
            SpectrumMatch match = idFileSpectrumMatches.pollLast();
            PsmImporterRunnable psmImporterRunnable = new PsmImporterRunnable(match, waitingHandler);
            pool.submit(psmImporterRunnable);
            if (waitingHandler.isRunCanceled()) {
                pool.shutdownNow();
                return;
View Full Code Here

     */
    private void importPsmsSingleThread(LinkedList<SpectrumMatch> idFileSpectrumMatches, WaitingHandler waitingHandler)
            throws IOException, SQLException, FileNotFoundException, InterruptedException, ClassNotFoundException, MzMLUnmarshallerException {

        while (!idFileSpectrumMatches.isEmpty()) {
            SpectrumMatch match = idFileSpectrumMatches.pollLast();
            importPsm(match, waitingHandler);
        }
    }
View Full Code Here

                if (!psParameter.isHidden()) {
                    if (psParameter.getMatchValidationLevel().isValidated()) {
                        nValidatedPsms++;
                    }

                    SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumKey);
                    int charge = spectrumMatch.getBestPeptideAssumption().getIdentificationCharge().value;
                    if (!orderingMap.containsKey(charge)) {
                        orderingMap.put(charge, new HashMap<Double, ArrayList<String>>());
                    }
                    if (hasRT) {
                        try {
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.