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.
|
HashMap<Integer,ArrayList<Peptide>> |
getPeptideMatches(String sequence,
int tagIndex,
int componentIndex,
AminoAcidPattern.MatchingType matchingType,
Double massTolerance,
ArrayList<String> fixedModifications,
ArrayList<String> variableModifications,
boolean reportFixedPtms)
Returns the possible peptides which can be created on this sequence
indexed by their start index.
|
ArrayList<Integer> |
getPotentialModificationSites(PTM ptm,
AminoAcidPattern.MatchingType matchingType,
Double massTolerance)
Returns the potential modification sites as an ordered list of string.
|
String |
getTaggedModifiedSequence(ModificationProfile 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(ModificationProfile 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(ModificationProfile 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,
AminoAcidPattern.MatchingType matchingType,
Double massTolerance)
Indicates whether this tag is the same as another tag.
|
boolean |
isSameSequenceAndModificationStatusAs(Tag anotherTag,
AminoAcidPattern.MatchingType matchingType,
Double massTolerance)
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(ModificationProfile 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(ModificationProfile 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(ModificationProfile 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, AminoAcidPattern.MatchingType matchingType, Double massTolerance) throws IOException, IllegalArgumentException, InterruptedException, FileNotFoundException, ClassNotFoundException
ptm
- the PTM consideredmatchingType
- the type of sequence matchingmassTolerance
- the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwiseIOException
- 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
ClassNotFoundException
public boolean isSameAs(Tag anotherTag, AminoAcidPattern.MatchingType matchingType, Double massTolerance)
anotherTag
- another tagmatchingType
- the amino acid matching typemassTolerance
- the mass tolerance to use to consider amino acids as
indistinguishablepublic boolean isSameSequenceAndModificationStatusAs(Tag anotherTag, AminoAcidPattern.MatchingType matchingType, Double massTolerance)
anotherTag
- another tagmatchingType
- the amino acid matching typemassTolerance
- the mass tolerance to use to consider amino acids as
indistinguishablepublic HashMap<Integer,ArrayList<Peptide>> getPeptideMatches(String sequence, int tagIndex, int componentIndex, AminoAcidPattern.MatchingType matchingType, Double massTolerance, ArrayList<String> fixedModifications, ArrayList<String> variableModifications, boolean reportFixedPtms)
sequence
- the sequence where to look for the tagtagIndex
- the index where the tag is locatedcomponentIndex
- the index of the component of the tag indexed by
tagIndex in the content listmatchingType
- the matching type to usemassTolerance
- the ms2 tolerancefixedModifications
- the fixed modifications to considervariableModifications
- the variable modifications to considerreportFixedPtms
- a boolean indicating whether fixed PTMs should be
reported in the Peptide objectpublic 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 © 2014. All rights reserved.