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 sequence tag between two mass tags.
|
Modifier and Type | Method and Description |
---|---|
void |
addAminoAcidSequence(AminoAcidPattern 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.
|
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)
Returns the start and end indexes of the tag in the given sequence.
|
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>.
|
boolean |
isSameAs(Tag anotherTag)
Indicates whether this tag is the same as another tag.
|
addUrParam, getParameterKey, getUrParam
public Tag()
public Tag(double nTermGap, AminoAcidPattern 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 addAminoAcidSequence(AminoAcidPattern 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)
anotherTag
- another tagpublic HashMap<Integer,ArrayList<Peptide>> getPeptideMatches(String sequence, int tagIndex, int componentIndex, AminoAcidPattern.MatchingType matchingType, Double massTolerance, ArrayList<String> fixedModifications, ArrayList<String> variableModifications)
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 considerCopyright © 2014. All rights reserved.