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 (from parent 1:
c14d9e8
)
JAL-2110 cross-refs from protein to show cds not non-coding sequences
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 6 Jul 2016 11:42:11 +0000
(12:42 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 6 Jul 2016 11:42:11 +0000
(12:42 +0100)
src/jalview/gui/AlignFrame.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/AlignFrame.java
b/src/jalview/gui/AlignFrame.java
index
19b5b8c
..
88b0c35
100644
(file)
--- a/
src/jalview/gui/AlignFrame.java
+++ b/
src/jalview/gui/AlignFrame.java
@@
-4734,6
+4734,15
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
AlignmentI xrefsAlignment = makeCrossReferencesAlignment(dataset,
xrefs);
AlignmentI xrefsAlignment = makeCrossReferencesAlignment(dataset,
xrefs);
+ final SequenceI[] sequenceSelection = AlignFrame.this.viewport
+ .getSequenceSelection();
+ if (!dna)
+ {
+ xrefsAlignment = AlignmentUtils.makeCdsAlignment(
+ xrefsAlignment.getSequencesArray(), dataset,
+ sequenceSelection);
+ xrefsAlignment.alignAs(alignment);
+ }
AlignFrame newFrame = new AlignFrame(xrefsAlignment, DEFAULT_WIDTH,
DEFAULT_HEIGHT);
AlignFrame newFrame = new AlignFrame(xrefsAlignment, DEFAULT_WIDTH,
DEFAULT_HEIGHT);
@@
-4761,13
+4770,12
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
* sequences). If we are DNA, drop introns and update mappings
*/
AlignmentI copyAlignment = null;
* sequences). If we are DNA, drop introns and update mappings
*/
AlignmentI copyAlignment = null;
- final SequenceI[] sequenceSelection = AlignFrame.this.viewport
- .getSequenceSelection();
boolean copyAlignmentIsAligned = false;
if (dna)
{
copyAlignment = AlignmentUtils.makeCdsAlignment(
boolean copyAlignmentIsAligned = false;
if (dna)
{
copyAlignment = AlignmentUtils.makeCdsAlignment(
- sequenceSelection, dataset, xrefsAlignment);
+ sequenceSelection, dataset,
+ xrefsAlignment.getSequencesArray());
if (copyAlignment.getHeight() == 0)
{
System.err.println("Failed to make CDS alignment");
if (copyAlignment.getHeight() == 0)
{
System.err.println("Failed to make CDS alignment");
@@
-4821,7
+4829,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
* align cdna to protein - currently only if
* fetching and aligning Ensembl transcripts!
*/
* align cdna to protein - currently only if
* fetching and aligning Ensembl transcripts!
*/
- if (DBRefSource.ENSEMBL.equalsIgnoreCase(source))
+ if (dna && DBRefSource.ENSEMBL.equalsIgnoreCase(source))
{
copyAlignment.alignAs(xrefsAlignment);
}
{
copyAlignment.alignAs(xrefsAlignment);
}