double maxDistValue;
- double maxheight;
+ double maxHeight;
int ycount;
Vector<SequenceNode> node;
- private AlignmentView seqStrings;
+ protected ScoreModelI scoreModel;
+
+ protected SimilarityParamsI scoreParams;
+
+ private AlignmentViewport avport;
+
+ private AlignmentView seqStrings; // redundant? (see seqData)
/**
* Constructor
SimilarityParamsI scoreParameters)
{
int start, end;
+ avport = av;
boolean selview = av.getSelectionGroup() != null
&& av.getSelectionGroup().getSize() > 1;
seqStrings = av.getAlignmentView(selview);
{
if (nd == null)
{
- return maxheight;
+ return maxHeight;
}
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 maxheight;
+ return maxHeight;
}
}
else
}
else
{
- maxheight = 0;
+ maxHeight = 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;
}
/**
*/
protected void computeTree(ScoreModelI sm, SimilarityParamsI scoreOptions)
{
- distances = sm.findDistances(seqData, scoreOptions);
+
+ this.scoreModel = sm;
+ this.scoreParams = scoreOptions;
+
+ distances = scoreModel.findDistances(seqData, scoreParams);
makeLeaves();
protected void init(AlignmentView seqView, int start, int end)
{
- this.node = new Vector<SequenceNode>();
+ this.node = new Vector<>();
if (seqView != null)
{
this.seqData = seqView;
*/
void makeLeaves()
{
- clusters = new Vector<BitSet>();
+ clusters = new Vector<>();
for (int i = 0; i < noseqs; i++)
{
sn.setElement(sequences[i]);
sn.setName(sequences[i].getName());
node.addElement(sn);
+
BitSet bs = new BitSet();
bs.set(i);
clusters.addElement(bs);
return seqStrings;
}
+ public MatrixI getDistances()
+ {
+ return distances;
+ }
+
+ public ScoreModelI getScoreModel()
+ {
+ return scoreModel;
+ }
+
+ public SimilarityParamsI getScoreParams()
+ {
+ return scoreParams;
+ }
+
+ public AlignmentViewport getAvport()
+ {
+ return avport;
+ }
+
}