JAL-2629 fix expected length error for hmmbuild by uniquifying sequences
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Mon, 14 Aug 2017 14:13:06 +0000 (15:13 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Mon, 14 Aug 2017 14:13:06 +0000 (15:13 +0100)
src/jalview/hmmer/HMMBuildThread.java

index d1039f9..48796e4 100644 (file)
@@ -73,14 +73,13 @@ public class HMMBuildThread implements Runnable
     {
     try
     {
+        SequenceI[] array;
         List<SequenceI> seqs = alignment
                 .getHMMConsensusSequences(true);
         cmds.setHmmSeqs(seqs);
         if (group != null)
         {
-          SequenceI[] array = group.getSelectionAsNewSequences(alignment);
-
-          cmds.exportData(array, stoTemp, null, null);
+          array = group.getSelectionAsNewSequences(alignment);
         }
         else
         {
@@ -88,9 +87,12 @@ public class HMMBuildThread implements Runnable
           {
             alignment.padGaps();
           }
-          cmds.exportData(alignment.getSequencesArray(), stoTemp, null,
-                  null);
+          array = alignment.getSequencesArray();
         }
+        cmds.uniquifySequences(array);
+        cmds.exportData(array, stoTemp, null, null);
+        jalview.analysis.SeqsetUtils.deuniquify(cmds.hash, array);
+
     } catch (FileNotFoundException e)
     {
       // TODO Auto-generated catch block