JAL-2103 always remove gaps from input sequence, then add in hidden regions if recove...
authorJim Procter <jprocter@issues.jalview.org>
Fri, 13 May 2016 15:06:06 +0000 (16:06 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 13 May 2016 15:06:06 +0000 (16:06 +0100)
src/jalview/ws/jws1/JPredWSUtils.java

index 2d562e9..afdd21f 100644 (file)
@@ -168,18 +168,23 @@ public class JPredWSUtils
                   MessageManager
                           .getString("error.implementation_error_invalid_msa_index_for_job"));
         }
+        // //
+        // Uses RemoveGapsCommand
+        // //
+        new jalview.commands.RemoveGapsCommand(
+                MessageManager.getString("label.remove_gaps"),
+                new SequenceI[] { sqs[msaIndex] }, currentView);
         if (fullAlignment == null)
         {
-          // //
-          // Uses RemoveGapsCommand
-          // //
-          new jalview.commands.RemoveGapsCommand(
-                  MessageManager.getString("label.remove_gaps"),
-                  new SequenceI[] { sqs[msaIndex] }, currentView);
-
+          // just replace trimmed sequence in prediction profile with full
+          // length sequence
           SequenceI profileseq = al.getSequenceAt(FirstSeq);
           profileseq.setSequence(sqs[msaIndex].getSequenceAsString());
         }
+        else
+        {
+          insertHiddenResidues(al, '.', predMap, sqs[msaIndex]);
+        }
       }
 
       if (!jalview.analysis.SeqsetUtils.SeqCharacterUnhash(