|
||||||||||
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 java.lang.String |
MODIFICATION_LOCALIZATION_SEPARATOR
Separator preceding confident localization of the confident localization of a modification |
static java.lang.String |
MODIFICATION_SEPARATOR
Separator used to separate modifications in peptide keys |
Constructor Summary | |
---|---|
Peptide()
Constructor for the peptide. |
|
Peptide(java.lang.String aSequence,
java.util.ArrayList<java.lang.String> parentProteins,
java.util.ArrayList<ModificationMatch> modifications)
Constructor for the peptide. |
|
Peptide(java.lang.String aSequence,
java.lang.Double mass,
java.util.ArrayList<java.lang.String> parentProteins,
java.util.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. |
void |
estimateTheoreticMass()
Estimates the theoretic mass of the peptide. |
java.lang.String |
getCTerminal()
Returns the C-terminal of the peptide as a String. |
java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.String>> |
getIndexedFixedModifications()
Returns an indexed map of all fixed modifications amino acid, (1 is the first) -> list of modification names. |
java.lang.String |
getKey()
Returns the index of a peptide. |
java.lang.Double |
getMass()
Getter for the mass. |
static int |
getModificationCount(java.lang.String peptideKey,
java.lang.String modification)
Returns how many of the given modification was found in the given peptide. |
static java.util.ArrayList<java.lang.String> |
getModificationFamily(java.lang.String peptideKey)
Returns a list of names of the variable modifications found in the key of a peptide. |
java.util.ArrayList<ModificationMatch> |
getModificationMatches()
Getter for the modifications carried by this peptide. |
java.util.ArrayList<java.lang.Integer> |
getModifiedIndexes()
Returns the indexes of the residues in the peptide that contain at least one modification. |
int |
getNMissedCleavages(Enzyme enzyme)
Returns the number of missed cleavages using the specified enzyme. |
static int |
getNMissedCleavages(java.lang.String sequence,
Enzyme enzyme)
Returns the number of missed cleavages using the specified enzyme for the given sequence. |
static java.util.ArrayList<java.lang.Integer> |
getNModificationLocalized(java.lang.String peptideKey,
java.lang.String modification)
Returns the list of modifications confidently localized or inferred for the peptide indexed by the given key. |
java.lang.String |
getNTerminal()
Returns the N-terminal of the peptide as a String. |
java.util.ArrayList<java.lang.String> |
getParentProteins()
Getter for the parent proteins. |
java.util.ArrayList<java.lang.Integer> |
getPotentialModificationSites(PTM ptm)
Returns the potential modification sites as an ordered list of string. |
static java.util.ArrayList<java.lang.Integer> |
getPotentialModificationSites(java.lang.String sequence,
PTM ptm)
Returns the potential modification sites as an ordered list of string. |
java.lang.String |
getSequence()
Getter for the sequence. |
static java.lang.String |
getSequence(java.lang.String peptideKey)
Returns the sequence of the peptide indexed by the given key. |
java.lang.String |
getTaggedModifiedSequence(ModificationProfile modificationProfile,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName)
Returns the modified sequence as an tagged string with potential modification sites color coded or with ptm tags, e.g, <mox>. |
static java.lang.String |
getTaggedModifiedSequence(ModificationProfile modificationProfile,
Peptide peptide,
java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.String>> mainModificationSites,
java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.String>> secondaryModificationSites,
java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.String>> fixedModificationSites,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName)
Returns the modified sequence as an tagged string with potential modification sites color coded or with ptm tags, e.g, <mox>. |
java.util.ArrayList<java.lang.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(java.lang.String peptideKey)
Returns a boolean indicating whether the peptide has variable modifications based on its key. |
static boolean |
isModified(java.lang.String peptideKey,
java.lang.String modification)
Returns a boolean indicating whether the peptide has the given variable modification based on its key. |
java.util.ArrayList<java.lang.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(java.util.ArrayList<java.lang.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 java.lang.String MODIFICATION_LOCALIZATION_SEPARATOR
public static java.lang.String MODIFICATION_SEPARATOR
Constructor Detail |
---|
public Peptide()
public Peptide(java.lang.String aSequence, java.util.ArrayList<java.lang.String> parentProteins, java.util.ArrayList<ModificationMatch> modifications) throws java.lang.IllegalArgumentException
aSequence
- The peptide sequenceparentProteins
- The parent proteins, cannot be null or emptymodifications
- The PTM of this peptide
java.lang.IllegalArgumentException
- Thrown if the peptide sequence contains
unknown amino acidspublic Peptide(java.lang.String aSequence, java.lang.Double mass, java.util.ArrayList<java.lang.String> parentProteins, java.util.ArrayList<ModificationMatch> modifications)
aSequence
- The peptide sequencemass
- The peptide massparentProteins
- The parent proteins, cannot be null or emptymodifications
- The PTM of this peptideMethod Detail |
---|
public java.lang.Double getMass()
public java.util.ArrayList<ModificationMatch> getModificationMatches()
public void clearModificationMatches()
public void addModificationMatch(ModificationMatch modificationMatch)
modificationMatch
- the modification match to addpublic java.lang.String getSequence()
public int getNMissedCleavages(Enzyme enzyme)
enzyme
- the enzyme used
public static int getNMissedCleavages(java.lang.String sequence, Enzyme enzyme)
sequence
- the peptide sequenceenzyme
- the enzyme used
public java.util.ArrayList<java.lang.String> getParentProteins()
public void setParentProteins(java.util.ArrayList<java.lang.String> parentProteins)
parentProteins
- the parent proteins as list, cannot be null or emptypublic java.lang.String getKey()
public static boolean isModified(java.lang.String peptideKey)
peptideKey
- the peptide key
public static boolean isModified(java.lang.String peptideKey, java.lang.String modification)
peptideKey
- the peptide keymodification
- the name of the modification
public static int getModificationCount(java.lang.String peptideKey, java.lang.String modification)
peptideKey
- the peptide keymodification
- the name of the modification
public static java.util.ArrayList<java.lang.Integer> getNModificationLocalized(java.lang.String peptideKey, java.lang.String modification)
peptideKey
- the peptide keymodification
- the name of the modification
public static java.lang.String getSequence(java.lang.String peptideKey)
peptideKey
- the peptide key
public static java.util.ArrayList<java.lang.String> getModificationFamily(java.lang.String peptideKey)
peptideKey
- the key of a peptide
public boolean isModifiable(PTM ptm) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException
ptm
- the PTM of interest
java.io.IOException
- exception thrown whenever an error occurred while
reading a protein sequence
java.lang.IllegalArgumentException
- exception thrown whenever an error
occurred while reading a protein sequence
java.lang.InterruptedException
- exception thrown whenever an error occurred
while reading a protein sequencepublic java.util.ArrayList<java.lang.Integer> getPotentialModificationSites(PTM ptm) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException
ptm
- the PTM considered
java.io.IOException
- exception thrown whenever an error occurred while
reading a protein sequence
java.lang.IllegalArgumentException
- exception thrown whenever an error
occurred while reading a protein sequence
java.lang.InterruptedException
- exception thrown whenever an error occurred
while reading a protein sequencepublic static java.util.ArrayList<java.lang.Integer> getPotentialModificationSites(java.lang.String sequence, PTM ptm) throws java.lang.IllegalArgumentException
sequence
- the sequence of the peptide of interestptm
- the PTM considered
java.lang.IllegalArgumentException
public boolean isSameAs(Peptide anotherPeptide)
anotherPeptide
- another peptide
public boolean sameModificationsAs(Peptide anotherPeptide)
anotherPeptide
- another peptide
public java.lang.String getNTerminal()
public java.lang.String getCTerminal()
public java.lang.String getTaggedModifiedSequence(ModificationProfile modificationProfile, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
modificationProfile
- the modification profile of the searchuseHtmlColorCoding
- if true, color coded html is used, otherwise
ptm tags, e.g, <mox>, are usedincludeHtmlStartEndTags
- if true, start and end html tags are addeduseShortName
- if true the short names are used in the tags
public static java.lang.String getTaggedModifiedSequence(ModificationProfile modificationProfile, Peptide peptide, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.String>> mainModificationSites, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.String>> secondaryModificationSites, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.String>> fixedModificationSites, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
modificationProfile
- the modification profile of the searchincludeHtmlStartEndTags
- if true, start and end html tags are addedpeptide
- the peptide to annotatemainModificationSites
- the main variable modification sites in a
map: aa number -> list of modifications (1 is the first AA) (can be null)secondaryModificationSites
- the secondary variable modification
sites in a map: aa number -> list of modifications (1 is the first AA)
(can be null)fixedModificationSites
- the fixed modification sites in a map: aa
number -> list of modifications (1 is the first AA) (can be null)useHtmlColorCoding
- if true, color coded html is used, otherwise
ptm tags, e.g, <mox>, are useduseShortName
- if true the short names are used in the tags
public java.util.ArrayList<java.lang.Integer> getModifiedIndexes()
public java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.String>> getIndexedFixedModifications()
public void estimateTheoreticMass() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the peptide sequence contains unknown
amino acidspublic java.util.ArrayList<java.lang.String> isNterm() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException
java.io.IOException
- exception thrown whenever an error occurred while
reading the protein sequence
java.lang.IllegalArgumentException
- exception thrown whenever an error
occurred while reading the protein sequence
java.lang.InterruptedException
- exception thrown whenever an error occurred
while reading the protein sequencepublic java.util.ArrayList<java.lang.String> isCterm() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException
java.io.IOException
- exception thrown whenever an error occurred while
reading a protein sequence
java.lang.IllegalArgumentException
- exception thrown whenever an error
occurred while reading a protein sequence
java.lang.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 |