Examples of AminoAcidSequence


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

                                                    for (ModificationMatch modificationMatch : aminoAcidPattern.getModificationsAt(site)) {
                                                        modificationMatches.add(modificationMatch);
                                                    }
                                                }
                                            } else if (tagComponent instanceof AminoAcidSequence) {
                                                AminoAcidSequence aminoAcidSequence = (AminoAcidSequence) tagComponent;
                                                for (int site = 1; site <= aminoAcidSequence.length(); site++) {
                                                    for (ModificationMatch modificationMatch : aminoAcidSequence.getModificationsAt(site)) {
                                                        modificationMatches.add(modificationMatch);
                                                    }
                                                }
                                            } else if (tagComponent instanceof MassGap) {
                                                // Nothing to do here
View Full Code Here

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

                        }
                    }
                }
            } else if (tagComponent instanceof AminoAcidSequence) {

                AminoAcidSequence aminoAcidSequence = (AminoAcidSequence) tagComponent;

                for (int aa : aminoAcidSequence.getModificationIndexes()) {
                    for (ModificationMatch modificationMatch : aminoAcidSequence.getModificationsAt(aa)) {
                        if (modificationMatch.isVariable()) {
                            if (advocateId == Advocate.pepnovo.getIndex()) {
                                String pepnovoPtmName = modificationMatch.getTheoreticPtm();
                                PepnovoParameters pepnovoParameters = (PepnovoParameters) searchParameters.getIdentificationAlgorithmParameter(advocateId);
                                String utilitiesPtmName = pepnovoParameters.getUtilitiesPtmName(pepnovoPtmName);
                                if (utilitiesPtmName == null) {
                                    throw new IllegalArgumentException("PepNovo+ PTM " + pepnovoPtmName + " not recognized.");
                                }
                                modificationMatch.setTheoreticPtm(utilitiesPtmName);
                            } else if (advocateId == Advocate.direcTag.getIndex()) {
                                Integer directagIndex = new Integer(modificationMatch.getTheoreticPtm());
                                String utilitiesPtmName = searchParameters.getModificationProfile().getVariableModifications().get(directagIndex);
                                if (utilitiesPtmName == null) {
                                    throw new IllegalArgumentException("DirecTag PTM " + directagIndex + " not recognized.");
                                }
                                modificationMatch.setTheoreticPtm(utilitiesPtmName);
                                PTM ptm = ptmFactory.getPTM(utilitiesPtmName);
                                ArrayList<Character> aaAtTarget = ptm.getPattern().getAminoAcidsAtTarget();
                                if (aaAtTarget.size() > 1) {
                                    throw new IllegalArgumentException("More than one amino acid can be targeted by the modification " + ptm + ", tag duplication required.");
                                }
                                int aaIndex = aa - 1;
                                aminoAcidSequence.setAaAtIndex(aaIndex, aaAtTarget.get(0));
                            } else {
                                Advocate notImplemented = Advocate.getAdvocate(advocateId);
                                if (notImplemented == null) {
                                    throw new IllegalArgumentException("Advocate of id " + advocateId + " not recognized.");
                                }
View Full Code Here

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

                                    + ": " + modName + " (not confident)<br>";
                        }
                    }
                }
            } else if (tagComponent instanceof AminoAcidSequence) {
                AminoAcidSequence aminoAcidSequence = (AminoAcidSequence) tagComponent;
                for (int site = 1; site <= aminoAcidSequence.length(); site++) {
                    for (ModificationMatch modificationMatch : aminoAcidSequence.getModificationsAt(site)) {
                        char affectedResidue = aminoAcidSequence.charAt(site - 1);
                        String modName = modificationMatch.getTheoreticPtm();
                        Color ptmColor = modificationProfile.getColor(modName);
                        if (modificationMatch.isConfident()) {
                            tooltip += "<span style=\"color:#" + Util.color2Hex(Color.WHITE) + ";background:#" + Util.color2Hex(ptmColor) + "\">"
                                    + affectedResidue
View Full Code Here

Examples of org.broad.igv.feature.AminoAcidSequence

                if (PreferenceManager.getInstance().getAsBoolean(PreferenceManager.ENABLE_ANTIALISING)) {
                    g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
                }

                String nucSequence = new String(seq, indexOfFirstCodonStart, seq.length - indexOfFirstCodonStart);
                AminoAcidSequence aaSequence = AminoAcidManager.getInstance().
                        getAminoAcidSequence(strand, start + indexOfFirstCodonStart, nucSequence);

                if ((aaSequence != null) && aaSequence.hasNonNullSequence()) {
                    //This rectangle holds a single AA glyph. x and width will be updated in the for loop
                    Rectangle aaRect = new Rectangle(0, bandRectangle.y, 1, bandRectangle.height);

                    //start position for this amino acid. Will increment in for loop below
                    int aaSeqStartPosition = aaSequence.getStartPosition();

                    //calculated oddness or evenness of first amino acid
                    int firstFullAcidIndex = (int) Math.floor((aaSeqStartPosition - readingFrame) / 3);
                    boolean odd = (firstFullAcidIndex % 2) == 1;

                    if (shouldDrawLetters) {
                        Font f = FontManager.getFont(Font.BOLD, fontSize);
                        g.setFont(f);
                    }

                    for (AminoAcid acid : aaSequence.getSequence()) {
                        if (acid != null) {
                            //calculate x pixel boundaries of this AA rectangle
                            int px = getPixelFromChromosomeLocation(context.getChr(), aaSeqStartPosition, origin, locScale);
                            int px2 = getPixelFromChromosomeLocation(context.getChr(), aaSeqStartPosition + 3,
                                    origin, locScale);
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.