public class Tag extends ExperimentObject
Constructor and Description |
---|
Tag()
Constructor for an empty tag.
|
Tag(double nTermGap,
AminoAcidPattern sequenceTag,
double cTermGap)
Constructor for a tag consisting of a pattern tag between two mass tags.
|
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 |
addAminoAcidPattern(AminoAcidPattern aminoAcidPattern)
Adds a sequence of amino acids to the tag.
|
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)
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)
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(PTM ptm,
SequenceMatchingPreferences ptmSequenceMatchingPreferences)
Returns the potential modification sites as an ordered list of string.
|
String |
getTaggedModifiedSequence(PtmSettings modificationProfile,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName,
boolean includeTerminalGaps)
Returns the modified sequence as an tagged string with potential
modification sites color coded or with PTM tags, e.g, <mox>.
|
String |
getTaggedModifiedSequence(PtmSettings modificationProfile,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName,
boolean excludeAllFixedModifications,
boolean includeTerminalGaps)
Returns the modified sequence as an tagged string with potential
modification sites color coded or with PTM tags, e.g, <mox>.
|
static String |
getTaggedModifiedSequence(PtmSettings modificationProfile,
Tag tag,
boolean useHtmlColorCoding,
boolean includeHtmlStartEndTags,
boolean useShortName,
boolean excludeAllFixedPtms,
boolean includeTerminalGaps)
Returns the modified sequence as an tagged string with potential
modification sites color coded or with PTM tags, e.g, <mox>.
|
static String |
getTagModificationsAsString(Tag tag)
Returns the tag modifications as a string.
|
boolean |
isSameAs(Tag anotherTag,
SequenceMatchingPreferences sequenceMatchingPreferences)
Indicates whether this tag is the same as another tag.
|
boolean |
isSameSequenceAndModificationStatusAs(Tag anotherTag,
SequenceMatchingPreferences 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.
|
String |
toString() |
addUrParam, getParameterKey, getUrParam
public Tag()
public Tag(Tag tag)
tag
- the reference tagpublic Tag(double nTermGap, AminoAcidPattern sequenceTag, double cTermGap)
nTermGap
- the N-term mass gapsequenceTag
- the sequence tag with modificationscTermGap
- the C-term mass gappublic 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 addMassGap(double massGap)
massGap
- the value of the mass gappublic void addAminoAcidPattern(AminoAcidPattern aminoAcidPattern)
aminoAcidPattern
- the amino acid sequence with modificationspublic 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(PtmSettings modificationProfile, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName, boolean excludeAllFixedModifications, boolean includeTerminalGaps)
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 tagsincludeTerminalGaps
- if true. the terminal gaps will be displayed on
the sequenceexcludeAllFixedModifications
- if true. fixed modifications will not
be displayed on the sequencepublic String getTaggedModifiedSequence(PtmSettings modificationProfile, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName, boolean includeTerminalGaps)
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 tagsincludeTerminalGaps
- if true, the terminal gaps will be displayed on
the sequencepublic static String getTaggedModifiedSequence(PtmSettings modificationProfile, Tag tag, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName, boolean excludeAllFixedPtms, boolean includeTerminalGaps)
modificationProfile
- 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
PTM tags, e.g, <mox>, are useduseShortName
- if true, the short names are used in the tagsexcludeAllFixedPtms
- if true, the fixed PTMs will not be displayedincludeTerminalGaps
- if true, the terminal gaps will be displayed on
the sequencepublic String getNTerminal(boolean includeTerminalGaps)
includeTerminalGaps
- indicates whether mass gaps shall be includedpublic String getCTerminal(boolean includeTerminalGaps)
includeTerminalGaps
- indicates whether mass gaps shall be includedpublic int getLengthInAminoAcid()
public ArrayList<Integer> getPotentialModificationSites(PTM ptm, SequenceMatchingPreferences ptmSequenceMatchingPreferences) throws IOException, IllegalArgumentException, InterruptedException, FileNotFoundException, ClassNotFoundException
ptm
- the PTM consideredptmSequenceMatchingPreferences
- the sequence matching preferences
for the PTM to amino acid sequence mappingIOException
- exception thrown whenever an error occurred while
reading a protein sequenceIllegalArgumentException
- exception thrown whenever an error
occurred while reading a protein sequenceInterruptedException
- exception thrown whenever an error occurred
while reading a protein sequenceFileNotFoundException
- if a FileNotFoundException occursClassNotFoundException
- if a ClassNotFoundException occurspublic boolean isSameAs(Tag anotherTag, SequenceMatchingPreferences sequenceMatchingPreferences)
anotherTag
- another tagsequenceMatchingPreferences
- the sequence matching preferencespublic boolean isSameSequenceAndModificationStatusAs(Tag anotherTag, SequenceMatchingPreferences 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 © 2016. All rights reserved.