public class ConsensusSequence extends java.lang.Object implements CREModel
Modifier and Type | Field and Description |
---|---|
private Motif |
m |
private static Motif.ScoreData |
scoreData_0_0 |
private static Motif.ScoreData |
scoreData_1_0
Returns 1.0 if
generatesString(s) is true, and returns 0 otherwise. |
DEFAULT_RC
Constructor and Description |
---|
ConsensusSequence(Motif m)
Creates a consensus sequence from the given sequence with the reverse complement flag set to m's reverse compliment.
|
ConsensusSequence(java.lang.String seq)
Creates a consensus sequence from the given sequence with the reverse complement flag set to
CREModel.DEFAULT_RC . |
ConsensusSequence(java.lang.String seq,
boolean rc)
Creates a consensus sequence from the given sequence with the given reverse complemnt flag.
|
Modifier and Type | Method and Description |
---|---|
MotifList |
expandAsMotifList()
Returns a MotifList containing the unambiguous Motifs that this consensu sequence represents.
|
java.lang.String[] |
expandAsStrings()
Returns an array of the strings of primary bases that this consensus sequence represents.
|
boolean |
generatesString(java.lang.String s)
Returns true if this string is generated by this model.
|
java.util.Comparator<Motif> |
getComparator()
Comparator sorts arrays from greatest to least by the
scoreString(String) method. |
MotifList |
getHits(java.lang.String seq)
Returns a MotifList of all Motifs in seq that match this model.
|
java.lang.String |
getName()
Return a name that will be uniq to this type of model.
|
java.lang.String |
getSequence()
Returns the sequence.
|
CREModel |
newInstanceOf(MotifList ml)
Creates a new ConsensusSequence as the union of all the motifs in ml, as specified by
MotifList.uniteMotifs() . |
Motif.ScoreData |
scoreString(java.lang.String s)
Returns the score that a given model would give to a sequence.
|
void |
setStringency(double d)
Does nothing.
|
java.lang.String |
toString()
Returns a string of the sequence and rc flag.
|
boolean |
useRevComp() |
private final Motif m
private static final Motif.ScoreData scoreData_1_0
generatesString(s)
is true, and returns 0 otherwise.private static final Motif.ScoreData scoreData_0_0
public ConsensusSequence(Motif m)
public ConsensusSequence(java.lang.String seq)
CREModel.DEFAULT_RC
.public ConsensusSequence(java.lang.String seq, boolean rc)
public MotifList expandAsMotifList()
expandAsMotifList
in interface CREModel
public java.lang.String[] expandAsStrings()
expandAsStrings
in interface CREModel
public boolean generatesString(java.lang.String s)
generatesString
in interface CREModel
public java.util.Comparator<Motif> getComparator()
scoreString(String)
method.getComparator
in interface CREModel
public MotifList getHits(java.lang.String seq)
public java.lang.String getName()
CREModel
public java.lang.String getSequence()
public CREModel newInstanceOf(MotifList ml)
MotifList.uniteMotifs()
.newInstanceOf
in interface CREModel
public Motif.ScoreData scoreString(java.lang.String s)
CREModel
scoreString
in interface CREModel
public void setStringency(double d)
setStringency
in interface CREModel
public java.lang.String toString()
public boolean useRevComp()