From 8c240f48e7e8c991aef02203f1b05b86ab963178 Mon Sep 17 00:00:00 2001 From: Charles Ofoegbu Date: Wed, 26 Nov 2014 16:57:23 +0000 Subject: [PATCH] JAL-207 pairwise alignment sequence contexts propergation bugfix --- src/jalview/appletgui/PairwiseAlignPanel.java | 29 +++++++++++++------------ src/jalview/gui/PairwiseAlignPanel.java | 9 ++------ 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/jalview/appletgui/PairwiseAlignPanel.java b/src/jalview/appletgui/PairwiseAlignPanel.java index 9afc70b..5a3b56c 100644 --- a/src/jalview/appletgui/PairwiseAlignPanel.java +++ b/src/jalview/appletgui/PairwiseAlignPanel.java @@ -20,15 +20,21 @@ */ package jalview.appletgui; -import java.util.*; - -import java.awt.*; -import java.awt.event.*; - -import jalview.analysis.*; -import jalview.datamodel.*; +import jalview.analysis.AlignSeq; +import jalview.datamodel.Alignment; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceI; import jalview.util.MessageManager; +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Panel; +import java.awt.ScrollPane; +import java.awt.TextArea; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Vector; + public class PairwiseAlignPanel extends Panel implements ActionListener { Vector sequences = new Vector(); @@ -89,13 +95,8 @@ public class PairwiseAlignPanel extends Panel implements ActionListener totscore = totscore + scores[i][j]; textarea.append(as.getOutput()); - seq = new Sequence(as.getS1().getName(), as.getAStr1(), as.getS1() - .getStart(), as.getS1().getEnd()); - sequences.addElement(seq); - - seq = new Sequence(as.getS2().getName(), as.getAStr2(), as.getS2() - .getStart(), as.getS2().getEnd()); - sequences.addElement(seq); + sequences.add(as.getAlignedSeq1()); + sequences.add(as.getAlignedSeq1()); } } diff --git a/src/jalview/gui/PairwiseAlignPanel.java b/src/jalview/gui/PairwiseAlignPanel.java index 82f0120..69b6ba6 100755 --- a/src/jalview/gui/PairwiseAlignPanel.java +++ b/src/jalview/gui/PairwiseAlignPanel.java @@ -99,13 +99,8 @@ public class PairwiseAlignPanel extends GPairwiseAlignPanel totscore = totscore + scores[i][j]; textarea.append(as.getOutput()); - seq = new Sequence(as.getAlignedSeq1().getName(), as.getAStr1(), as - .getAlignedSeq1().getStart(), as.getAlignedSeq1().getEnd()); - sequences.add(seq); - - seq = new Sequence(as.getAlignedSeq2().getName(), as.getAStr2(), as - .getAlignedSeq2().getStart(), as.getAlignedSeq2().getEnd()); - sequences.add(seq); + sequences.add(as.getAlignedSeq1()); + sequences.add(as.getAlignedSeq1()); } } -- 1.7.10.2