git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c4f4962
)
JAL-845 bug fixes correcting linked editing
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 4 Mar 2015 13:37:13 +0000
(13:37 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 4 Mar 2015 13:37:13 +0000
(13:37 +0000)
src/jalview/datamodel/Alignment.java
patch
|
blob
|
history
src/jalview/gui/AlignFrame.java
patch
|
blob
|
history
src/jalview/gui/AlignViewport.java
patch
|
blob
|
history
src/jalview/util/MappingUtils.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/Alignment.java
b/src/jalview/datamodel/Alignment.java
index
4558d8d
..
19819a6
100755
(executable)
--- a/
src/jalview/datamodel/Alignment.java
+++ b/
src/jalview/datamodel/Alignment.java
@@
-376,14
+376,14
@@
public class Alignment implements AlignmentI
for (int i = 0; i < gSize; i++)
{
SequenceGroup sg = groups.get(i);
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;
}
{
this.deleteGroup(sg);
gSize--;
continue;
}
- if (sg.getSequences(null).contains(s))
+ if (sg.getSequences().contains(s))
{
temp.add(sg);
}
{
temp.add(sg);
}
diff --git
a/src/jalview/gui/AlignFrame.java
b/src/jalview/gui/AlignFrame.java
index
9604458
..
e7a4735
100644
(file)
--- a/
src/jalview/gui/AlignFrame.java
+++ b/
src/jalview/gui/AlignFrame.java
@@
-4904,10
+4904,8
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
"label.translation_of_params", new Object[]
{ this.getTitle() });
af.setTitle(newTitle);
"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);
}
}
// Desktop.addInternalFrame(af, newTitle, DEFAULT_WIDTH, DEFAULT_HEIGHT);
}
}
diff --git
a/src/jalview/gui/AlignViewport.java
b/src/jalview/gui/AlignViewport.java
index
93d8c19
..
430f373
100644
(file)
--- a/
src/jalview/gui/AlignViewport.java
+++ b/
src/jalview/gui/AlignViewport.java
@@
-1069,8
+1069,8
@@
public class AlignViewport extends AlignmentViewport implements
if (openSplitPane)
{
if (openSplitPane)
{
- protein = openSplitFrame(newAlignFrame,
- thisAlignment.getSequencesArray(), protein.getCodonFrames());
+ protein = openSplitFrame(newAlignFrame, thisAlignment,
+ protein.getCodonFrames());
}
/*
}
/*
@@
-1090,20
+1090,18
@@
public class AlignViewport extends AlignmentViewport implements
*
* @param newAlignFrame
* containing a new alignment to be shown
*
* @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,
* @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.
*/
/*
* 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());
AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
copyMe.setTitle(getAlignPanel().alignFrame.getTitle());
diff --git
a/src/jalview/util/MappingUtils.java
b/src/jalview/util/MappingUtils.java
index
9880ae7
..
eebc539
100644
(file)
--- a/
src/jalview/util/MappingUtils.java
+++ b/
src/jalview/util/MappingUtils.java
@@
-92,8
+92,7
@@
public final class MappingUtils
SequenceI ds = seq.getDatasetSequence();
if (ds != null)
{
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);
}
copy.setDatasetSequence(ds);
targetCopies.put(ds, copy);
}