git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TreeBuilder now stores the used ScoreModel and ScoreParams
[jalview.git]
/
src
/
jalview
/
analysis
/
TreeBuilder.java
diff --git
a/src/jalview/analysis/TreeBuilder.java
b/src/jalview/analysis/TreeBuilder.java
index
728dd62
..
31fc4b5
100644
(file)
--- a/
src/jalview/analysis/TreeBuilder.java
+++ b/
src/jalview/analysis/TreeBuilder.java
@@
-67,12
+67,16
@@
public abstract class TreeBuilder
double maxDistValue;
double maxDistValue;
- double maxheight;
+ double maxHeight;
int ycount;
Vector<SequenceNode> node;
int ycount;
Vector<SequenceNode> node;
+ protected ScoreModelI scoreModel;
+
+ protected SimilarityParamsI scoreParams;
+
private AlignmentView seqStrings; // redundant? (see seqData)
/**
private AlignmentView seqStrings; // redundant? (see seqData)
/**
@@
-125,20
+129,20
@@
public abstract class TreeBuilder
{
if (nd == null)
{
{
if (nd == null)
{
- return maxheight;
+ return maxHeight;
}
if ((nd.left() == null) && (nd.right() == null))
{
nd.height = ((SequenceNode) nd.parent()).height + nd.dist;
}
if ((nd.left() == null) && (nd.right() == null))
{
nd.height = ((SequenceNode) nd.parent()).height + nd.dist;
- if (nd.height > maxheight)
+ if (nd.height > maxHeight)
{
return nd.height;
}
else
{
{
return nd.height;
}
else
{
- return maxheight;
+ return maxHeight;
}
}
else
}
}
else
@@
-149,15
+153,15
@@
public abstract class TreeBuilder
}
else
{
}
else
{
- maxheight = 0;
+ maxHeight = 0;
nd.height = (float) 0.0;
}
nd.height = (float) 0.0;
}
- maxheight = findHeight((SequenceNode) (nd.left()));
- maxheight = findHeight((SequenceNode) (nd.right()));
+ maxHeight = findHeight((SequenceNode) (nd.left()));
+ maxHeight = findHeight((SequenceNode) (nd.right()));
}
}
- return maxheight;
+ return maxHeight;
}
/**
}
/**
@@
-295,7
+299,11
@@
public abstract class TreeBuilder
*/
protected void computeTree(ScoreModelI sm, SimilarityParamsI scoreOptions)
{
*/
protected void computeTree(ScoreModelI sm, SimilarityParamsI scoreOptions)
{
- distances = sm.findDistances(seqData, scoreOptions);
+
+ this.scoreModel = sm;
+ this.scoreParams = scoreOptions;
+
+ distances = scoreModel.findDistances(seqData, scoreParams);
makeLeaves();
makeLeaves();
@@
-479,4
+487,14
@@
public abstract class TreeBuilder
return seqStrings;
}
return seqStrings;
}
+ public MatrixI getDistances()
+ {
+ return distances;
+ }
+
+ public AlignmentView getSeqData()
+ {
+ return seqData;
+ }
+
}
}