Examples of PSMaps


Examples of eu.isas.peptideshaker.myparameters.PSMaps

            PSParameter psmProbabilities = new PSParameter();

            progressDialog.setTitle("Creating PRIDE XML File. Please Wait...  (Part 2 of 2: Exporting IDs)");
            long increment = totalProgress / (2 * identification.getProteinIdentification().size());

            PSMaps pSMaps = new PSMaps();
            pSMaps = (PSMaps) identification.getUrParam(pSMaps);
            ProteinMap proteinTargetDecoyMap = pSMaps.getProteinMap();
            PsmSpecificMap psmTargetDecoyMap = pSMaps.getPsmSpecificMap();
            PeptideSpecificMap peptideTargetDecoyMap = pSMaps.getPeptideSpecificMap();

            // get the list of algorithms used
            String searchEngineReport;
            ArrayList<Integer> seList = projectDetails.getIdentificationAlgorithms();
            Collections.sort(seList);
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

     * @param mainMatch the protein match to use
     * @param proteinInferenceType the protein inference group type
     */
    public void updateMainMatch(String mainMatch, int proteinInferenceType) {
        try {
            PSMaps psMaps = new PSMaps();
            psMaps = (PSMaps) getIdentification().getUrParam(psMaps);
            PsmPTMMap psmPTMMap = psMaps.getPsmPTMMap();
            PtmScorer ptmScorer = new PtmScorer(psmPTMMap);
            Identification identification = getIdentification();
            ProteinMatch proteinMatch = identification.getProteinMatch(selectedProteinKey);
            ptmScorer.scorePTMs(identification, proteinMatch, getSearchParameters(), getAnnotationPreferences(), false, getPtmScoringPreferences(), getSequenceMatchingPreferences());
        } catch (Exception e) {
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

        psmTable.getColumn("Mass Error").setCellRenderer(new JSparklinesBarChartTableCellRenderer(PlotOrientation.HORIZONTAL,
                -peptideShakerGUI.getSearchParameters().getPrecursorAccuracy(), peptideShakerGUI.getSearchParameters().getPrecursorAccuracy(), // @TODO: how to handle negative values..?
                peptideShakerGUI.getSparklineColor(), peptideShakerGUI.getSparklineColor()));
        ((JSparklinesBarChartTableCellRenderer) psmTable.getColumn("Mass Error").getCellRenderer()).showNumberAndChart(true, TableProperties.getLabelWidth());
        psmTable.getColumn("Charge").setCellRenderer(new JSparklinesBarChartTableCellRenderer(PlotOrientation.HORIZONTAL,
                (double) ((PSMaps) peptideShakerGUI.getIdentification().getUrParam(new PSMaps())).getPsmSpecificMap().getMaxCharge(), peptideShakerGUI.getSparklineColor()));
        ((JSparklinesBarChartTableCellRenderer) psmTable.getColumn("Charge").getCellRenderer()).showNumberAndChart(true, TableProperties.getLabelWidth() - 30);
        psmTable.getColumn("").setCellRenderer(new JSparklinesIntegerIconTableCellRenderer(MatchValidationLevel.getIconMap(this.getClass()), MatchValidationLevel.getTooltipMap()));
        psmTable.getColumn("  ").setCellRenderer(new TrueFalseIconRenderer(
                new ImageIcon(this.getClass().getResource("/icons/star_yellow.png")),
                new ImageIcon(this.getClass().getResource("/icons/star_grey.png")),
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

            // open the match validation level dialog
            if (column == psmTable.getColumn("").getModelIndex() && evt != null && evt.getButton() == MouseEvent.BUTTON1) {
                SelfUpdatingTableModel tableModel = (SelfUpdatingTableModel) psmTable.getModel();
                String key = psmKeys.get(tableModel.getViewIndex(row));
                Identification identification = peptideShakerGUI.getIdentification();
                PSMaps pSMaps = new PSMaps();
                pSMaps = (PSMaps) identification.getUrParam(pSMaps);
                try {
                    MatchValidationDialog matchValidationDialog = new MatchValidationDialog(peptideShakerGUI, peptideShakerGUI.getExceptionHandler(),
                            identification, peptideShakerGUI.getIdentificationFeaturesGenerator(), pSMaps.getPsmSpecificMap(), key,
                            peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences(), peptideShakerGUI.getSequenceMatchingPreferences());
                    if (matchValidationDialog.isValidationChanged()) {
                        updatePsmPanelTitle();
                        peptidesPanel.repaint();
                        proteinsLayeredPanel.repaint();
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

                }

                // open the match validation level dialog
                if (column == proteinTable.getColumn("").getModelIndex() && evt != null && evt.getButton() == MouseEvent.BUTTON1) {
                    Identification identification = peptideShakerGUI.getIdentification();
                    PSMaps pSMaps = new PSMaps();
                    pSMaps = (PSMaps) identification.getUrParam(pSMaps);
                    try {
                        MatchValidationDialog matchValidationDialog = new MatchValidationDialog(peptideShakerGUI, peptideShakerGUI.getExceptionHandler(),
                                identification, peptideShakerGUI.getIdentificationFeaturesGenerator(), pSMaps.getProteinMap(), proteinKey,
                                peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences(), peptideShakerGUI.getSequenceMatchingPreferences());
                        if (matchValidationDialog.isValidationChanged()) {
                            updateProteinPanelTitle();
                        }
                    } catch (Exception e) {
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

            }

            // open the match validation level dialog
            if (column == peptideTable.getColumn("").getModelIndex() && evt != null && evt.getButton() == MouseEvent.BUTTON1) {
                Identification identification = peptideShakerGUI.getIdentification();
                PSMaps pSMaps = new PSMaps();
                pSMaps = (PSMaps) identification.getUrParam(pSMaps);
                try {
                    MatchValidationDialog matchValidationDialog = new MatchValidationDialog(peptideShakerGUI, peptideShakerGUI.getExceptionHandler(),
                            identification, peptideShakerGUI.getIdentificationFeaturesGenerator(), pSMaps.getPeptideSpecificMap(), peptideKey,
                            peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences(), peptideShakerGUI.getSequenceMatchingPreferences());
                    if (matchValidationDialog.isValidationChanged()) {
                        updateProteinPanelTitle();
                        updatePeptidePanelTitle();
                    }
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

            } else if (sectionName.equals(PsSpectrumCountingFeature.type)) {
                PsSpectrumCountingSection section = new PsSpectrumCountingSection(exportScheme.getExportFeatures(sectionName), exportScheme.isIndexes(), exportScheme.isHeader(), exportWriter);
                section.writeSection(spectrumCountingPreferences, waitingHandler);
            } else if (sectionName.equals(PsValidationFeature.type)) {
                PsValidationSection section = new PsValidationSection(exportScheme.getExportFeatures(sectionName), exportScheme.isIndexes(), exportScheme.isHeader(), exportWriter);
                PSMaps psMaps = new PSMaps();
                psMaps = (PSMaps) identification.getUrParam(psMaps);
                section.writeSection(psMaps, waitingHandler);
            } else {
                throw new UnsupportedOperationException("Sectrion " + sectionName + " not implemented.");
            }
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

                        metrics.setnConfidentProteins(metrics.getnConfidentProteins() - 1);
                    }
                } else if (type == Type.PEPTIDE) {

                    identification.updatePeptideMatchParameter(matchKey, psParameter);
                    PSMaps pSMaps = new PSMaps();
                    pSMaps = (PSMaps) identification.getUrParam(pSMaps);
                    ProteinMap proteinMap = pSMaps.getProteinMap();
                    PeptideMatch peptideMatch = identification.getPeptideMatch(matchKey);

                    for (String accession : peptideMatch.getTheoreticPeptide().getParentProteins(sequenceMatchingPreferences)) {

                        ArrayList<String> proteinMatches = identification.getProteinMap().get(accession);

                        if (proteinMatches != null) {

                            identification.loadProteinMatchParameters(proteinMatches, psParameter, null);

                            for (String proteinMatchKey : proteinMatches) {

                                identificationFeaturesGenerator.updateNConfidentPeptides(proteinMatchKey);
                                PSParameter proteinPSParameter = (PSParameter) identification.getProteinMatchParameter(proteinMatchKey, psParameter);
                                MatchValidationLevel proteinValidation = proteinPSParameter.getMatchValidationLevel();

                                if (proteinValidation.isValidated()) {

                                    MatchesValidator.updateProteinMatchValidationLevel(identification, identificationFeaturesGenerator, searchParameters, annotationPreferences, proteinMap, proteinMatchKey);
                                    proteinPSParameter = (PSParameter) identification.getProteinMatchParameter(proteinMatchKey, proteinPSParameter);
                                    MatchValidationLevel newValidation = proteinPSParameter.getMatchValidationLevel();

                                    if (newValidation == MatchValidationLevel.confident && proteinValidation == MatchValidationLevel.doubtful) {
                                        metrics.setnConfidentProteins(metrics.getnConfidentProteins() + 1);
                                    } else if (newValidation == MatchValidationLevel.doubtful && proteinValidation == MatchValidationLevel.confident) {
                                        metrics.setnConfidentProteins(metrics.getnConfidentProteins() - 1);
                                    }
                                }
                            }
                        }
                    }
                } else if (type == Type.PSM) {

                    PSMaps pSMaps = new PSMaps();
                    pSMaps = (PSMaps) identification.getUrParam(pSMaps);
                    PeptideSpecificMap peptideMap = pSMaps.getPeptideSpecificMap();
                    ProteinMap proteinMap = pSMaps.getProteinMap();
                    SpectrumMatch spectrumMatch = identification.getSpectrumMatch(matchKey);
                    if (spectrumMatch.getBestPeptideAssumption() != null) {
                        Peptide peptide = spectrumMatch.getBestPeptideAssumption().getPeptide();
                        String peptideKey = peptide.getMatchingKey(sequenceMatchingPreferences);
                        identificationFeaturesGenerator.updateNConfidentSpectraForPeptide(peptideKey);
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

                Identification identification = peptideShakerGUI.getIdentification();
                identification.updatePeptideMatch(peptideMatch);

                // update protein level PTM scoring
                ArrayList<String> proteins = peptideMatch.getTheoreticPeptide().getParentProteins(peptideShakerGUI.getSequenceMatchingPreferences());
                PSMaps psMaps = new PSMaps();
                psMaps = (PSMaps) identification.getUrParam(psMaps);
                PsmPTMMap psmPTMMap = psMaps.getPsmPTMMap();
                PtmScorer ptmScorer = new PtmScorer(psmPTMMap);

                for (String proteinKey : peptideShakerGUI.getIdentification().getProteinIdentification()) {
                    boolean candidate = false;
                    for (String protein : proteins) {
View Full Code Here

Examples of eu.isas.peptideshaker.myparameters.PSMaps

        tabCounter++;

        if (!targetDecoy) {
            writeCvTerm(new CvTerm("PSI-MS", "MS:1001494", "no threshold", null));
        } else {
            PSMaps psMaps = new PSMaps();
            psMaps = (PSMaps) identification.getUrParam(psMaps);
            ProteinMap proteinMap = psMaps.getProteinMap();
            TargetDecoyMap targetDecoyMap = proteinMap.getTargetDecoyMap();
            TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();

            double threshold = targetDecoyResults.getUserInput() / 100;
            int thresholdType = targetDecoyResults.getInputType();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.