JAL-2629 fix issue where HMM sequences would be too long
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Sun, 13 Aug 2017 10:58:35 +0000 (11:58 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Sun, 13 Aug 2017 10:58:35 +0000 (11:58 +0100)
src/jalview/io/FileLoader.java

index 57fe83e..4f3d026 100755 (executable)
@@ -403,7 +403,8 @@ public class FileLoader implements Runnable
               if (sg != null)
               {
                 seq.insertCharAt(0, sg.getStartRes(), '-');
-                seq.insertCharAt(sg.getEndRes(), alignment.getWidth(), '-');
+                seq.insertCharAt(sg.getEndRes(),
+                        alignment.getWidth() - sg.getEndRes(), '-');
                 SequenceI topSeq = sg.getSequencesInOrder(alignment)[0];
                 int topIndex = alignment.findIndex(topSeq);
                 alignment.getSequences().add(topIndex, seq);