de.unibi.techfak.jpredictor.motifs
Class SequenceMotif
java.lang.Object
de.unibi.techfak.jpredictor.motifs.MotifSearchAdapter
de.unibi.techfak.jpredictor.motifs.Motif
de.unibi.techfak.jpredictor.motifs.RegularExpressionMotif
de.unibi.techfak.jpredictor.motifs.SequenceMotif
- All Implemented Interfaces:
- MotifSearcher, MotifSearchWithError, SequenceWindowScorer, Markable, java.lang.Cloneable, java.lang.Comparable
public class SequenceMotif
- extends RegularExpressionMotif
Specialization of a RegularExpressionMotif. Contains a
single sequence as motif, that is given as a string,
e.g. "CCAT". No degenerated code is allowed to be used.
|
Constructor Summary |
SequenceMotif()
Inits all values and strings with null. |
SequenceMotif(java.lang.String name,
java.lang.String description,
java.lang.String motif,
int errorNumberAllowedForMatch)
Sets all the motif's characteristics. |
|
Method Summary |
java.lang.Object |
clone()
Clones the motif by creating the same motif again and copying all
importent fields. |
Motif |
createReversedComplement()
Creates the reversed complementary motif. |
java.lang.String |
getConsensusSequence()
Calculates the consensus sequence from the motif, replaces the
degenerated letter-representations of DNA with the base letters
in the order A,C,G,T. |
protected boolean |
match(char sequ,
char reg)
Matches two chars. |
void |
setMotif(java.lang.String motif)
Sets the motif from a given String. |
| Methods inherited from class de.unibi.techfak.jpredictor.motifs.RegularExpressionMotif |
compareTo, createConsensusFromMotifBlock, getErrorNumberAllowedForMatch, getRegularExpression, getRegularExpressionChar, length, matchComplement, print, readMotifBlockFromFile, search, setErrorNumberAllowedForMatch |
| Methods inherited from class de.unibi.techfak.jpredictor.motifs.Motif |
clearMark, clearMark, equals, getDescription, getMark, getName, getWeight, isMarked, isMarked, print, scoreSequenceWindow, setDescription, setMark, setName, setWeight, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SequenceMotif
public SequenceMotif()
- Inits all values and strings with null.
SequenceMotif
public SequenceMotif(java.lang.String name,
java.lang.String description,
java.lang.String motif,
int errorNumberAllowedForMatch)
- Sets all the motif's characteristics. The motif is marked not usable
(this mark has nothing to do with being incomplete or so but tells
the program to not use this motif for operations until otherwise
stated).
- Parameters:
name - The name of the motif.description - A short description of the motif.motif - The motif itself as a short sequence.errorNumberAllowedForMatch - The number of mismatch errors
allowed for a perfect match.
setMotif
public void setMotif(java.lang.String motif)
- Sets the motif from a given String. The motif is filtered
to represent only valid DNA- or RNA-sequences, respectivly.
- Overrides:
setMotif in class RegularExpressionMotif
- Parameters:
motif - The motifs representation as RNA,DNA-String.- See Also:
MotifFilter.DNA_RNA_FILTER
getConsensusSequence
public java.lang.String getConsensusSequence()
- Description copied from class:
RegularExpressionMotif
- Calculates the consensus sequence from the motif, replaces the
degenerated letter-representations of DNA with the base letters
in the order A,C,G,T. So a Y is always replaced with a C, and
an N always with an A.
- Overrides:
getConsensusSequence in class RegularExpressionMotif
- Returns:
- the motif as it is.
- See Also:
Motif.getConsensusSequence()
match
protected boolean match(char sequ,
char reg)
- Matches two chars.
- Overrides:
match in class RegularExpressionMotif
- Parameters:
sequ - The char from the sequence.reg - The char from the motif.
- Returns:
true iff the chars are equal, false
otherwise
createReversedComplement
public Motif createReversedComplement()
- Description copied from class:
Motif
- Creates the reversed complementary motif.
- Overrides:
createReversedComplement in class RegularExpressionMotif
- Returns:
- The reversed and complemented motif.
clone
public java.lang.Object clone()
- Description copied from class:
Motif
Clones the motif by creating the same motif again and copying all
importent fields. The result is at least of class Motif.
When cloning a MultiMotif the referred single motifs
are not cloned.
The fields that are copied are: Name, Description, the Motif itself,
errorNumberAllowedForMatch or Threshold, respectively, Weight and
searchMode (altogether 6 fields by now). What is not copied are the
fields of the MotifSearchAdapter.
Note, that any matrices are not cloned. Thus, if cloning a
PSPMotif or a PSSMotif the cloned motif does
contain a reference to the matrix of the old motif. This was done
to preserve memory.
- Overrides:
clone in class RegularExpressionMotif
- Returns:
- The Motif itself as a doubled copy.
- See Also:
Object.clone()