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.
|
NO_KEY
Constructor and Description |
---|
Peptide()
Constructor for the peptide.
|
Peptide(String aSequence)
Constructor.
|
Peptide(String aSequence,
ModificationMatch[] variableModifications)
Constructor.
|
Peptide(String aSequence,
ModificationMatch[] variableModifications,
boolean sanityCheck)
Constructor.
|
Peptide(String aSequence,
ModificationMatch[] variableModifications,
boolean sanityCheck,
double mass)
Constructor.
|
Peptide(String aSequence,
ModificationMatch[] variableModifications,
HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches,
boolean sanityCheck)
Constructor for the peptide.
|
Peptide(String aSequence,
ModificationMatch[] variableModifications,
HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches,
boolean sanityCheck,
double mass)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addVariableModification(ModificationMatch modificationMatch)
Adds a modification match.
|
void |
clearVariableModifications()
Clears the variable modifications.
|
void |
clearVariantMatches()
Clears the list of imported variant matches.
|
void |
estimateTheoreticMass(ModificationParameters modificationParameters,
SequenceProvider sequenceProvider,
SequenceMatchingParameters modificationSequenceMatchingParameters)
Estimates the theoretic mass of the peptide.
|
String[] |
getFixedModifications(ModificationParameters modificationParameters,
SequenceProvider sequenceProvider,
SequenceMatchingParameters modificationsSequenceMatchingParameters)
Returns the fixed modifications for this peptide based on the given
modification parameters.
|
String[] |
getIndexedVariableModifications()
Returns the variable modifications indexed by site.
|
long |
getKey()
Returns the reference key of a peptide.
|
static long |
getKey(String sequence,
ModificationMatch[] variableModifications)
Returns the reference key of a peptide.
|
double |
getMass()
Returns the mass, does not attempt to estimate it.
|
double |
getMass(ModificationParameters modificationParameters,
SequenceProvider sequenceProvider,
SequenceMatchingParameters modificationSequenceMatchingParameters)
Returns the mass, estimates it if not done before.
|
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.
|
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.
|
Peptide |
getNoModPeptide(HashSet<String> forbiddenModifications)
Returns a version of the peptide which does not contain the given list of
modifications.
|
int |
getNVariableModifications()
Returns the number of modifications carried by this peptide.
|
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.
|
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 protein mapping as a map of 0-based indexes for every
protein accession.
|
String |
getSequence()
Returns for the sequence.
|
String |
getTaggedModifiedSequence(ModificationParameters modificationProfile,
SequenceProvider sequenceProvider,
SequenceMatchingParameters modificationsSequenceMatchingParameters,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName,
HashSet<String> displayedModifications)
Returns the modified sequence as an tagged string with potential
modification sites color coded or with Modification tags, e.g,
<mox>.
|
ModificationMatch[] |
getVariableModifications()
Returns the variable modifications.
|
HashMap<String,HashMap<Integer,PeptideVariantMatches>> |
getVariantMatches()
Returns the sequence variant matches of this peptide indexed by protein
accession and peptide start.
|
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 variable 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 |
setProteinMapping(TreeMap<String,int[]> proteinMapping)
Sets the protein mapping as a map of 0-based indexes for every protein
accession.
|
void |
setSequence(String sequence)
Sets for the sequence.
|
void |
setVariableModifications(ModificationMatch[] variableModifications)
Sets the variable modifications.
|
void |
setVariantMatches(HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches)
Sets the sequence variant matches of this peptide.
|
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
public static final String MODIFICATION_LOCALIZATION_SEPARATOR
public static final String MODIFICATION_SEPARATOR
public Peptide()
public Peptide(String aSequence, ModificationMatch[] variableModifications, HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches, boolean sanityCheck, double mass)
aSequence
- the peptide sequence, assumed to be in upper case onlyvariableModifications
- the variable modifications 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[] variableModifications, boolean sanityCheck, double mass)
aSequence
- the peptide sequence, assumed to be in upper case onlyvariableModifications
- the variable modification of this peptidesanityCheck
- boolean indicating whether the input should be checkedmass
- the mass of the peptidepublic Peptide(String aSequence, ModificationMatch[] variableModifications, boolean sanityCheck)
aSequence
- the peptide sequence, assumed to be in upper case onlyvariableModifications
- the variable modification of this peptidesanityCheck
- boolean indicating whether the input should be checkedpublic Peptide(String aSequence)
aSequence
- the peptide sequencepublic Peptide(String aSequence, ModificationMatch[] variableModifications)
aSequence
- the peptide sequence, assumed to be in upper case onlyvariableModifications
- the variable modification of this peptidepublic Peptide(String aSequence, ModificationMatch[] variableModifications, HashMap<String,HashMap<Integer,PeptideVariantMatches>> variantMatches, boolean sanityCheck)
aSequence
- the peptide sequence, assumed to be in upper case onlyvariableModifications
- the variable 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 protein 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 double getMass(ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationSequenceMatchingParameters)
modificationParameters
- the modifications parameterssequenceProvider
- a protein sequence providermodificationSequenceMatchingParameters
- the modifications sequence
matching parameterspublic ModificationMatch[] getVariableModifications()
public String[] getIndexedVariableModifications()
public String[] getFixedModifications(ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters)
modificationParameters
- the modification parameters the
modification parameterssequenceProvider
- a protein sequence providermodificationsSequenceMatchingParameters
- the sequence matching
parameters to use for modificationspublic void setVariableModifications(ModificationMatch[] variableModifications)
variableModifications
- the variable modificationspublic void clearVariableModifications()
public void addVariableModification(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[] variableModifications)
sequence
- the sequence of the peptidevariableModifications
- list of modification matchespublic int getNVariableModifications(double modificationMass)
modificationMass
- the mass of the modificationpublic int getNVariableModifications()
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 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 getTaggedModifiedSequence(ModificationParameters modificationProfile, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName, HashSet<String> displayedModifications)
modificationProfile
- the modification profile of the searchsequenceProvider
- a protein sequence providermodificationsSequenceMatchingParameters
- the sequence matching
parameters to use for modificationsuseHtmlColorCoding
- 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 tagsdisplayedModifications
- the modifications to displaypublic void estimateTheoreticMass(ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationSequenceMatchingParameters)
modificationParameters
- the modifications parameterssequenceProvider
- a protein sequence providermodificationSequenceMatchingParameters
- the modifications sequence
matching parametersCopyright © 2021. All rights reserved.