in progress
authorcmzmasek <cmzmasek@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 3 Apr 2014 19:14:01 +0000 (19:14 +0000)
committercmzmasek <cmzmasek@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 3 Apr 2014 19:14:01 +0000 (19:14 +0000)
forester/java/src/org/forester/application/msa_compactor.java

index bf04e12..57d2a4d 100644 (file)
@@ -107,17 +107,7 @@ public class msa_compactor {
                 if ( ForesterUtil.isEmpty( path_to_mafft ) ) {
                     path_to_mafft = MsaCompactor.guessPathToMafft();
                 }
-                if ( !ForesterUtil.isEmpty( path_to_mafft ) && MsaInferrer.isInstalled( path_to_mafft ) ) {
-                    ForesterUtil.programMessage( PRG_NAME, "using MAFFT at \"" + path_to_mafft + "\""  );
-                }
-                else {
-                    if ( ForesterUtil.isEmpty( path_to_mafft ) ) {
-                        ForesterUtil.fatalError( PRG_NAME, "no MAFFT executable found, use -\"" + PATH_TO_MAFFT_OPTION + "=<path to MAFFT>\" option" );
-                    }
-                    else {
-                        ForesterUtil.fatalError( PRG_NAME, "no MAFFT executable at \""  + path_to_mafft + "\""  );
-                    }
-                }
+                checkPathToMafft( path_to_mafft );
             }
             
             MsaCompactor mc = null;
@@ -142,6 +132,20 @@ public class msa_compactor {
         }
     }
 
+    private static void checkPathToMafft( String path_to_mafft ) {
+        if ( !ForesterUtil.isEmpty( path_to_mafft ) && MsaInferrer.isInstalled( path_to_mafft ) ) {
+            ForesterUtil.programMessage( PRG_NAME, "using MAFFT at \"" + path_to_mafft + "\""  );
+        }
+        else {
+            if ( ForesterUtil.isEmpty( path_to_mafft ) ) {
+                ForesterUtil.fatalError( PRG_NAME, "no MAFFT executable found, use -\"" + PATH_TO_MAFFT_OPTION + "=<path to MAFFT>\" option" );
+            }
+            else {
+                ForesterUtil.fatalError( PRG_NAME, "no MAFFT executable at \""  + path_to_mafft + "\""  );
+            }
+        }
+    }
+
     private static void printHelp() {
         ForesterUtil.printProgramInformation( PRG_NAME,
                                               PRG_DESC,