|
||||||||||
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(ArrayList<String> targetTesidues)
Convenience constructor giving a list of targeted residues as input. |
|
AminoAcidPattern(String sequence)
Constructor taking a sequence of targeted amino acids as input. |
Method Summary | |
---|---|
ArrayList<AminoAcid> |
getAminoAcidsAtTarget()
Returns the targeted amino acids at position "target". |
Pattern |
getAsStringPattern()
Returns the amino acid pattern as case insensitive pattern for String matching. |
ArrayList<AminoAcid> |
getExcludedAA(int index)
Returns the excluded amino acids at a given index in the pattern. |
ArrayList<Integer> |
getIndexes(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. |
Integer |
getTarget()
Returns the index of the amino acid of interest in the pattern. |
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(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(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(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,
ArrayList<AminoAcid> exclusions)
Sets the amino acids excluded at a given index. |
void |
setTarget(Integer target)
Sets the index of the amino acid of interest in the pattern. |
void |
setTargeted(int index,
ArrayList<AminoAcid> targets)
Sets the amino acids targeted at a given index. |
void |
swapRows(int fromRow,
int toRow)
Swap two rows in the pattern. |
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(String sequence)
sequence
- a sequence of targeted amino acidspublic AminoAcidPattern(AminoAcidPattern aminoAcidPattern)
aminoAcidPattern
- the other patternpublic AminoAcidPattern(ArrayList<String> targetTesidues) throws IllegalArgumentException
targetTesidues
- a list of targeted residues
IllegalArgumentException
- exception thrown whenever a letter is
not recognized as amino acidMethod Detail |
---|
public void swapRows(int fromRow, int toRow) throws IllegalArgumentException
fromRow
- toRow
-
IllegalArgumentException
public Integer getTarget()
public void setTarget(Integer target)
target
- the index of the amino acid of interest in the pattern.public ArrayList<AminoAcid> getAminoAcidsAtTarget()
public void setTargeted(int index, ArrayList<AminoAcid> targets)
index
- the index in the patterntargets
- the amino acids targetedpublic ArrayList<AminoAcid> getTargetedAA(int index)
index
- the index in the pattern
public ArrayList<AminoAcid> getExcludedAA(int index)
index
- the index in the pattern
public void setExcluded(int index, 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 Pattern getAsStringPattern()
public ArrayList<Integer> getIndexes(String input)
input
- the amino acid input sequence as string
public boolean matches(String aminoAcidSequence)
aminoAcidSequence
- the amino-acid sequence
public boolean isStarting(String aminoAcidSequence)
aminoAcidSequence
- the amino acid sequence
public boolean isEnding(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 String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |