public class Tag extends ExperimentObject
NO_KEY
Constructor and Description |
---|
Tag()
Constructor for an empty tag.
|
Tag(double nTermGap,
AminoAcidSequence sequenceTag,
double cTermGap)
Constructor for a tag consisting of a sequence tag between two mass tags.
|
Tag(Tag tag)
Creates a new tag instance based on the given one.
|
Modifier and Type | Method and Description |
---|---|
void |
addAminoAcidSequence(AminoAcidSequence aminoAcidSequence)
Adds a sequence of amino acids to the tag.
|
void |
addMassGap(double massGap)
Adds a mass gap to the tag.
|
String |
asSequence()
Returns the tag as intelligible sequence of tag components.
|
boolean |
canReverse()
Indicates whether the tag can be reversed (ie if termini are mass gaps
with mass ≥ water).
|
ArrayList<TagComponent> |
getContent()
Returns the content of this tag as a list.
|
String |
getCTerminal(boolean includeTerminalGaps,
ModificationParameters modificationParameters,
SequenceMatchingParameters modificationsSequenceMatchingParameters)
Returns the C-terminal tag of this tag as a string for sequence display.
|
double |
getCTerminalGap()
Returns the C-terminal gap of the tag.
|
int |
getLengthInAminoAcid()
Returns the amino acid length of the tag when mass gaps are considered
like one amino acid
|
String |
getLongestAminoAcidSequence()
Returns the longest amino acid sequence contained in this tag.
|
double |
getMass()
Returns the mass of the tag.
|
double |
getMass(boolean includeCTermGap,
boolean includeNTermGap)
Returns the theoretic mass of the tag, eventually without terminal gaps.
|
String |
getNTerminal(boolean includeTerminalGaps,
ModificationParameters modificationParameters,
SequenceMatchingParameters modificationsSequenceMatchingParameters)
Returns the N-terminal tag of this tag as a string for sequence display.
|
double |
getNTerminalGap()
Returns the N-terminal gap of the tag.
|
ArrayList<Integer> |
getPotentialModificationSites(Modification modification,
SequenceMatchingParameters modificationSequenceMatchingPreferences)
Returns the potential modification sites as an ordered list of string.
|
String |
getTaggedModifiedSequence(ModificationParameters modificationProfile,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName,
boolean includeTerminalGaps,
SequenceMatchingParameters modificationsSequenceMatchingParameters,
HashSet<String> displayedModifications)
Returns the modified sequence as an tagged string with potential
modification sites color coded or with modification tags, e.g,
<mox>.
|
static String |
getTaggedModifiedSequence(ModificationParameters modificationParameters,
Tag tag,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName,
boolean includeTerminalGaps,
SequenceMatchingParameters modificationsSequenceMatchingParameters,
HashSet<String> displayedModifications)
Returns the modified sequence as an tagged string with potential
modification sites color coded or with modification tags, e.g,
<mox>.
|
static String |
getTagModificationsAsString(Tag tag)
Returns the tag modifications as a string.
|
boolean |
isSameAs(Tag anotherTag,
SequenceMatchingParameters sequenceMatchingPreferences)
Indicates whether this tag is the same as another tag.
|
boolean |
isSameSequenceAndModificationStatusAs(Tag anotherTag,
SequenceMatchingParameters sequenceMatchingPreferences)
Indicates whether this tag is the same as another tag without accounting
for modification localization.
|
Tag |
reverse(boolean yIon)
Returns a new tag instance which is a reversed version of the current
tag.
|
void |
setContent(ArrayList<TagComponent> content)
Sets the content for the given tag.
|
String |
toString() |
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
public Tag()
public Tag(Tag tag)
tag
- the reference tagpublic Tag(double nTermGap, AminoAcidSequence sequenceTag, double cTermGap)
nTermGap
- the N-term mass gapsequenceTag
- the sequence tag with modificationscTermGap
- the C-term mass gappublic ArrayList<TagComponent> getContent()
public void setContent(ArrayList<TagComponent> content)
content
- an array of tag componentspublic void addMassGap(double massGap)
massGap
- the value of the mass gappublic void addAminoAcidSequence(AminoAcidSequence aminoAcidSequence)
aminoAcidSequence
- the amino acid sequence with modificationspublic String asSequence()
public String getLongestAminoAcidSequence()
public double getMass()
public double getMass(boolean includeCTermGap, boolean includeNTermGap)
includeCTermGap
- if true the C-terminal gap will be added if
presentincludeNTermGap
- if true the N-terminal gap will be added if
presentpublic double getNTerminalGap()
public double getCTerminalGap()
public String getTaggedModifiedSequence(ModificationParameters modificationProfile, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName, boolean includeTerminalGaps, SequenceMatchingParameters modificationsSequenceMatchingParameters, HashSet<String> displayedModifications)
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 tagsincludeTerminalGaps
- if true, the terminal gaps will be displayed
on the sequencemodificationsSequenceMatchingParameters
- the sequence matching
parameters to use for modificationsdisplayedModifications
- the modifications to displaypublic static String getTaggedModifiedSequence(ModificationParameters modificationParameters, Tag tag, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName, boolean includeTerminalGaps, SequenceMatchingParameters modificationsSequenceMatchingParameters, HashSet<String> displayedModifications)
modificationParameters
- the modification profile of the searchtag
- the tagincludeHtmlStartEndTags
- if true, start and end HTML tags are addeduseHtmlColorCoding
- if true, color coded HTML is used, otherwise
modification tags, e.g, <mox>, are useduseShortName
- if true, the short names are used in the tagsincludeTerminalGaps
- if true, the terminal gaps will be displayed
on the sequencemodificationsSequenceMatchingParameters
- the sequence matching
parameters to use for modificationsdisplayedModifications
- the modifications to displaypublic String getNTerminal(boolean includeTerminalGaps, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters)
includeTerminalGaps
- indicates whether mass gaps shall be includedmodificationParameters
- the modification profile of the searchmodificationsSequenceMatchingParameters
- the sequence matching
parameters to use for modificationspublic String getCTerminal(boolean includeTerminalGaps, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters)
includeTerminalGaps
- indicates whether mass gaps shall be includedmodificationParameters
- the modification profile of the searchmodificationsSequenceMatchingParameters
- the sequence matching
parameters to use for modificationspublic int getLengthInAminoAcid()
public ArrayList<Integer> getPotentialModificationSites(Modification modification, SequenceMatchingParameters modificationSequenceMatchingPreferences)
modification
- the modification consideredmodificationSequenceMatchingPreferences
- the sequence matching
preferences for the modification to amino acid sequence mappingpublic boolean isSameAs(Tag anotherTag, SequenceMatchingParameters sequenceMatchingPreferences)
anotherTag
- another tagsequenceMatchingPreferences
- the sequence matching preferencespublic boolean isSameSequenceAndModificationStatusAs(Tag anotherTag, SequenceMatchingParameters sequenceMatchingPreferences)
anotherTag
- another tagsequenceMatchingPreferences
- the sequence matching preferencespublic static String getTagModificationsAsString(Tag tag)
tag
- the tagpublic Tag reverse(boolean yIon)
yIon
- indicates whether the tag is based on y ionspublic boolean canReverse()
Copyright © 2021. All rights reserved.