for (int i = 0; i < gSize; i++)
{
SequenceGroup sg = groups.get(i);
- if (sg == null || sg.getSequences(null) == null)
+ if (sg == null || sg.getSequences() == null)
{
this.deleteGroup(sg);
gSize--;
continue;
}
- if (sg.getSequences(null).contains(s))
+ if (sg.getSequences().contains(s))
{
temp.add(sg);
}
"label.translation_of_params", new Object[]
{ this.getTitle() });
af.setTitle(newTitle);
- final SequenceI[] seqs = viewport.getSelectionGroup() == null ? viewport
- .getAlignment().getSequencesArray() : viewport
- .getSelectionAsNewSequence();
- viewport.openSplitFrame(af, seqs, al.getCodonFrames());
+ final SequenceI[] seqs = viewport.getSelectionAsNewSequence();
+ viewport.openSplitFrame(af, new Alignment(seqs), al.getCodonFrames());
// Desktop.addInternalFrame(af, newTitle, DEFAULT_WIDTH, DEFAULT_HEIGHT);
}
}
if (openSplitPane)
{
- protein = openSplitFrame(newAlignFrame,
- thisAlignment.getSequencesArray(), protein.getCodonFrames());
+ protein = openSplitFrame(newAlignFrame, thisAlignment,
+ protein.getCodonFrames());
}
/*
*
* @param newAlignFrame
* containing a new alignment to be shown
- * @param seqs
- * 'complementary' sequences to show in the other split half
+ * @param complement
+ * cdna/protein complement alignment to show in the other split half
* @param mappings
* @return the protein alignment in the split frame
*/
protected AlignmentI openSplitFrame(AlignFrame newAlignFrame,
- SequenceI[] seqs, Set<AlignedCodonFrame> mappings)
+ AlignmentI complement, Set<AlignedCodonFrame> mappings)
{
- AlignmentI complementAlignment = new Alignment(seqs);
- // TODO: move this to a factory/controller method ?
/*
* Open in split pane. DNA sequence above, protein below.
*/
- AlignFrame copyMe = new AlignFrame(complementAlignment,
+ AlignFrame copyMe = new AlignFrame(complement,
AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
copyMe.setTitle(getAlignPanel().alignFrame.getTitle());
SequenceI ds = seq.getDatasetSequence();
if (ds != null)
{
- final SequenceI copy = new Sequence("", new String(
- seq.getSequence()));
+ final SequenceI copy = new Sequence(seq);
copy.setDatasetSequence(ds);
targetCopies.put(ds, copy);
}