JAL-2629 add documentation to previous work
[jalview.git] / src / jalview / hmmer / HMMBuildThread.java
index a9ca8ce..e910b1f 100644 (file)
@@ -66,6 +66,9 @@ public class HMMBuildThread implements Runnable
 
   }
 
+  /**
+   * Builds a HMM from an alignment, then imports and adds it to the alignment.
+   */
   @Override
   public void run()
   {
@@ -182,7 +185,13 @@ public class HMMBuildThread implements Runnable
 
   
 
-  
+  /**
+   * Executes the hmmbuild command in the command line.
+   * 
+   * @return
+   * @throws IOException
+   * @throws InterruptedException
+   */
   private boolean runCommand() throws IOException, InterruptedException
   {
     File file = new File(cmds.HMMERFOLDER + "/hmmbuild");
@@ -206,7 +215,7 @@ public class HMMBuildThread implements Runnable
       String name = null;
       if (af != null)
       {
-        name = af.getName();
+        name = af.getTitle();
       }
       if (name == null)
       {
@@ -229,6 +238,12 @@ public class HMMBuildThread implements Runnable
     return cmds.runCommand(command);
   }
   
+  /**
+   * Imports the .hmm file produced by hmmbuild.
+   * 
+   * @throws IOException
+   * @throws InterruptedException
+   */
   private void importData() throws IOException, InterruptedException
   {
     if (af != null)
@@ -250,6 +265,9 @@ public class HMMBuildThread implements Runnable
     stoTemp.delete();
   }
   
+  /**
+   * Runs hmmbuild, and waits for the results to be imported before continuing
+   */
   public void hmmbuildWaitTillComplete()
   {
     Thread loader = new Thread(this);