X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignment.java;h=95f578051e5b41c685feb674b683b077c3df8317;hb=85299bc2db43c8b108169661ebc1c4d9b2d3d2e5;hp=375e6b455e0a05a13b8f5673883bf626b969e2f1;hpb=b122ba188c2ffcbb302809bafc02058e355643ee;p=jalview.git diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 375e6b4..95f5780 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -1830,7 +1830,13 @@ public class Alignment implements AlignmentI, AutoCloseable { return AlignmentUtils.alignCdsAsProtein(this, al); } - return AlignmentUtils.alignAs(this, al); + else if (thatIsProtein && !thisIsNucleotide) + { + // honour sense we were called - align this according to al + return AlignmentUtils.alignAs(this, al); + } + // otherwise doing a DNA to DNA alignment - so use legacy obverse sense + return AlignmentUtils.alignAs(this,al); } /** @@ -2057,7 +2063,7 @@ public class Alignment implements AlignmentI, AutoCloseable if (cm == null && _aa.sequenceRef != null) { cm = _aa.sequenceRef.getContactMatrixFor(_aa); - if (cm == null && _aa.sequenceRef.getDatasetSequence()!=null) + if (cm == null && _aa.sequenceRef.getDatasetSequence() != null) { // TODO fix up this logic and unify with getContactListFor cm = _aa.sequenceRef.getDatasetSequence().getContactMatrixFor(_aa); @@ -2069,7 +2075,8 @@ public class Alignment implements AlignmentI, AutoCloseable @Override public ContactListI getContactListFor(AlignmentAnnotation _aa, int column) { - if (_aa.annotations==null || column>=_aa.annotations.length || column<0) + if (_aa.annotations == null || column >= _aa.annotations.length + || column < 0) { return null; }