|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.biology.AminoAcidPattern
public class AminoAcidPattern
An amino acid pattern is a sequence of amino-acids. For example for trypsin: Target R or K not followed by P. the Indexing starts with 0.
Constructor Summary | |
---|---|
AminoAcidPattern()
Creates an empty pattern. |
|
AminoAcidPattern(AminoAcidPattern aminoAcidPattern)
Creates a pattern from another pattern. |
|
AminoAcidPattern(java.util.ArrayList<java.lang.String> targetTesidues)
Convenience constructor giving a list of targeted residues as input. |
Method Summary | |
---|---|
java.util.ArrayList<AminoAcid> |
getAminoAcidsAtTarget()
Returns the targeted amino acids at position "target". |
java.util.regex.Pattern |
getAsStringPattern()
Returns the amino acid pattern as case insensitive pattern for String matching. |
java.util.ArrayList<AminoAcid> |
getExcludedAA(int index)
Returns the excluded amino acids at a given index in the pattern. |
java.util.ArrayList<java.lang.Integer> |
getIndexes(java.lang.String input)
Returns the indexes where the amino acid pattern was found in the input. |
AminoAcidPattern |
getStandardSearchPattern()
Computes a pattern which can be searched by standard search engines, i.e., a pattern targeting a single amino-acid and not a complex pattern. |
java.lang.Integer |
getTarget()
Returns the index of the amino acid of interest in the pattern. |
java.util.ArrayList<AminoAcid> |
getTargetedAA(int index)
Returns the targeted amino acids at a given index in the pattern. |
static AminoAcidPattern |
getTrypsinExample()
Returns the trypsin example as amino acid pattern. |
boolean |
isEnding(java.lang.String aminoAcidSequence)
Indicates whether the given amino acid sequence ends with the pattern. |
boolean |
isSameAs(AminoAcidPattern anotherPattern)
Indicates whether another AminoAcidPattern targets the same pattern. |
boolean |
isStarting(java.lang.String aminoAcidSequence)
Indicates whether the given amino acid sequence starts with the pattern. |
int |
length()
Returns the length of the pattern in amino acids. |
boolean |
matches(java.lang.String aminoAcidSequence)
Indicates whether the pattern is found in the given amino-acid sequence. |
void |
merge(AminoAcidPattern otherPattern)
Simple merger for two patterns. |
static AminoAcidPattern |
merge(AminoAcidPattern pattern1,
AminoAcidPattern pattern2)
Convenience method merging two different patterns (see public void merge(AminoAcidPattern otherPattern) for detailed information of the merging procedure). |
void |
removeAA(int index)
Removes an amino acid index from the pattern. |
void |
setExcluded(int index,
java.util.ArrayList<AminoAcid> exclusions)
Sets the amino acids excluded at a given index. |
void |
setTarget(java.lang.Integer target)
Sets the index of the amino acid of interest in the pattern. |
void |
setTargeted(int index,
java.util.ArrayList<AminoAcid> targets)
Sets the amino acids targeted at a given index. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AminoAcidPattern()
public AminoAcidPattern(AminoAcidPattern aminoAcidPattern)
aminoAcidPattern
- the other patternpublic AminoAcidPattern(java.util.ArrayList<java.lang.String> targetTesidues) throws java.lang.IllegalArgumentException
targetTesidues
- a list of targeted residues
java.lang.IllegalArgumentException
- exception thrown whenever a letter is
not recognized as amino acidMethod Detail |
---|
public java.lang.Integer getTarget()
public void setTarget(java.lang.Integer target)
target
- the index of the amino acid of interest in the pattern.public java.util.ArrayList<AminoAcid> getAminoAcidsAtTarget()
public void setTargeted(int index, java.util.ArrayList<AminoAcid> targets)
index
- the index in the patterntargets
- the amino acids targetedpublic java.util.ArrayList<AminoAcid> getTargetedAA(int index)
index
- the index in the pattern
public java.util.ArrayList<AminoAcid> getExcludedAA(int index)
index
- the index in the pattern
public void setExcluded(int index, java.util.ArrayList<AminoAcid> exclusions)
index
- the index in the patternexclusions
- the amino acids excludedpublic void removeAA(int index)
index
- the index of the amino acid to removepublic java.util.regex.Pattern getAsStringPattern()
public java.util.ArrayList<java.lang.Integer> getIndexes(java.lang.String input)
input
- the amino acid input sequence as string
public boolean matches(java.lang.String aminoAcidSequence)
aminoAcidSequence
- the amino-acid sequence
public boolean isStarting(java.lang.String aminoAcidSequence)
aminoAcidSequence
- the amino acid sequence
public boolean isEnding(java.lang.String aminoAcidSequence)
aminoAcidSequence
- the amino acid sequence
public boolean isSameAs(AminoAcidPattern anotherPattern)
anotherPattern
- the other AminoAcidPattern
public int length()
public AminoAcidPattern getStandardSearchPattern()
public static AminoAcidPattern getTrypsinExample()
public void merge(AminoAcidPattern otherPattern)
otherPattern
- another pattern to be merged with thispublic static AminoAcidPattern merge(AminoAcidPattern pattern1, AminoAcidPattern pattern2)
pattern1
- the first patternpattern2
- the second pattern
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |