Examples of Enzyme


Examples of com.compomics.util.experiment.biology.Enzyme

                validatedValues = new ArrayList<Double>();
                validatedDoubtfulValues = new ArrayList<Double>();
                nonValidatedValues = new ArrayList<Double>();
                validatedDecoyValues = new ArrayList<Double>();
                nonValidatedDecoyValues = new ArrayList<Double>();
                Enzyme enzyme = peptideShakerGUI.getSearchParameters().getEnzyme();

                for (String peptideKey : peptideShakerGUI.getIdentification().getPeptideIdentification()) {

                    if (progressDialog.isRunCanceled()) {
                        break;
View Full Code Here

Examples of com.compomics.util.experiment.biology.Enzyme

        ProteinMatch proteinMatch = identification.getProteinMatch(proteinMatchKey);
        String sequence = sequenceFactory.getProtein(proteinMatch.getMainMatch()).getSequence();
        double[] result = new double[sequence.length()];
        Distribution peptideLengthDistribution = metrics.getPeptideLengthDistribution();
        Enzyme enzyme = searchParameters.getEnzyme();

        // special case for no cleavage searches
        if (enzyme.isWholeProtein()) {
            for (int i = 0; i < result.length; i++) {
                result[i] = 1.0;
            }
            return result;
        }

        int lastCleavage = -1;
        char previousChar = sequence.charAt(0), nextChar;

        for (int i = 0; i < sequence.length() - 1; i++) {
            double p = 1;
            if (!enzyme.isSemiSpecific()) {
                nextChar = sequence.charAt(i + 1);
                if (enzyme.isCleavageSite(previousChar, nextChar)) {
                    int length = i - lastCleavage;
                    if (peptideLengthDistribution == null) { //backward compatibility check
                        int pepMax = idFilter.getMaxPepLength();
                        if (length > pepMax) {
                            p = 0;
                        }
                    } else {
                        p = peptideLengthDistribution.getProbabilityAt(length);
                    }
                    for (int j = lastCleavage + 1; j <= i; j++) {
                        result[j] = p;
                    }
                    lastCleavage = i;
                }
                previousChar = nextChar;
            } else {
                result[i] = p;
            }
        }

        double p = 1;

        if (!enzyme.isSemiSpecific()) {
            int length = sequence.length() - lastCleavage + 1;
            if (peptideLengthDistribution == null) { //backward compatibility check
                int pepMax = idFilter.getMaxPepLength();
                if (length > pepMax) {
                    p = 0;
View Full Code Here

Examples of com.compomics.util.experiment.biology.Enzyme

        prideParametersReport += "<br><br><b>Enzyme:</b> ";

        if (!enzymes.isEmpty()) {
            if (enzymes.size() == 1) {

                Enzyme mappedEnzyme = EnzymeFactory.getUtilitiesEnzyme(enzymes.get(0));

                // unknown enzyme
                if (mappedEnzyme == null) {

                    peptideShakerGUI.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker.gif")));

                    // have the user select the enzyme
                    EnzymeSelectionDialog enzymeSelectionDialog = new EnzymeSelectionDialog(this, true, enzymes.get(0));

                    Enzyme selectedEnzyme = enzymeSelectionDialog.getEnzyme();
                    if (selectedEnzyme != null) {
                        mappedEnzyme = selectedEnzyme;
                        prideParametersReport += selectedEnzyme.getName() + "<br>";
                    } else {
                        prideParametersReport += enzymes.get(0) + " (unknown)<br>";
                    }
                } else {
                    prideParametersReport += mappedEnzyme.getName() + "<br>";
                }

                prideSearchParameters.setEnzyme(mappedEnzyme);
            } else {

                // more than one enzyme given
                String enzymesAsText = "";
                for (int i = 0; i < enzymes.size(); i++) {
                    if (i > 0) {
                        enzymesAsText += " + ";
                    }
                    enzymesAsText += enzymes.get(i);
                }

                peptideShakerGUI.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker.gif")));

                // have the user select the enzyme
                EnzymeSelectionDialog enzymeSelectionDialog = new EnzymeSelectionDialog(this, true, enzymesAsText);
                Enzyme selectedEnzyme = enzymeSelectionDialog.getEnzyme();
                if (selectedEnzyme != null) {
                    prideParametersReport += selectedEnzyme.getName() + "<br>";
                    prideSearchParameters.setEnzyme(selectedEnzyme);
                } else {
                    prideSearchParameters.setEnzyme(null);
                    prideParametersReport += enzymesAsText + " (unknown)<br>";
                }
View Full Code Here

Examples of com.compomics.util.experiment.biology.Enzyme

     * @throws IllegalArgumentException
     */
    private int compareMainProtein(ProteinMatch oldProteinMatch, String oldAccession, ProteinMatch newProteinMatch, String newAccession,
            SearchParameters searchParameters, SequenceMatchingPreferences sequenceMatchingPreferences) throws IOException, InterruptedException, IllegalArgumentException, ClassNotFoundException {

        Enzyme enzyme = searchParameters.getEnzyme();
        if (enzyme != null && !enzyme.isSemiSpecific()) { // null enzymes should not occur, but could happen with old search param files

            // @TODO: could semi-specific, top-down, whole protein, and non enzyme be handled better??
            boolean newEnzymatic = newProteinMatch.hasEnzymaticPeptide(newAccession, enzyme, sequenceMatchingPreferences);
            boolean oldEnzymatic = oldProteinMatch.hasEnzymaticPeptide(oldAccession, enzyme, sequenceMatchingPreferences);
            if (newEnzymatic && !oldEnzymatic) {
View Full Code Here

Examples of com.compomics.util.experiment.biology.Enzyme

     * @param proteinMatchKey the key of the protein match of interest
     * @return the best protein coverage possible according to the given
     * cleavage settings
     */
    private Double estimateObservableCoverage(String proteinMatchKey) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException, InterruptedException, MathException {
        Enzyme enyzme = searchParameters.getEnzyme();
        String mainMatch;
        if (ProteinMatch.getNProteins(proteinMatchKey) == 1) {
            mainMatch = proteinMatchKey;
        } else {
            ProteinMatch proteinMatch = identification.getProteinMatch(proteinMatchKey);
View Full Code Here

Examples of com.compomics.util.experiment.biology.Enzyme

        // enzyme
        br.write(getCurrentTabSpace() + "<Enzymes independent=\"false\">" + System.getProperty("line.separator"));
        // note: if multiple enzymes are specified, independent is set to true if cleavage with different enzymes is performed independently
        tabCounter++;

        Enzyme enzyme = searchParameters.getEnzyme();
        br.write(getCurrentTabSpace() + "<Enzyme "
                + "missedCleavages=\"" + searchParameters.getnMissedCleavages() + "\" "
                + "semiSpecific=\"" + enzyme.isSemiSpecific() + "\" "
                //+ "cTermGain=\"OH\" " // Element formula gained at CTerm
                //+ "nTermGain=\"H\" " // Element formula gained at NTerm
                + "id=\"Enz1\" "
                + "name=\"" + enzyme.getName() + "\">"
                + System.getProperty("line.separator"));
        tabCounter++;

        br.write(getCurrentTabSpace() + "<EnzymeName>" + System.getProperty("line.separator"));
        tabCounter++;
        CvTerm enzymeCvTerm = EnzymeFactory.getEnzymeCvTerm(enzyme);
        if (enzymeCvTerm != null) {
            writeCvTerm(enzymeCvTerm);
        } else {
            writeUserParam(enzyme.getName());
        }
        tabCounter--;
        br.write(getCurrentTabSpace() + "</EnzymeName>" + System.getProperty("line.separator"));

        tabCounter--;
View Full Code Here

Examples of com.compomics.util.experiment.biology.Enzyme

        // If needed, while we are iterating proteins, we will take the maximal spectrum counting value and number of validated proteins as well.
        int nValidatedProteins = 0;
        int nConfidentProteins = 0;
        PSParameter psParameter = new PSParameter();
        double tempSpectrumCounting, maxSpectrumCounting = 0;
        Enzyme enzyme = searchParameters.getEnzyme();
        int maxPepLength = idFilter.getMaxPepLength();

        for (String proteinKey : identification.getProteinIdentification()) {
            ProteinMatch proteinMatch = identification.getProteinMatch(proteinKey);
            scorePTMs(identification, proteinMatch, searchParameters, annotationPreferences, false, ptmScoringPreferences, sequenceMatchingPreferences);
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.