Modifier and Type | Field and Description |
---|---|
private java.lang.String |
method |
(package private) static java.text.NumberFormat |
NUMBER_FORMAT |
private java.util.TreeSet<Range> |
ranges |
private java.util.ArrayList<java.lang.Float> |
scores |
Modifier | Constructor and Description |
---|---|
private |
Score() |
|
Score(java.lang.Enum<?> method,
java.util.ArrayList<java.lang.Float> scores)
Instantiate the Score
|
|
Score(java.lang.Enum<?> method,
java.util.ArrayList<java.lang.Float> scores,
java.util.TreeSet<Range> ranges) |
|
Score(java.lang.Enum<?> method,
float[] scores) |
|
Score(java.lang.Enum<?> method,
java.util.TreeSet<Range> ranges) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Score o) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getMethod()
Returns the ConservationMethod
|
java.util.TreeSet<Range> |
getRanges()
Return Ranges if any Collections.EMPTY_SET otherwise
|
java.util.ArrayList<java.lang.Float> |
getScores()
The column scores for the alignment
|
int |
hashCode() |
void |
setRanges(java.util.TreeSet<Range> ranges) |
private java.util.ArrayList<java.lang.Float> |
toList(float[] values) |
java.lang.String |
toString() |
static void |
write(java.util.TreeSet<Score> scores,
java.io.Writer writer)
Outputs the List of Score objects into the Output stream.
|
static final java.text.NumberFormat NUMBER_FORMAT
private final java.lang.String method
private java.util.TreeSet<Range> ranges
private java.util.ArrayList<java.lang.Float> scores
private Score()
public Score(java.lang.Enum<?> method, java.util.ArrayList<java.lang.Float> scores)
method
- the ConservationMethod with which scores
were
calculatedscores
- the actual conservation values for each column of the
alignmentpublic Score(java.lang.Enum<?> method, java.util.ArrayList<java.lang.Float> scores, java.util.TreeSet<Range> ranges)
method
- the ConservationMethod with which scores
were
calculatedscores
- the actual conservation values for each column of the
alignmentranges
- The set of ranges i.e. parts of the sequence with specific
function, usually can be calculated based on scorespublic Score(java.lang.Enum<?> method, java.util.TreeSet<Range> ranges)
public Score(java.lang.Enum<?> method, float[] scores)
private java.util.ArrayList<java.lang.Float> toList(float[] values)
public java.lang.String getMethod()
public java.util.ArrayList<java.lang.Float> getScores()
public java.util.TreeSet<Range> getRanges()
public void setRanges(java.util.TreeSet<Range> ranges)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static void write(java.util.TreeSet<Score> scores, java.io.Writer writer) throws java.io.IOException
#MethodName [comma separated list of ranges] <space separated list of values>
For example:
#KABAT 0.2 0.3 0.2 0 0.645 0.333 1 1 0 0
#SMERFS 0.645 0.333 1 1 0 0 0.2 0.3 0.2 0
#COILS 22-33, 44-56 0.121 3.212
The maximum precision for values is 3 digits, but can be less.scores
- the list of scores to outputwriter
- java.io.IOException
- if the OutputStream cannot be written intojava.lang.NullPointerException
- if the output stream is null