getSequenceStrings() bug fixed.
authorjprocter <Jim Procter>
Tue, 22 Aug 2006 13:01:50 +0000 (13:01 +0000)
committerjprocter <Jim Procter>
Tue, 22 Aug 2006 13:01:50 +0000 (13:01 +0000)
src/jalview/datamodel/AlignmentView.java

index 7340d3b..22232b3 100644 (file)
@@ -89,7 +89,19 @@ public class AlignmentView
   {
     String[] seqs=new String[sequences.length];
     for (int n=0; n<sequences.length; n++) {
-      seqs[n] = sequences[n].getSequenceString(c);
+      String fullseq = sequences[n].getSequenceString(c);
+      if (contigs != null)
+      {
+        seqs[n] = "";
+        int p = 0;
+        for (int h = 0; h < contigs.length; h += 3)
+        {
+          seqs[n] += fullseq.substring(p, contigs[h + 1]);
+          p = contigs[h + 1] + contigs[h + 2];
+        }
+        seqs[n] += fullseq.substring(p);
+      } else
+        seqs[n] = fullseq;
     }
     return seqs;
   }