From 55289e9b607630e60ea2bfc9af09ef71c8992e7d Mon Sep 17 00:00:00 2001 From: cmzmasek Date: Thu, 3 Apr 2014 19:14:01 +0000 Subject: [PATCH] in progress --- .../org/forester/application/msa_compactor.java | 26 +++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/forester/java/src/org/forester/application/msa_compactor.java b/forester/java/src/org/forester/application/msa_compactor.java index bf04e12..57d2a4d 100644 --- a/forester/java/src/org/forester/application/msa_compactor.java +++ b/forester/java/src/org/forester/application/msa_compactor.java @@ -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 + "=\" 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 + "=\" option" ); + } + else { + ForesterUtil.fatalError( PRG_NAME, "no MAFFT executable at \"" + path_to_mafft + "\"" ); + } + } + } + private static void printHelp() { ForesterUtil.printProgramInformation( PRG_NAME, PRG_DESC, -- 1.7.10.2