From: amwaterhouse Date: Tue, 1 May 2007 16:33:27 +0000 (+0000) Subject: Make sure annots are alignment width X-Git-Tag: Release_2_3~89 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=390461d621255f960721a8370ee8fb06ba20aec9;p=jalview.git Make sure annots are alignment width --- diff --git a/src/jalview/io/AMSAFile.java b/src/jalview/io/AMSAFile.java index 1f3fca0..e7e6d97 100644 --- a/src/jalview/io/AMSAFile.java +++ b/src/jalview/io/AMSAFile.java @@ -45,9 +45,12 @@ public class AMSAFile AlignmentAnnotation aa; if (al.getAlignmentAnnotation() != null) { + for (int i = 0; i < al.getAlignmentAnnotation().length; i++) { aa = al.getAlignmentAnnotation()[i]; + + if (aa.autoCalculated || !aa.visible) { continue; @@ -61,7 +64,8 @@ public class AMSAFile out.append("\n"); - int nochunks = (aa.annotations.length / len) + 1; + int nochunks = Math.min(aa.annotations.length, al.getWidth()) + / len + 1; for (int j = 0; j < nochunks; j++) {