-
- tree = new NJTree(seqs, seqStrings, type, pwtype, start, end);
+ ScoreModelI sm = ResidueProperties.getScoreModel(pwtype);
+ if (sm instanceof ViewBasedAnalysisI)
+ {
+ try
+ {
+ sm = sm.getClass().newInstance();
+ ((ViewBasedAnalysisI) sm)
+ .configureFromAlignmentView(treeCanvas.ap);
+ } catch (Exception q)
+ {
+ System.err.println("Couldn't create a scoremodel instance for "
+ + sm.getName());
+ q.printStackTrace();
+ }
+ tree = new NJTree(seqs, seqStrings, type, pwtype, sm, start, end);
+ }
+ else
+ {
+ tree = new NJTree(seqs, seqStrings, type, pwtype, null, start,
+ end);
+ }