public class ModificationUtils extends Object
Modifier and Type | Field and Description |
---|---|
static HashMap<Integer,int[]> |
arraysMap
map of arrays for c-term.
|
static int[] |
empty
Empty array for no result.
|
static int[] |
zero
Array for n-term.
|
Constructor and Description |
---|
ModificationUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
appendTaggedResidue(StringBuilder stringBuilder,
char residue,
String modificationName,
ModificationParameters modificationProfile,
int localizationConfidenceLevel,
boolean useHtmlColorCoding,
boolean useShortName)
Appends the single residue as a tagged string (HTML color or PTM tag).
|
static void |
appendTaggedResidue(StringBuilder stringBuilder,
char residue,
String confidentModification,
String representativeAmbiguousModification,
String secondaryAmbiguousModification,
String fixedModification,
ModificationParameters modificationProfile,
boolean useHtmlColorCoding,
boolean useShortName)
Returns the single residue as a tagged string (HTML color or PTM tag).
|
static HashSet<String> |
getAllModifications(Peptide peptide,
ModificationParameters modificationParameters,
SequenceProvider sequenceProvider,
SequenceMatchingParameters modificationsSequenceMatchingParameters)
Returns a set of the names of all modifications found on a peptide.
|
static HashSet<String> |
getAllModifications(Tag tag,
ModificationParameters modificationParameters,
SequenceMatchingParameters modificationsSequenceMatchingParameters)
Returns a set of the names of all modifications found on a tag.
|
static int[] |
getArray(int index)
Returns an array containing only the given index.
|
static int[] |
getPossibleModificationSites(AminoAcidSequence aminoAcidSequence,
boolean nTerm,
boolean cTerm,
Modification modification,
SequenceMatchingParameters modificationsSequenceMatchingParameters)
Returns an array of the possible modification sites for the given
modification on the given peptide.
|
static int[] |
getPossibleModificationSites(Peptide peptide,
Modification modification,
SequenceProvider sequenceProvider,
SequenceMatchingParameters modificationsSequenceMatchingParameters)
Returns an array of the possible modification sites for the given
modification on the given peptide.
|
static int |
getSite(int index,
int sequenceLength)
Returns the 1-based index on the peptide.
|
static String |
getTaggedModifiedSequence(ModificationParameters modificationProfile,
String sequence,
String[] confidentModificationSites,
String[] representativeAmbiguousModificationSites,
String[] secondaryAmbiguousModificationSites,
String[] fixedModificationSites,
boolean useHtmlColorCoding,
boolean useShortName)
Returns the modified sequence as an tagged string with potential
modification sites color coded or with PTM tags, e.g, <mox>.
|
public static final int[] empty
public static final int[] zero
public static int[] getArray(int index)
index
- the indexpublic static int[] getPossibleModificationSites(Peptide peptide, Modification modification, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters)
peptide
- the peptidemodification
- the modificationsequenceProvider
- a protein sequence providermodificationsSequenceMatchingParameters
- the sequence matching
paramters to use for modificationspublic static int[] getPossibleModificationSites(AminoAcidSequence aminoAcidSequence, boolean nTerm, boolean cTerm, Modification modification, SequenceMatchingParameters modificationsSequenceMatchingParameters)
aminoAcidSequence
- the amino acid sequencenTerm
- boolean indicating whether the sequence is located at the
n-termcTerm
- boolean indicating whether the sequence is located at the
c-termmodification
- the modificationmodificationsSequenceMatchingParameters
- the sequence matching
parameters to use for modificationspublic static String getTaggedModifiedSequence(ModificationParameters modificationProfile, String sequence, String[] confidentModificationSites, String[] representativeAmbiguousModificationSites, String[] secondaryAmbiguousModificationSites, String[] fixedModificationSites, boolean useHtmlColorCoding, boolean useShortName)
modificationProfile
- the modification profile of the searchsequence
- the amino acid sequence to annotateconfidentModificationSites
- the confidently localized variable
modification sites in a map: aa number > list of modifications (1 is
the first AA) (can be null)representativeAmbiguousModificationSites
- the representative site
of the ambiguously localized variable modifications in a map: aa number
> list of modifications (1 is the first AA) (can be null)secondaryAmbiguousModificationSites
- the secondary sites of the
ambiguously localized variable modifications 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 static void appendTaggedResidue(StringBuilder stringBuilder, char residue, String confidentModification, String representativeAmbiguousModification, String secondaryAmbiguousModification, String fixedModification, ModificationParameters modificationProfile, boolean useHtmlColorCoding, boolean useShortName)
stringBuilder
- the string builderresidue
- the residue to tagconfidentModification
- the confident ptm at siterepresentativeAmbiguousModification
- the representative ptm at sitesecondaryAmbiguousModification
- the secondary ptm at sitefixedModification
- the fixed ptm at sitemodificationProfile
- the modification profileuseHtmlColorCoding
- 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 static void appendTaggedResidue(StringBuilder stringBuilder, char residue, String modificationName, ModificationParameters modificationProfile, int localizationConfidenceLevel, boolean useHtmlColorCoding, boolean useShortName)
stringBuilder
- the string builderresidue
- the residue to tagmodificationName
- the name of the PTMmodificationProfile
- the modification profilelocalizationConfidenceLevel
- the localization confidence leveluseHtmlColorCoding
- 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 static int getSite(int index, int sequenceLength)
index
- the modification indexsequenceLength
- the sequence lengthpublic static HashSet<String> getAllModifications(Peptide peptide, ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters)
peptide
- the peptidemodificationParameters
- the modification parameterssequenceProvider
- the protein sequence providermodificationsSequenceMatchingParameters
- the modification sequences
parameterspublic static HashSet<String> getAllModifications(Tag tag, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters)
tag
- the tagmodificationParameters
- the modification parametersmodificationsSequenceMatchingParameters
- the modification sequences
parametersCopyright © 2018. All rights reserved.