public class Peptide extends ExperimentObject
Modifier and Type | Field and Description |
---|---|
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 as string.
|
Constructor and Description |
---|
Peptide()
Constructor for the peptide.
|
Peptide(String aSequence)
Constructor.
|
Peptide(String aSequence,
ModificationMatch[] modifications)
Constructor.
|
Peptide(String aSequence,
ModificationMatch[] modificationMatches,
boolean sanityCheck)
Constructor.
|
Peptide(String aSequence,
ModificationMatch[] modificationMatches,
boolean sanityCheck,
double mass)
Constructor.
|
Peptide(String aSequence,
ModificationMatch[] modificationMatches,
HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches,
boolean sanityCheck)
Constructor for the peptide.
|
Peptide(String aSequence,
ModificationMatch[] modificationMatches,
HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches,
boolean sanityCheck,
double mass)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addModificationMatch(ModificationMatch modificationMatch)
Adds a modification match.
|
void |
clearModificationMatches()
Clears the list of imported modification matches.
|
void |
clearVariantMatches()
Clears the list of imported variant matches.
|
void |
estimateTheoreticMass()
Estimates the theoretic mass of the peptide.
|
String |
getCTerminal()
Returns the C-terminal of the peptide as a String.
|
long |
getKey()
Returns the reference key of a peptide.
|
static long |
getKey(String sequence,
ModificationMatch[] modificationMatches)
Returns the reference key of a peptide.
|
double |
getMass()
Getter for the mass.
|
long |
getMatchingKey()
Returns the key accounting for sequence matching preferences
|
long |
getMatchingKey(SequenceMatchingParameters sequenceMatchingPreferences)
Returns a unique key for the peptide when considering the given matching
preferences.
|
ModificationMatch[] |
getModificationMatches()
Getter for the modifications carried by this peptide.
|
int |
getNMissedCleavages(DigestionParameters digestionPreferences)
Returns the number of missed cleavages using the digestion preferences.
|
int |
getNMissedCleavages(Enzyme enzyme)
Returns the number of missed cleavages using the specified enzyme.
|
int |
getNModifications()
Returns the number of modifications carried by this peptide.
|
Peptide |
getNoModPeptide(HashSet<String> forbiddenModifications)
Returns a version of the peptide which does not contain the given list of
modifications.
|
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.
|
int |
getPeptideEnd(String proteinAccession,
int peptideStart)
Returns the 0 based end index of the peptide on the protein sequence.
|
HashSet<Integer> |
getPotentialModificationSites(Modification modification,
SequenceProvider sequenceProvider,
SequenceMatchingParameters modificationSequenceMatchingPreferences)
Returns the potential modification sites as a set.
|
ArrayList<Integer> |
getPotentialModificationSites(Modification modification,
String proteinSequence,
int peptideStart,
SequenceMatchingParameters modificationSequenceMatchingPreferences)
Returns the potential modification sites as an ordered list of sites.
|
ArrayList<Integer> |
getPotentialModificationSitesNoCombination(Modification modification,
String proteinSequence,
int peptideStart)
Returns the potential modification sites as an ordered list of sites.
|
TreeMap<String,int[]> |
getProteinMapping()
Returns the proteins mapping as a map of 0 based indexes for every
protein accession.
|
String |
getSequence()
Returns for the sequence.
|
String |
getTaggedModifiedSequence(ModificationParameters modificationProfile,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName)
Returns the modified sequence as an tagged string with potential
modification sites color coded or with Modification tags, e.g,
<mox>.
|
String |
getTaggedModifiedSequence(ModificationParameters 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 Modification tags, e.g,
<mox>.
|
HashMap<String,HashMap<Integer,PeptideVariantMatches>> |
getVariantMatches()
Returns the sequence variant matches of this peptide indexed by protein
accession and peptide start.
|
boolean |
isCterm(String proteinSequence,
int peptideStart)
Returns a boolean indicating whether the peptide is at the C-terminus of
the given protein sequence.
|
boolean |
isNterm(String proteinSequence,
int peptideStart)
Returns a boolean indicating whether the peptide is at the N-terminus of
the given protein sequence.
|
boolean |
isSameModificationStatus(Peptide anotherPeptide)
Indicates whether another peptide has the same variable modifications as
this peptide.
|
boolean |
isSameSequence(Peptide anotherPeptide,
SequenceMatchingParameters sequenceMatchingPreferences)
Returns a boolean indicating whether another peptide has the same
sequence as the given peptide
|
boolean |
isSameSequenceAndModificationStatus(Peptide anotherPeptide,
SequenceMatchingParameters sequenceMatchingPreferences)
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,
ArrayList<String> modifications)
Indicates whether another peptide has the same modifications at the same
localization as this peptide.
|
void |
setKey(long key)
Sets the object key.
|
void |
setMass(double mass)
Sets the mass.
|
void |
setMatchingKey(long matchingKey)
Sets the key accounting for sequence matching preferences.
|
void |
setModificationMatches(ModificationMatch[] modificationMatches)
Sets new modification matches for the peptide.
|
void |
setProteinMapping(TreeMap<String,int[]> proteinMapping)
Sets the proteins mapping as a map of 0 based indexes for every protein
accession.
|
void |
setSequence(String sequence)
Sets for the sequence.
|
void |
setVariantMatches(HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches)
Sets the sequence variant matches of this peptide.
|
addUrParam, asLong, clearParametersMap, getUrParam, getUrParams, removeUrParam, setUrParams
getFirstLevel, getId, setFirstLevel, setId
jdoZooEvict, jdoZooGetBackup, jdoZooGetClassDef, jdoZooGetContext, jdoZooGetNode, jdoZooGetOid, jdoZooGetTimestamp, jdoZooHasState, jdoZooInit, jdoZooIsDeleted, jdoZooIsDetached, jdoZooIsDirty, jdoZooIsNew, jdoZooIsPersistent, jdoZooIsStateHollow, jdoZooIsTransactional, jdoZooMarkClean, jdoZooMarkDeleted, jdoZooMarkDetached, jdoZooMarkDirty, jdoZooMarkHollow, jdoZooMarkTransient, jdoZooSetOid, jdoZooSetTimestamp, toString, zooActivateRead, zooActivateWrite, zooActivateWrite
public static final String MODIFICATION_LOCALIZATION_SEPARATOR
public static final String MODIFICATION_SEPARATOR
public Peptide()
public Peptide(String aSequence, ModificationMatch[] modificationMatches, HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches, boolean sanityCheck, double mass)
aSequence
- the peptide sequence, assumed to be in upper case onlymodificationMatches
- the Modification of this peptidevariantMatches
- the sequence variants compared to the databasesanityCheck
- boolean indicating whether the input should be checkedmass
- the mass of the peptidepublic Peptide(String aSequence, ModificationMatch[] modificationMatches, boolean sanityCheck, double mass)
aSequence
- the peptide sequence, assumed to be in upper case onlymodificationMatches
- the Modification of this peptidesanityCheck
- boolean indicating whether the input should be checkedmass
- the mass of the peptidepublic Peptide(String aSequence, ModificationMatch[] modificationMatches, boolean sanityCheck)
aSequence
- the peptide sequence, assumed to be in upper case onlymodificationMatches
- the Modification of this peptidesanityCheck
- boolean indicating whether the input should be checkedpublic Peptide(String aSequence)
aSequence
- the peptide sequencepublic Peptide(String aSequence, ModificationMatch[] modifications)
aSequence
- the peptide sequence, assumed to be in upper case onlymodifications
- the Modification of this peptidepublic Peptide(String aSequence, ModificationMatch[] modificationMatches, HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches, boolean sanityCheck)
aSequence
- the peptide sequence, assumed to be in upper case onlymodificationMatches
- the modifications of this peptidevariantMatches
- the variants compared to the databasesanityCheck
- boolean indicating whether the input should be checkedpublic void setMass(double mass)
mass
- the masspublic void setKey(long key)
key
- the object keypublic TreeMap<String,int[]> getProteinMapping()
public void setProteinMapping(TreeMap<String,int[]> proteinMapping)
proteinMapping
- the proteins mappingpublic void setVariantMatches(HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches)
variantMatches
- the variant matches of this peptidepublic HashMap<String,HashMap<Integer,PeptideVariantMatches>> getVariantMatches()
public double getMass()
public ModificationMatch[] getModificationMatches()
public void setModificationMatches(ModificationMatch[] modificationMatches)
modificationMatches
- the new modification matchespublic void clearModificationMatches()
public void addModificationMatch(ModificationMatch modificationMatch)
modificationMatch
- the modification match to addpublic void clearVariantMatches()
public int getPeptideEnd(String proteinAccession, int peptideStart)
proteinAccession
- the protein accessionpeptideStart
- the peptide start indexpublic String getSequence()
public void setSequence(String sequence)
sequence
- the peptide sequencepublic int getNMissedCleavages(Enzyme enzyme)
enzyme
- the enzyme usedpublic int getNMissedCleavages(DigestionParameters digestionPreferences)
digestionPreferences
- the digestion preferencespublic long getMatchingKey()
public void setMatchingKey(long matchingKey)
matchingKey
- the key accounting for sequence matching preferencespublic long getMatchingKey(SequenceMatchingParameters sequenceMatchingPreferences)
sequenceMatchingPreferences
- the sequence matching preferencespublic long getKey()
public static long getKey(String sequence, ModificationMatch[] modificationMatches)
sequence
- the sequence of the peptidemodificationMatches
- list of modification matchespublic int getNVariableModifications(double modificationMass)
modificationMass
- the mass of the modificationpublic int getNModifications()
public ArrayList<Integer> getPotentialModificationSitesNoCombination(Modification modification, String proteinSequence, int peptideStart)
modification
- the Modification consideredproteinSequence
- the protein sequencepeptideStart
- the index of the peptide start on the proteinpublic HashSet<Integer> getPotentialModificationSites(Modification modification, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationSequenceMatchingPreferences)
modification
- the Modification consideredsequenceProvider
- a protein sequence providermodificationSequenceMatchingPreferences
- the sequence matching
preferences for Modification to peptide mappingpublic ArrayList<Integer> getPotentialModificationSites(Modification modification, String proteinSequence, int peptideStart, SequenceMatchingParameters modificationSequenceMatchingPreferences)
modification
- the Modification consideredproteinSequence
- the protein sequencepeptideStart
- the index of the peptide start on the proteinmodificationSequenceMatchingPreferences
- the sequence matching
preferences for Modification to peptide mappingpublic boolean isNterm(String proteinSequence, int peptideStart)
proteinSequence
- the sequence of the proteinpeptideStart
- the 0 based peptide start index on the proteinpublic boolean isCterm(String proteinSequence, int peptideStart)
proteinSequence
- the sequence of the proteinpeptideStart
- the 0 based peptide start index on the proteinpublic boolean isSameSequenceAndModificationStatus(Peptide anotherPeptide, SequenceMatchingParameters sequenceMatchingPreferences)
anotherPeptide
- the other peptide to compare to this instancesequenceMatchingPreferences
- the sequence matching preferencespublic boolean isSameSequence(Peptide anotherPeptide, SequenceMatchingParameters sequenceMatchingPreferences)
anotherPeptide
- the other peptide to comparesequenceMatchingPreferences
- the sequence matching preferencespublic boolean isSameModificationStatus(Peptide anotherPeptide)
anotherPeptide
- the other peptidepublic boolean sameModificationsAs(Peptide anotherPeptide, ArrayList<String> modifications)
anotherPeptide
- another peptidemodifications
- the Modificationspublic boolean sameModificationsAs(Peptide anotherPeptide)
anotherPeptide
- another peptidepublic String getNTerminal()
public String getCTerminal()
public String getTaggedModifiedSequence(ModificationParameters modificationProfile, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName, boolean excludeAllFixedPtms)
modificationProfile
- the modification profile of the searchuseHtmlColorCoding
- if true, color coded HTML is used, otherwise
Modification 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 Modifications are excludedpublic String getTaggedModifiedSequence(ModificationParameters modificationProfile, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
modificationProfile
- the modification profile of the searchuseHtmlColorCoding
- if true, color coded HTML is used, otherwise
Modification 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 void estimateTheoreticMass()
Copyright © 2018. All rights reserved.