public class Peptide extends ExperimentObject
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
Peptide()
Constructor for the peptide.
|
Peptide(java.lang.String aSequence,
java.util.ArrayList<ModificationMatch> modifications)
Constructor for the peptide.
|
Peptide(java.lang.String aSequence,
java.util.ArrayList<java.lang.String> parentProteins,
java.util.ArrayList<ModificationMatch> modifications)
Deprecated.
use peptide without proteins and remap the peptide to the
proteins a posteriori instead
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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 reference key of a peptide.
|
static java.lang.String |
getKey(java.lang.String sequence,
java.util.ArrayList<ModificationMatch> modificationMatches)
Returns the reference key of a peptide.
|
java.lang.Double |
getMass()
Getter for the mass.
|
java.lang.String |
getMatchingKey(AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Returns a unique key for the peptide when considering the given matching
type and mass tolerance.
|
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 variable modification.
|
java.util.ArrayList<java.lang.Integer> |
getModifiedIndexes(boolean excludeFixed)
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.
|
static Peptide |
getNoModPeptide(Peptide peptide,
java.util.ArrayList<PTM> ptms)
Returns a version of the peptide which does not contain the inspected
PTMs.
|
java.lang.String |
getNTerminal()
Returns the N-terminal of the peptide as a String.
|
int |
getNVariableModifications(double modificationMass)
Returns the number of variable modifications found with the given mass.
|
java.util.ArrayList<java.lang.String> |
getParentProteins(AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Returns the parent proteins and remaps the peptide to the protein if no
protein mapping was set using the default protein tree of the sequence
factory.
|
java.util.ArrayList<java.lang.String> |
getParentProteins(AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance,
ProteinTree proteinTree)
Returns the parent proteins and remaps the peptide to the protein if no
protein mapping was set.
|
java.util.ArrayList<java.lang.String> |
getParentProteins(boolean remap,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Returns the parent proteins and eventually remaps the peptide to the
protein using the default protein tree.
|
java.util.ArrayList<java.lang.String> |
getParentProteins(boolean remap,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance,
ProteinTree proteinTree)
Returns the parent proteins and eventually remaps the peptide to the
protein.
|
java.util.ArrayList<java.lang.String> |
getParentProteinsNoRemapping()
Returns the parent proteins without remapping them.
|
java.util.ArrayList<java.lang.Integer> |
getPotentialModificationSites(java.lang.Double ptmMass,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance,
ModificationProfile modificationProfile)
Returns the potential modification sites as an ordered list of string.
|
java.util.ArrayList<java.lang.Integer> |
getPotentialModificationSites(PTM ptm,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
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)
Deprecated.
use getPotentialModificationSites(PTM ptm,
AminoAcidPattern.MatchingType matchingType, Double massTolerance)
|
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.
|
AminoAcidPattern |
getSequenceAsPattern()
Returns the sequence of this peptide as AminoAcidPattern.
|
static AminoAcidPattern |
getSequenceAsPattern(java.lang.String sequence)
Returns the given sequence as AminoAcidPattern.
|
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>.
|
java.lang.String |
getTaggedModifiedSequence(ModificationProfile modificationProfile,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName,
boolean excludeAllFixedPtms)
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(AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Returns a list of proteins where this peptide can be found in the
C-terminus.
|
boolean |
isDecoy()
Indicates whether a peptide can be derived from a decoy protein.
|
boolean |
isModifiable(PTM ptm,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
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(AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Returns a list of proteins where this peptide can be found in the
N-terminus.
|
boolean |
isSameModificationStatus(Peptide anotherPeptide)
Indicates whether another peptide has the same variable modifications as
this peptide.
|
boolean |
isSameSequence(Peptide anotherPeptide,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Returns a boolean indicating whether another peptide has the same
sequence as the given peptide
|
boolean |
isSameSequenceAndModificationStatus(Peptide anotherPeptide,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Indicates whether another peptide has the same sequence and modification
status without accounting for modification localization.
|
boolean |
sameModificationsAs(Peptide anotherPeptide)
Indicates whether another peptide has the same modifications at the same
localization as this peptide.
|
boolean |
sameModificationsAs(Peptide anotherPeptide,
java.util.ArrayList<java.lang.String> ptms)
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.
|
addUrParam, getParameterKey, getUrParampublic static final java.lang.String MODIFICATION_LOCALIZATION_SEPARATOR
public static final java.lang.String MODIFICATION_SEPARATOR
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 peptidejava.lang.IllegalArgumentException - Thrown if the peptide sequence contains
unknown amino acidspublic Peptide(java.lang.String aSequence,
java.util.ArrayList<ModificationMatch> modifications)
throws java.lang.IllegalArgumentException
aSequence - The peptide sequencemodifications - The PTM of this peptidejava.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 peptidepublic 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 usedpublic static int getNMissedCleavages(java.lang.String sequence,
Enzyme enzyme)
sequence - the peptide sequenceenzyme - the enzyme usedpublic java.util.ArrayList<java.lang.String> getParentProteins(boolean remap,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException,
java.sql.SQLException
remap - boolean indicating whether the peptide sequence should be
remapped to the proteins if no protein is foundmatchingType - the desired peptide to protein matching typemassTolerance - the ms2 mass tolerancejava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionjava.sql.SQLExceptionpublic java.util.ArrayList<java.lang.String> getParentProteins(AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance, ProteinTree proteinTree) throws java.io.IOException, java.lang.InterruptedException, java.sql.SQLException, java.lang.ClassNotFoundException
matchingType - the desired peptide to protein matching typemassTolerance - the ms2 mass toleranceproteinTree - the protein tree to use for peptide to protein mappingjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionjava.sql.SQLExceptionpublic java.util.ArrayList<java.lang.String> getParentProteins(AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance) throws java.io.IOException, java.lang.InterruptedException, java.sql.SQLException, java.lang.ClassNotFoundException
matchingType - the desired peptide to protein matching typemassTolerance - the ms2 mass tolerancejava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionjava.sql.SQLExceptionpublic java.util.ArrayList<java.lang.String> getParentProteins(boolean remap,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance,
ProteinTree proteinTree)
throws java.io.IOException,
java.lang.InterruptedException,
java.sql.SQLException,
java.lang.ClassNotFoundException
remap - boolean indicating whether the peptide sequence should be
remapped to the proteins if no protein is foundmatchingType - the desired peptide to protein matching typemassTolerance - the ms2 mass toleranceproteinTree - the protein tree to use for peptide to protein mappingjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionjava.sql.SQLExceptionpublic java.util.ArrayList<java.lang.String> getParentProteinsNoRemapping()
public void setParentProteins(java.util.ArrayList<java.lang.String> parentProteins)
parentProteins - the parent proteins as list, cannot be null or
emptypublic java.lang.String getMatchingKey(AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance)
matchingType - the amino acid matching typemassTolerance - the mass tolerancepublic java.lang.String getKey()
public static java.lang.String getKey(java.lang.String sequence,
java.util.ArrayList<ModificationMatch> modificationMatches)
sequence - the sequence of the peptidemodificationMatches - list of modification matchespublic static boolean isModified(java.lang.String peptideKey)
peptideKey - the peptide keypublic static boolean isModified(java.lang.String peptideKey,
java.lang.String modification)
peptideKey - the peptide keymodification - the name of the modificationpublic static int getModificationCount(java.lang.String peptideKey,
java.lang.String modification)
peptideKey - the peptide keymodification - the name of the modificationpublic int getNVariableModifications(double modificationMass)
modificationMass - the mass of the modificationpublic static java.util.ArrayList<java.lang.Integer> getNModificationLocalized(java.lang.String peptideKey,
java.lang.String modification)
peptideKey - the peptide keymodification - the name of the modificationpublic static java.lang.String getSequence(java.lang.String peptideKey)
peptideKey - the peptide keypublic static java.util.ArrayList<java.lang.String> getModificationFamily(java.lang.String peptideKey)
peptideKey - the key of a peptidepublic boolean isModifiable(PTM ptm, AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.io.FileNotFoundException, java.lang.ClassNotFoundException, java.sql.SQLException
ptm - the PTM of interestmatchingType - the type of sequence matchingmassTolerance - the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisejava.io.IOException - exception thrown whenever an error occurred while
reading a protein sequencejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while reading a protein sequencejava.lang.InterruptedException - exception thrown whenever an error occurred
while reading a protein sequencejava.io.FileNotFoundExceptionjava.lang.ClassNotFoundExceptionjava.sql.SQLExceptionpublic java.util.ArrayList<java.lang.Integer> getPotentialModificationSites(java.lang.Double ptmMass,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance,
ModificationProfile modificationProfile)
throws java.io.IOException,
java.lang.IllegalArgumentException,
java.lang.InterruptedException,
java.io.FileNotFoundException,
java.lang.ClassNotFoundException,
java.sql.SQLException
ptmMass - the mass of the potential PTMmatchingType - the type of sequence matchingmassTolerance - the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisemodificationProfile - the modification profile of the identificationjava.io.IOException - exception thrown whenever an error occurred while
reading a protein sequencejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while reading a protein sequencejava.lang.InterruptedException - exception thrown whenever an error occurred
while reading a protein sequencejava.io.FileNotFoundExceptionjava.lang.ClassNotFoundExceptionjava.sql.SQLExceptionpublic java.util.ArrayList<java.lang.Integer> getPotentialModificationSites(PTM ptm, AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.io.FileNotFoundException, java.lang.ClassNotFoundException, java.sql.SQLException
ptm - the PTM consideredmatchingType - the type of sequence matchingmassTolerance - the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisejava.io.IOException - exception thrown whenever an error occurred while
reading a protein sequencejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while reading a protein sequencejava.lang.InterruptedException - exception thrown whenever an error occurred
while reading a protein sequencejava.io.FileNotFoundExceptionjava.lang.ClassNotFoundExceptionjava.sql.SQLExceptionpublic 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 consideredjava.lang.IllegalArgumentExceptionpublic boolean isSameSequenceAndModificationStatus(Peptide anotherPeptide, AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance)
anotherPeptide - the other peptide to compare to this instancematchingType - the type of sequence matchingmassTolerance - the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisepublic boolean isSameSequence(Peptide anotherPeptide, AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance)
anotherPeptide - the other peptide to comparematchingType - the type of sequence matchingmassTolerance - the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisepublic boolean isSameModificationStatus(Peptide anotherPeptide)
anotherPeptide - the other peptidepublic boolean sameModificationsAs(Peptide anotherPeptide, java.util.ArrayList<java.lang.String> ptms)
anotherPeptide - another peptideptms - the PTMspublic boolean sameModificationsAs(Peptide anotherPeptide)
anotherPeptide - another peptidepublic java.lang.String getNTerminal()
public java.lang.String getCTerminal()
public java.lang.String getTaggedModifiedSequence(ModificationProfile modificationProfile, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName, boolean excludeAllFixedPtms)
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 tagsexcludeAllFixedPtms - if true, all fixed PTMs are excludedpublic 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 tagspublic 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 tagspublic java.util.ArrayList<java.lang.Integer> getModifiedIndexes()
public java.util.ArrayList<java.lang.Integer> getModifiedIndexes(boolean excludeFixed)
excludeFixed - exclude fixed PTMspublic 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(AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.io.FileNotFoundException, java.lang.ClassNotFoundException, java.sql.SQLException
matchingType - the type of sequence matchingmassTolerance - the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisejava.io.IOException - exception thrown whenever an error occurred while
reading the protein sequencejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while reading the protein sequencejava.lang.InterruptedException - exception thrown whenever an error occurred
while reading the protein sequencejava.io.FileNotFoundExceptionjava.lang.ClassNotFoundExceptionjava.sql.SQLExceptionpublic java.util.ArrayList<java.lang.String> isCterm(AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.io.FileNotFoundException, java.lang.ClassNotFoundException, java.sql.SQLException
matchingType - the type of sequence matchingmassTolerance - the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisejava.io.IOException - exception thrown whenever an error occurred while
reading a protein sequencejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while reading a protein sequencejava.lang.InterruptedException - exception thrown whenever an error occurred
while reading a protein sequencejava.io.FileNotFoundExceptionjava.lang.ClassNotFoundExceptionjava.sql.SQLExceptionpublic AminoAcidPattern getSequenceAsPattern()
public static AminoAcidPattern getSequenceAsPattern(java.lang.String sequence)
sequence - the sequence of interestpublic boolean isDecoy()
public static Peptide getNoModPeptide(Peptide peptide, java.util.ArrayList<PTM> ptms) throws java.io.IOException, java.sql.SQLException, java.lang.ClassNotFoundException, java.lang.InterruptedException
peptide - the original peptideptms - list of inspected PTMsjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionjava.sql.SQLExceptionCopyright © 2014. All Rights Reserved.