JAL-2629 fix uniquified sequence names appearing when running hmmbuild
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Tue, 15 Aug 2017 09:55:35 +0000 (10:55 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Tue, 15 Aug 2017 09:55:35 +0000 (10:55 +0100)
src/jalview/hmmer/HMMBuildThread.java

index 48796e4..63236ea 100644 (file)
@@ -2,6 +2,7 @@ package jalview.hmmer;
 
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
@@ -89,8 +90,15 @@ public class HMMBuildThread implements Runnable
           }
           array = alignment.getSequencesArray();
         }
-        cmds.uniquifySequences(array);
-        cmds.exportData(array, stoTemp, null, null);
+        SequenceI[] newArr = new SequenceI[array.length];
+        int index = 0;
+        for (SequenceI seq : array)
+        {
+          newArr[index] = new Sequence(seq);
+          index++;
+        }
+        cmds.uniquifySequences(newArr);
+        cmds.exportData(newArr, stoTemp, null, null);
         jalview.analysis.SeqsetUtils.deuniquify(cmds.hash, array);
 
     } catch (FileNotFoundException e)