|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.Peptide
public class Peptide
This class models a peptide.
Field Summary | |
---|---|
static String |
MODIFICATION_LOCALIZATION_SEPARATOR
Separator preceding confident localization of the confident localization of a modification |
static String |
MODIFICATION_SEPARATOR
Separator used to separate modifications in peptide keys |
Constructor Summary | |
---|---|
Peptide()
Constructor for the peptide. |
|
Peptide(String aSequence,
ArrayList<String> parentProteins,
ArrayList<ModificationMatch> modifications)
Constructor for the peptide. |
|
Peptide(String aSequence,
Double mass,
ArrayList<String> parentProteins,
ArrayList<ModificationMatch> modifications)
Deprecated. use the constructor without mass. The mass will be recalculated |
Method Summary | |
---|---|
void |
addModificationMatch(ModificationMatch modificationMatch)
Adds a modification match. |
void |
clearModificationMatches()
Clears the list of imported modification matches. |
String |
getCTerminal()
Returns the C-terminal of the peptide as a String. |
String |
getKey()
Returns the index of a peptide. |
Double |
getMass()
Getter for the mass. |
static int |
getModificationCount(String peptideKey,
String modification)
Returns how many of the given modification was found in the given peptide. |
static ArrayList<String> |
getModificationFamily(String peptideKey)
Returns a list of names of the variable modifications found in the key of a peptide. |
ArrayList<ModificationMatch> |
getModificationMatches()
Getter for the modifications carried by this peptide. |
ArrayList<Integer> |
getModifiedIndexes()
Returns the indexes of the residues in the peptide that contain at least one modification. |
String |
getModifiedSequenceAsHtml(HashMap<String,Color> colors,
boolean includeHtmlStartEndTag)
Returns the modified sequence as an HTML string with modification color coding. |
static String |
getModifiedSequenceAsHtml(HashMap<String,Color> colors,
boolean includeHtmlStartEndTag,
Peptide peptide,
HashMap<Integer,ArrayList<String>> mainModificationSites,
HashMap<Integer,ArrayList<String>> secondaryModificationSites)
Returns the modified sequence as an HTML string with potential modification sites color coding. |
String |
getModifiedSequenceAsString(boolean includeTerminals)
Returns the modified sequence as a string, e.g., NH2-PEP |
int |
getNMissedCleavages(Enzyme enzyme)
Returns the number of missed cleavages using the specified enzyme. |
static int |
getNMissedCleavages(String sequence,
Enzyme enzyme)
Returns the number of missed cleavages using the specified enzyme for the given sequence. |
static ArrayList<Integer> |
getNModificationLocalized(String peptideKey,
String modification)
Returns the list of modifications confidently localized or inferred for the peptide indexed by the given key. |
String |
getNTerminal()
Returns the N-terminal of the peptide as a String. |
ArrayList<String> |
getParentProteins()
Getter for the parent proteins. |
ArrayList<Integer> |
getPotentialModificationSites(PTM ptm)
Returns the potential modification sites as an ordered list of string. |
static ArrayList<Integer> |
getPotentialModificationSites(String sequence,
PTM ptm)
Returns the potential modification sites as an ordered list of string. |
HashMap<String,Color> |
getPTMShortNameColorMap(HashMap<String,Color> ptmColors)
Returns a map of the ptm short names to the ptm colors. |
HashMap<String,String> |
getPTMShortNameMap()
Returns a map of the ptm short names to the ptm long names for the modification in this peptide. |
String |
getSequence()
Getter for the sequence. |
static String |
getSequence(String peptideKey)
Returns the sequence of the peptide indexed by the given key. |
ArrayList<String> |
isCterm()
Returns a list of proteins where this peptide can be found in the C-terminus. |
boolean |
isModifiable(PTM ptm)
Indicates whether the given modification can be found on the peptide. |
static boolean |
isModified(String peptideKey)
Returns a boolean indicating whether the peptide has variable modifications based on its key. |
static boolean |
isModified(String peptideKey,
String modification)
Returns a boolean indicating whether the peptide has the given variable modification based on its key. |
ArrayList<String> |
isNterm()
Returns a list of proteins where this peptide can be found in the N-terminus. |
boolean |
isSameAs(Peptide anotherPeptide)
A method which compares to peptides. |
boolean |
sameModificationsAs(Peptide anotherPeptide)
Indicates whether another peptide has the same modifications at the same localization as this peptide. |
void |
setParentProteins(ArrayList<String> parentProteins)
Sets the parent proteins. |
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject |
---|
addUrParam, getParameterKey, getUrParam |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String MODIFICATION_LOCALIZATION_SEPARATOR
public static String MODIFICATION_SEPARATOR
Constructor Detail |
---|
public Peptide()
public Peptide(String aSequence, ArrayList<String> parentProteins, ArrayList<ModificationMatch> modifications) throws IllegalArgumentException
aSequence
- The peptide sequenceparentProteins
- The parent proteinsmodifications
- The PTM of this peptide
IllegalArgumentException
- Thrown if the peptide sequence contains
unknown amino acidspublic Peptide(String aSequence, Double mass, ArrayList<String> parentProteins, ArrayList<ModificationMatch> modifications)
aSequence
- The peptide sequencemass
- The peptide massparentProteins
- The parent proteinsmodifications
- The PTM of this peptideMethod Detail |
---|
public Double getMass()
public ArrayList<ModificationMatch> getModificationMatches()
public void clearModificationMatches()
public void addModificationMatch(ModificationMatch modificationMatch)
modificationMatch
- the modification match to addpublic String getSequence()
public int getNMissedCleavages(Enzyme enzyme)
enzyme
- the enzyme used
public static int getNMissedCleavages(String sequence, Enzyme enzyme)
sequence
- the peptide sequenceenzyme
- the enzyme used
public ArrayList<String> getParentProteins()
public void setParentProteins(ArrayList<String> parentProteins)
parentProteins
- the parent proteins as listpublic String getKey()
public static boolean isModified(String peptideKey)
peptideKey
- the peptide key
public static boolean isModified(String peptideKey, String modification)
peptideKey
- the peptide keymodification
- the name of the modification
public static int getModificationCount(String peptideKey, String modification)
peptideKey
- the peptide keymodification
- the name of the modification
public static ArrayList<Integer> getNModificationLocalized(String peptideKey, String modification)
peptideKey
- the peptide keymodification
- the name of the modification
public static String getSequence(String peptideKey)
peptideKey
- the peptide key
public static ArrayList<String> getModificationFamily(String peptideKey)
peptideKey
- the key of a peptide
public boolean isModifiable(PTM ptm) throws IOException, IllegalArgumentException, InterruptedException
ptm
- the PTM of interest
IOException
- exception thrown whenever an error occurred while
reading a protein sequence
IllegalArgumentException
- exception thrown whenever an error
occurred while reading a protein sequence
InterruptedException
- exception thrown whenever an error occurred
while reading a protein sequencepublic ArrayList<Integer> getPotentialModificationSites(PTM ptm) throws IOException, IllegalArgumentException, InterruptedException
ptm
- the PTM considered
IOException
- exception thrown whenever an error occurred while
reading a protein sequence
IllegalArgumentException
- exception thrown whenever an error
occurred while reading a protein sequence
InterruptedException
- exception thrown whenever an error occurred
while reading a protein sequencepublic static ArrayList<Integer> getPotentialModificationSites(String sequence, PTM ptm) throws IllegalArgumentException
sequence
- the sequence of the peptide of interestptm
- the PTM considered
IllegalArgumentException
public boolean isSameAs(Peptide anotherPeptide)
anotherPeptide
- another peptide
public boolean sameModificationsAs(Peptide anotherPeptide)
anotherPeptide
- another peptide
public String getNTerminal()
public String getCTerminal()
public static String getModifiedSequenceAsHtml(HashMap<String,Color> colors, boolean includeHtmlStartEndTag, Peptide peptide, HashMap<Integer,ArrayList<String>> mainModificationSites, HashMap<Integer,ArrayList<String>> secondaryModificationSites)
colors
- the ptm name to color mappingincludeHtmlStartEndTag
- if true, start and end html tags are addedpeptide
- mainModificationSites
- secondaryModificationSites
-
public String getModifiedSequenceAsHtml(HashMap<String,Color> colors, boolean includeHtmlStartEndTag)
colors
- the ptm name to color mappingincludeHtmlStartEndTag
- if true, start and end html tags are added
public HashMap<String,Color> getPTMShortNameColorMap(HashMap<String,Color> ptmColors)
ptmColors
- the ptm color map
public HashMap<String,String> getPTMShortNameMap()
public String getModifiedSequenceAsString(boolean includeTerminals)
includeTerminals
- if true, the terminals are included
public ArrayList<Integer> getModifiedIndexes()
public ArrayList<String> isNterm() throws IOException, IllegalArgumentException, InterruptedException
IOException
- exception thrown whenever an error occurred while
reading the protein sequence
IllegalArgumentException
- exception thrown whenever an error
occurred while reading the protein sequence
InterruptedException
- exception thrown whenever an error occurred
while reading the protein sequencepublic ArrayList<String> isCterm() throws IOException, IllegalArgumentException, InterruptedException
IOException
- exception thrown whenever an error occurred while
reading a protein sequence
IllegalArgumentException
- exception thrown whenever an error
occurred while reading a protein sequence
InterruptedException
- exception thrown whenever an error occurred
while reading a protein sequence
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |