Clean up logging system
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Tue, 17 Sep 2013 10:22:48 +0000 (11:22 +0100)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Tue, 17 Sep 2013 10:22:48 +0000 (11:22 +0100)
28 files changed:
datamodel/compbio/data/sequence/RNAStructReader.java
engine/compbio/engine/LoadBalancer.java
engine/compbio/engine/client/ConfExecutable.java
engine/compbio/engine/conf/RunnerConfigMarshaller.java
engine/compbio/engine/local/ExecutableWrapper.java
runner/compbio/runner/OptionCombinator.java
runner/compbio/runner/Util.java
runner/compbio/runner/conservation/AACon.java
runner/compbio/runner/disorder/Disembl.java
runner/compbio/runner/disorder/GlobPlot.java
runner/compbio/runner/disorder/IUPred.java
runner/compbio/runner/disorder/Jronn.java
runner/compbio/runner/msa/ClustalO.java
runner/compbio/runner/msa/ClustalW.java
runner/compbio/runner/msa/Mafft.java
runner/compbio/runner/msa/Muscle.java
runner/compbio/runner/msa/Probcons.java
runner/compbio/runner/msa/Tcoffee.java
runner/compbio/runner/structure/RNAalifold.java
webservices/compbio/stat/collector/DirCleaner.java
webservices/compbio/stat/collector/InputFilter.java
webservices/compbio/stat/servlet/DisplayStat.java
webservices/compbio/stat/servlet/HttpCodeResponseServiceStatus.java
webservices/compbio/stat/servlet/util/StatCollection.java
webservices/compbio/ws/client/AAConClient.java
webservices/compbio/ws/client/Jws2Client.java
webservices/compbio/ws/server/GAUtils.java
webservices/compbio/ws/server/WSUtil.java

index 4292554..4fd364a 100644 (file)
@@ -17,8 +17,6 @@ import org.apache.log4j.Logger;
 \r
 public class RNAStructReader {\r
 \r
-       private static Logger log = Logger.getLogger(RNAStructReader.class);\r
-       \r
        // Whitespace patterns\r
        static String s = "[+\\s=]+";\r
        static String bracket = "\\(|\\)|\\{|\\}|\\[|\\]";\r
@@ -124,15 +122,13 @@ public class RNAStructReader {
                                assert (sline != null \r
                                                && Pattern.matches(AlifoldLine.ensembleFreq.regex, sline)) :\r
                                                error + "Found 'freeEnergy' line on its own";\r
-                               structs.add("Free energy of ensemble (kcal/mol) followed by "\r
-                                               + "frequency of mfe structure in ensemble");\r
+                               structs.add("Free energy of ensemble (kcal/mol) followed by frequency of mfe structure in ensemble");\r
                                scores.add(Float.parseFloat(sc.findInLine(floatP)));\r
                                scores.add(Float.parseFloat(nsc.findInLine(floatP)));\r
                                data.add(newSetScore(AlifoldResult.ensembleValues, scores));\r
                                // jump line\r
                                sline = reader.readLine();\r
                        }\r
-                       \r
 \r
                        assert(!ftype.equals(AlifoldLine.ensembleFreq)) :\r
                                error + "Wasn't expecting 'frequency of mfe structure'!";\r
@@ -142,11 +138,7 @@ public class RNAStructReader {
                                error + "Wasn't expecting an alignment sequence!";\r
                        assert(!ftype.equals(AlifoldLine.OTHER)) :\r
                                error + "Wasn't expecting this whatever it is: " + fline;\r
-                       if (Pattern.matches("^\\s*$", fline)) {\r
-                               log.warn("While parsing alifold stdout: A line is either empty or"\r
-                                               + " contains only whitespace");\r
-                       }\r
-                       \r
+\r
                        fline = sline;\r
                }\r
                                \r
@@ -237,7 +229,7 @@ public class RNAStructReader {
                } else if (Pattern.matches(freqP, token)) {\r
                        return RNAOut.FREQ;\r
                }\r
-               \r
+\r
                return RNAOut.OTHER;\r
        }\r
        \r
@@ -277,7 +269,6 @@ public class RNAStructReader {
        public static enum AlifoldResult {\r
                mfeStructure, contactProbabilityStructure, MEAStucture, centroidStructure, stochBTStructure, consensusAlignment, ensembleValues, contactProbabilities\r
        }\r
-       \r
 \r
        // Print the full regex Strings for testing \r
        public static void main(String[] args) {\r
@@ -285,7 +276,5 @@ public class RNAStructReader {
                        System.out.println(l.toString() + ": " + l.regex.replace("^","").replace("$",""));\r
                }\r
        }\r
-       \r
 \r
-       \r
-}      \r
+}\r
index 6185d42..e73e283 100644 (file)
@@ -58,10 +58,8 @@ public class LoadBalancer {
                // If data set is deemed too big for local execution, than give a\r
                // cluster engine\r
                // If limit is not defined then defaults to executing on the cluster\r
-               Limit<V> limit = executable\r
-                               .getLimit(PresetManager.LOCAL_ENGINE_LIMIT_PRESET);\r
-               log.trace("Inspecting whether the job can be executed locally using limit: "\r
-                               + limit);\r
+               Limit<V> limit = executable.getLimit(PresetManager.LOCAL_ENGINE_LIMIT_PRESET);\r
+               log.trace("Inspecting whether the job can be executed locally using limit: " + limit);\r
                if (limit == null || limit.isExceeded(dataSet)) {\r
                        log.debug("Job EXCEEDS LOCAL execution LIMIT targeting for cluster execution! ");\r
                        return Executable.ExecProvider.Cluster;\r
index d5fbbe7..d8260c8 100644 (file)
@@ -67,8 +67,7 @@ public class ConfExecutable<T> implements ConfiguredExecutable<T> {
        // TODO think about appropriate exception here\r
        ConfExecutable(RunConfiguration rconf) {\r
                try {\r
-                       exec = (Executable<T>) Class.forName(rconf.runnerClassName)\r
-                                       .newInstance();\r
+                       exec = (Executable<T>) Class.forName(rconf.runnerClassName).newInstance();\r
                } catch (InstantiationException e) {\r
                        e.printStackTrace();\r
                } catch (IllegalAccessException e) {\r
index 4fbd3a0..b206eb6 100644 (file)
@@ -46,8 +46,7 @@ import compbio.util.SysPrefs;
 \r
 public class RunnerConfigMarshaller<T> {\r
 \r
-       private static final Logger log = Logger\r
-                       .getLogger(RunnerConfigMarshaller.class);\r
+       private static final Logger log = Logger.getLogger(RunnerConfigMarshaller.class);\r
 \r
        private final JAXBContext ctx;\r
 \r
index 5809be4..8718013 100644 (file)
@@ -24,7 +24,6 @@ import java.io.File;
 import java.io.IOException;\r
 import java.io.PrintStream;\r
 import java.util.List;\r
-import java.util.Map;\r
 import java.util.Map.Entry;\r
 import java.util.concurrent.Callable;\r
 import java.util.concurrent.ExecutionException;\r
index a19cafa..86bf35d 100644 (file)
@@ -48,164 +48,149 @@ import compbio.util.annotation.Immutable;
 @Immutable\r
 public final class OptionCombinator {\r
 \r
-    private static Logger log = Logger.getLogger(OptionCombinator.class);\r
-    private static final String MINVALUE = "-100";\r
-    private static final String MAXVALUE = "100";\r
-\r
-    private static final Random rand = new Random();\r
-    private final RunnerConfig<? extends Executable<?>> rconfig;\r
+       private static Logger log = Logger.getLogger(OptionCombinator.class);\r
+       private static final String MINVALUE = "-100";\r
+       private static final String MAXVALUE = "100";\r
+\r
+       private static final Random rand = new Random();\r
+       private final RunnerConfig<? extends Executable<?>> rconfig;\r
+\r
+       public OptionCombinator(RunnerConfig<? extends Executable<?>> rconfig) {\r
+               if (rconfig == null) {\r
+                       throw new IllegalArgumentException("RunnerConfig must be provided!");\r
+               }\r
+               this.rconfig = rconfig;\r
+       }\r
 \r
-    public OptionCombinator(RunnerConfig<? extends Executable<?>> rconfig) {\r
-       if (rconfig == null) {\r
-           throw new IllegalArgumentException("RunnerConfig must be provided!");\r
+       public List<String> optionsToCommandString(List<Option<?>> options) {\r
+               List<String> strOptions = new ArrayList<String>();\r
+               for (Option<?> option : options) {\r
+                       strOptions.add(optionToCommandString(option));\r
+               }\r
+               return strOptions;\r
        }\r
-       this.rconfig = rconfig;\r
-    }\r
 \r
-    public List<String> optionsToCommandString(List<Option<?>> options) {\r
-       List<String> strOptions = new ArrayList<String>();\r
-       for (Option<?> option : options) {\r
-           strOptions.add(optionToCommandString(option));\r
+       public List<String> getOptionsAtRandom() {\r
+               return optionsToCommandString(getAllOptions());\r
        }\r
-       return strOptions;\r
-    }\r
-\r
-    public List<String> getOptionsAtRandom() {\r
-       return optionsToCommandString(getAllOptions());\r
-    }\r
-\r
-    public List<Option<?>> getAllOptions() {\r
-       return new ArrayList<Option<?>>(rconfig.getOptions());\r
-    }\r
-\r
-    static String optionToCommandString(Option<?> option) {\r
-       int size = option.getOptionNames().size();\r
-       int idx = rand.nextInt(size);\r
-       return option.getOptionNames().get(idx);\r
-    }\r
-\r
-    public List<Parameter<?>> getAllParameters() {\r
-       List<Parameter<?>> args = new ArrayList<Parameter<?>>();\r
-       for (Parameter<?> prm : rconfig.getParameters()) {\r
-           // Make sure there is a default value linked to the parameter to use\r
-           // later\r
-           // prm.setDefaultValue(getValue(prm));\r
-           args.add(prm);\r
+\r
+       public List<Option<?>> getAllOptions() {\r
+               return new ArrayList<Option<?>>(rconfig.getOptions());\r
        }\r
-       return args;\r
-    }\r
 \r
-    public List<String> argumentsToCommandString(\r
-           List<? extends Option<?>> arguments) {\r
-       return argumentsToCommandString(arguments, rconfig);\r
-    }\r
+       static String optionToCommandString(Option<?> option) {\r
+               int size = option.getOptionNames().size();\r
+               int idx = rand.nextInt(size);\r
+               return option.getOptionNames().get(idx);\r
+       }\r
 \r
-    public static List<String> argumentsToCommandString(\r
-           List<? extends Option<?>> arguments,\r
-           RunnerConfig<? extends Executable<?>> rconfig) {\r
+       public List<Parameter<?>> getAllParameters() {\r
+               List<Parameter<?>> args = new ArrayList<Parameter<?>>();\r
+               for (Parameter<?> prm : rconfig.getParameters()) {\r
+                       // Make sure there is a default value linked to the parameter to use later\r
+                       // prm.setDefaultValue(getValue(prm));\r
+                       args.add(prm);\r
+               }\r
+               return args;\r
+       }\r
 \r
-       if (arguments == null || rconfig == null) {\r
-           throw new NullPointerException(\r
-                   "Arguments and RunnerConfig objects must be provided!");\r
+       public List<String> argumentsToCommandString(List<? extends Option<?>> arguments) {\r
+               return argumentsToCommandString(arguments, rconfig);\r
        }\r
 \r
-       List<String> command = new ArrayList<String>();\r
-       for (Option<?> option : arguments) {\r
-\r
-           if (option instanceof Parameter<?>) {\r
-               Parameter<?> prm = (Parameter<?>) option;\r
-               command.add(prm.getOptionName() + rconfig.getPrmSeparator()\r
-                       + getValue(prm));\r
-               log.trace("Setting parameter " + prm);\r
-           } else {\r
-               log.trace("Setting option " + option);\r
-               command.add(optionToCommandString(option));\r
-           }\r
+       public static List<String> argumentsToCommandString(List<? extends Option<?>> arguments,RunnerConfig<? extends Executable<?>> rconfig) {\r
+               if (arguments == null || rconfig == null) {\r
+                       throw new NullPointerException("Arguments and RunnerConfig objects must be provided!");\r
+               }\r
+\r
+               List<String> command = new ArrayList<String>();\r
+               for (Option<?> option : arguments) {\r
+                       if (option instanceof Parameter<?>) {\r
+                               Parameter<?> prm = (Parameter<?>) option;\r
+                               command.add(prm.getOptionName() + rconfig.getPrmSeparator() + getValue(prm));\r
+                               log.trace("Setting parameter " + prm);\r
+                       } else {\r
+                               log.trace("Setting option " + option);\r
+                               command.add(optionToCommandString(option));\r
+                       }\r
+               }\r
+               return command;\r
        }\r
-       return command;\r
-    }\r
-\r
-    public List<String> parametersToCommandString(\r
-           List<Parameter<?>> orderedList, Map<Parameter<?>, String> prmValue) {\r
-       List<String> args = new ArrayList<String>();\r
-       for (Parameter<?> param : orderedList) {\r
-           args.add(param.getOptionName() + rconfig.getPrmSeparator()\r
-                   + prmValue.get(param));\r
+\r
+       public List<String> parametersToCommandString(List<Parameter<?>> orderedList, Map<Parameter<?>, String> prmValue) {\r
+               List<String> args = new ArrayList<String>();\r
+               for (Parameter<?> param : orderedList) {\r
+                       args.add(param.getOptionName() + rconfig.getPrmSeparator() + prmValue.get(param));\r
+               }\r
+               return args;\r
        }\r
-       return args;\r
-    }\r
 \r
-    public Map<Parameter<?>, String> getAllConstrainedParametersWithBorderValues(\r
-           boolean minValue) {\r
-       Map<Parameter<?>, String> paramValue = new HashMap<Parameter<?>, String>();\r
-       for (Parameter<?> prm : rconfig.getParameters()) {\r
-           ValueConstrain vc = prm.getValidValue();\r
-           if (vc == null) {\r
-               continue;\r
-           }\r
-           String value = "";\r
-           if (minValue) {\r
-               value = getLowBorderValue(prm);\r
-           } else {\r
-               value = getUpperBorderValue(prm);\r
-           }\r
-           paramValue.put(prm, value);\r
+       public Map<Parameter<?>, String> getAllConstrainedParametersWithBorderValues( boolean minValue) {\r
+               Map<Parameter<?>, String> paramValue = new HashMap<Parameter<?>, String>();\r
+               for (Parameter<?> prm : rconfig.getParameters()) {\r
+                       ValueConstrain vc = prm.getValidValue();\r
+                       if (vc == null) {\r
+                               continue;\r
+                       }\r
+                       String value =  getUpperBorderValue(prm);\r
+                       if (minValue) {\r
+                               value = getLowBorderValue(prm);\r
+                       }\r
+                       paramValue.put(prm, value);\r
+               }\r
+               return paramValue;\r
        }\r
-       return paramValue;\r
-    }\r
 \r
-    public Map<Parameter<?>, String> getAllConstrainedParametersWithRandomValues() {\r
+       public Map<Parameter<?>, String> getAllConstrainedParametersWithRandomValues() {\r
        Map<Parameter<?>, String> paramValue = new HashMap<Parameter<?>, String>();\r
-       for (Parameter<?> prm : rconfig.getParameters()) {\r
-           ValueConstrain vc = prm.getValidValue();\r
-           if (vc == null) {\r
-               continue;\r
-           }\r
-           paramValue.put(prm, getRandomValue(prm));\r
+               for (Parameter<?> prm : rconfig.getParameters()) {\r
+                       ValueConstrain vc = prm.getValidValue();\r
+                       if (vc == null) {\r
+                               continue;\r
+                       }\r
+                       paramValue.put(prm, getRandomValue(prm));\r
+               }\r
+               return paramValue;\r
        }\r
-       return paramValue;\r
-    }\r
 \r
-    String getLowBorderValue(Parameter<?> param) {\r
-       assert param != null;\r
-       ValueConstrain vc = param.getValidValue();\r
-       Number minVal = vc.getMin();\r
-       return minVal == null ? MINVALUE : minVal.toString();\r
-    }\r
+       String getLowBorderValue(Parameter<?> param) {\r
+               assert param != null;\r
+               ValueConstrain vc = param.getValidValue();\r
+               Number minVal = vc.getMin();\r
+               return minVal == null ? MINVALUE : minVal.toString();\r
+       }\r
 \r
-    String getUpperBorderValue(Parameter<?> param) {\r
-       assert param != null;\r
-       ValueConstrain vc = param.getValidValue();\r
-       Number maxVal = vc.getMax();\r
-       return maxVal == null ? MAXVALUE : maxVal.toString();\r
-    }\r
+       String getUpperBorderValue(Parameter<?> param) {\r
+               assert param != null;\r
+               ValueConstrain vc = param.getValidValue();\r
+               Number maxVal = vc.getMax();\r
+               return maxVal == null ? MAXVALUE : maxVal.toString();\r
+       }\r
 \r
-    String getRandomValue(Parameter<?> param) {\r
-       assert param != null;\r
-       String low = getLowBorderValue(param);\r
-       String high = getUpperBorderValue(param);\r
-       ValueConstrain vc = param.getValidValue();\r
+       String getRandomValue(Parameter<?> param) {\r
+               assert param != null;\r
+               String low = getLowBorderValue(param);\r
+               String high = getUpperBorderValue(param);\r
+               ValueConstrain vc = param.getValidValue();\r
 \r
-       if (vc.getType() == ValueConstrain.Type.Float) {\r
-           return new Double(Util.getRandomNumber(Double.parseDouble(low),\r
-                   Double.parseDouble(high))).toString();\r
+               if (vc.getType() == ValueConstrain.Type.Float) {\r
+                       return new Double(Util.getRandomNumber(Double.parseDouble(low), Double.parseDouble(high))).toString();\r
+               }\r
+               return new Integer(Util.getRandomNumber(Integer.parseInt(low), Integer.parseInt(high))).toString();\r
        }\r
-       return new Integer(Util.getRandomNumber(Integer.parseInt(low), Integer\r
-               .parseInt(high))).toString();\r
-    }\r
 \r
-    static String getValue(Parameter<?> param) {\r
+       static String getValue(Parameter<?> param) {\r
        assert param != null;\r
        if (param.getDefaultValue() != null) {\r
-           log.trace("Returning default value: " + param.getDefaultValue());\r
-           return param.getDefaultValue();\r
+               log.trace("Returning default value: " + param.getDefaultValue());\r
+               return param.getDefaultValue();\r
        } else {\r
-           // Some parameters do not have default values e.g. seq type - nuc or\r
-           // protein\r
-           List<String> passValues = param.getPossibleValues();\r
-           int idx = rand.nextInt(passValues.size());\r
-           log.trace("Returning random value: " + passValues.get(idx));\r
-           return passValues.get(idx);\r
+               // Some parameters do not have default values e.g. seq type - nuc or protein\r
+               List<String> passValues = param.getPossibleValues();\r
+               int idx = rand.nextInt(passValues.size());\r
+               log.trace("Returning random value: " + passValues.get(idx));\r
+               return passValues.get(idx);\r
+               }\r
        }\r
-    }\r
+\r
 }\r
index 6f0ec09..a0123a2 100644 (file)
@@ -20,24 +20,11 @@ package compbio.runner;
 \r
 import java.io.File;\r
 import java.io.FileInputStream;\r
-import java.io.FileReader;\r
-import java.io.BufferedReader;\r
 import java.io.FileNotFoundException;\r
 import java.io.FileOutputStream;\r
 import java.io.IOException;\r
-import java.util.Arrays;\r
 import java.util.List;\r
-import java.util.ArrayList;\r
 import java.util.Map;\r
-import java.util.Set;\r
-import java.util.TreeSet;\r
-import java.util.TreeMap;\r
-import java.util.regex.Pattern;\r
-import java.util.regex.Matcher;\r
-import java.util.Scanner;\r
-\r
-\r
-\r
 \r
 import org.apache.log4j.Logger;\r
 \r
@@ -46,29 +33,20 @@ import compbio.data.sequence.ClustalAlignmentUtil;
 import compbio.data.sequence.FastaSequence;\r
 import compbio.data.sequence.RNAStructScoreManager;\r
 import compbio.data.sequence.Score;\r
-import compbio.data.sequence.ScoreManager;\r
-import compbio.data.sequence.Range;\r
 import compbio.data.sequence.RNAStructReader;\r
 import compbio.data.sequence.SequenceUtil;\r
 import compbio.data.sequence.UnknownFileFormatException;\r
 import compbio.engine.client.ConfExecutable;\r
 import compbio.engine.client.ConfiguredExecutable;\r
 import compbio.engine.client.Executable;\r
-import compbio.engine.conf.PropertyHelperManager;\r
 import compbio.metadata.JobSubmissionException;\r
 import compbio.metadata.PresetManager;\r
 import compbio.metadata.RunnerConfig;\r
-import compbio.util.PropertyHelper;\r
 \r
 public final class Util {\r
 \r
        public static Logger log = Logger.getLogger(Util.class);\r
 \r
-       private static final PropertyHelper ph = PropertyHelperManager\r
-                       .getPropertyHelper();\r
-\r
-       public static final String SPACE = " ";\r
-\r
        public static synchronized <T> RunnerConfig<T> getSupportedOptions(\r
                        Class<? extends Executable<T>> clazz) {\r
                try {\r
@@ -133,7 +111,6 @@ public final class Util {
 \r
        public static void writeInput(List<FastaSequence> sequences,\r
                        ConfiguredExecutable<?> exec) throws JobSubmissionException {\r
-\r
                try {\r
                        File filein = new File(exec.getInput());\r
                        FileOutputStream fout = new FileOutputStream(filein);\r
@@ -148,7 +125,7 @@ public final class Util {
                                                        + e.getLocalizedMessage(), e);\r
                }\r
        }\r
-       \r
+\r
        public static void writeClustalInput(List<FastaSequence> sequences,\r
                        ConfiguredExecutable<?> exec, char gapChar) throws JobSubmissionException {\r
                \r
@@ -167,7 +144,6 @@ public final class Util {
                }\r
        }\r
 \r
-       \r
        public static RNAStructScoreManager readRNAStruct(String workDirectory,\r
                        String structFile) throws IOException, FileNotFoundException {\r
                \r
@@ -196,28 +172,7 @@ public final class Util {
                                        new FileInputStream(aliFile));\r
                }\r
        }\r
-       \r
 \r
-       \r
-       public static String readFile(File inputFile) throws \r
-                       FileNotFoundException, IOException {\r
-\r
-               BufferedReader input    = new BufferedReader(new FileReader(inputFile));\r
-\r
-               String file = new String();\r
-               String line = new String();\r
-\r
-               while (true) {\r
-                       line = input.readLine();\r
-\r
-                       if (line != null) {\r
-                               file = file + line + "\r\n";\r
-                       } else break;\r
-               }\r
-               // Close file\r
-               input.close();\r
-               return file;\r
-       }\r
 }\r
 \r
 \r
index 0f96077..d34bb09 100644 (file)
@@ -28,7 +28,6 @@ import java.util.List;
 \r
 import org.apache.log4j.Logger;\r
 \r
-import compbio.data.sequence.SMERFSConstraints;\r
 import compbio.data.sequence.ScoreManager;\r
 import compbio.data.sequence.SequenceUtil;\r
 import compbio.engine.client.CommandBuilder;\r
@@ -59,10 +58,6 @@ public class AACon extends SkeletalExecutable<AACon> {
        public static final String KEY_VALUE_SEPARATOR = "=";\r
        public static final String STAT_FILE = "stat.txt";\r
 \r
-       private final int windowWidth = SMERFSConstraints.DEFAULT_WINDOW_SIZE;\r
-       private final SMERFSConstraints colScoreMethod = SMERFSConstraints.MID_SCORE;\r
-       private final double gapTreshold = SMERFSConstraints.DEFAULT_GAP_THRESHOLD;\r
-\r
        public AACon() {\r
                addParameters(Arrays.asList("-jar", getLibPath(), "-d=" + STAT_FILE,\r
                                "-f=RESULT_NO_ALIGNMENT"));\r
index 7c54af1..46b2e5c 100644 (file)
@@ -53,14 +53,10 @@ import compbio.runner.Util;
  * This is not a standard DisEMBL! The script has been modified!\r
  * \r
  */\r
-public class Disembl extends SkeletalExecutable<Disembl>\r
-               implements\r
-                       PipedExecutable<Disembl> {\r
+public class Disembl extends SkeletalExecutable<Disembl> implements PipedExecutable<Disembl> {\r
 \r
        private static Logger log = Logger.getLogger(Disembl.class);\r
 \r
-       public static final String KEY_VALUE_SEPARATOR = Util.SPACE;\r
-\r
        /**\r
         * For the region to be considered disordered the values must exceed these\r
         */\r
@@ -104,6 +100,7 @@ public class Disembl extends SkeletalExecutable<Disembl>
                log.trace("DRESULTS: " + results);\r
                return results;\r
        }\r
+\r
        @Override\r
        public Disembl setInput(String inFile) {\r
                super.setInput(inFile);\r
index 6530f5f..a20a8d2 100644 (file)
@@ -46,14 +46,10 @@ import compbio.runner.Util;
  * This is not a standard GlobPlot! The script has been modified!\r
  * \r
  */\r
-public class GlobPlot extends SkeletalExecutable<GlobPlot>\r
-               implements\r
-                       PipedExecutable<GlobPlot> {\r
+public class GlobPlot extends SkeletalExecutable<GlobPlot> implements PipedExecutable<GlobPlot> {\r
 \r
        private static Logger log = Logger.getLogger(GlobPlot.class);\r
 \r
-       public static final String KEY_VALUE_SEPARATOR = Util.SPACE;\r
-\r
        /* The parameter list there must not contain same values! */\r
        public GlobPlot() {\r
                // remove default input to prevent it to appear in the parameters list\r
index 5d20829..2092ab0 100644 (file)
 package compbio.runner.disorder;\r
 \r
 import java.io.File;\r
-import java.io.FileNotFoundException;\r
 import java.io.IOException;\r
-import java.util.Arrays;\r
-import java.util.List;\r
 import java.util.Map;\r
 import java.util.Set;\r
 import java.util.TreeMap;\r
@@ -32,7 +29,6 @@ import compbio.data.sequence.SequenceUtil;
 import compbio.data.sequence.UnknownFileFormatException;\r
 import compbio.engine.client.SkeletalExecutable;\r
 import compbio.metadata.ResultNotAvailableException;\r
-import compbio.runner.msa.Mafft;\r
 \r
 /**\r
  * iupred sequenceFile <short long glob >\r
@@ -48,7 +44,6 @@ public class IUPred extends SkeletalExecutable<IUPred> {
        private static final String SHORT_OUTPUT = "out.short";\r
        private static final String LONG_OUTPUT = "out.long";\r
 \r
-       \r
        @Override\r
        @SuppressWarnings("unchecked")\r
        public ScoreManager getResults(String workDirectory)\r
@@ -109,8 +104,6 @@ public class IUPred extends SkeletalExecutable<IUPred> {
                }\r
        }\r
 \r
-       \r
-       \r
        @Override\r
        public IUPred setInput(String inFile) {\r
                super.setInput(inFile);\r
@@ -118,7 +111,6 @@ public class IUPred extends SkeletalExecutable<IUPred> {
                return this;\r
        } \r
 \r
-               \r
        @Override\r
        public IUPred setOutput(String outFile) {\r
                log.warn("IUpred output is predefined and cannot be set!"); \r
@@ -130,6 +122,7 @@ public class IUPred extends SkeletalExecutable<IUPred> {
                                "are always either of those 3 files (depending on the method called): " + GLOB_OUTPUT + ", " \r
                                + SHORT_OUTPUT + ", "+ LONG_OUTPUT);\r
        }\r
+\r
        @Override\r
        public String getOutput() {\r
                log.warn("IUpred output is predefined and is one of the three files " +\r
index d9d388f..55a1868 100644 (file)
@@ -57,7 +57,6 @@ public class Jronn extends SkeletalExecutable<Jronn> {
 \r
        private final String ncorePrm = "-n=";\r
 \r
-       public static final String KEY_VALUE_SEPARATOR = Util.SPACE;\r
        public static final String STAT_FILE = "stat.txt";\r
 \r
        public Jronn() {\r
@@ -93,8 +92,7 @@ public class Jronn extends SkeletalExecutable<Jronn> {
                String settings = ph.getProperty("jronn.jar.file");\r
                if (compbio.util.Util.isEmpty(settings)) {\r
                        throw new NullPointerException(\r
-                                       "Please define jronn.jar.file property in Executable.properties file"\r
-                                                       + "and initialize it with the location of jronn jar file");\r
+                       "Please define jronn.jar.file property in Executable.properties file and initialize it with the location of jronn jar file");\r
                }\r
                if (new File(settings).isAbsolute()) {\r
                        // Jronn jar can be found so no actions necessary\r
index e5c93b3..da35cee 100644 (file)
@@ -36,12 +36,12 @@ import compbio.runner.Util;
 public class ClustalO extends SkeletalExecutable<ClustalO> {\r
 \r
        private static Logger log = Logger.getLogger(ClustalO.class);\r
+\r
        private static final String EXEC_STAT_FILE = "stat.log";\r
-       \r
 \r
        public static final String KEY_VALUE_SEPARATOR = "=";\r
        \r
-       /*\r
+       /**\r
         * Number of cores parameter name\r
         */\r
        private final static String ncorePrm = "--threads";\r
@@ -52,7 +52,6 @@ public class ClustalO extends SkeletalExecutable<ClustalO> {
         */\r
        private int ncoreNumber = 0;\r
 \r
-       \r
        /**\r
         * --threads=<n> Number of processors to use\r
         * \r
@@ -60,8 +59,7 @@ public class ClustalO extends SkeletalExecutable<ClustalO> {
         */\r
        public ClustalO() {\r
                super(KEY_VALUE_SEPARATOR);\r
-               addParameters(Arrays.asList("--outfmt=clustal", "-v", "--log="\r
-                               + EXEC_STAT_FILE));\r
+               addParameters(Arrays.asList("--outfmt=clustal", "-v", "--log=" + EXEC_STAT_FILE));\r
                // set default in, outs and err files\r
                this.setInput(super.inputFile);\r
                this.setOutput(super.outputFile);\r
@@ -130,8 +128,7 @@ public class ClustalO extends SkeletalExecutable<ClustalO> {
        \r
        public void setNCore(int ncoreNumber) {\r
                if (ncoreNumber < 1 || ncoreNumber > 100) {\r
-                       throw new IndexOutOfBoundsException(\r
-                                       "Number of cores must be within 1 and 100 ");\r
+                       throw new IndexOutOfBoundsException("Number of cores must be within 1 and 100 ");\r
                }\r
                this.ncoreNumber = ncoreNumber;\r
                cbuilder.setParam(ncorePrm, Integer.toString(getNCore()));\r
@@ -141,5 +138,4 @@ public class ClustalO extends SkeletalExecutable<ClustalO> {
                return ncoreNumber;\r
        }\r
 \r
-\r
 }\r
index 16b5734..a3bab89 100644 (file)
@@ -89,7 +89,7 @@ public class ClustalW extends SkeletalExecutable<ClustalW> {
                                convertInputNameToTreeName());\r
        }\r
 \r
-       /*\r
+       /**\r
         * Clustal output tree with same name as input file but .dnd extension e.g.\r
         * this methods do similar conversion TO122.fasta -> TO122.dnd or\r
         * TO122.fasta.in -> TO122.fasta.dnd It does not seems that there is any\r
index b360a82..fb5ca60 100644 (file)
@@ -51,7 +51,7 @@ public class Mafft extends SkeletalExecutable<Mafft> implements PipedExecutable<
 \r
        private final String MATRIX_PAR_NAME = "--aamatrix";\r
 \r
-       public static final String KEY_VALUE_SEPARATOR = Util.SPACE;\r
+       public static final String KEY_VALUE_SEPARATOR = " ";\r
 \r
        public Mafft() {\r
                // remove default input to prevent it to appear in the parameters list\r
index 54c7732..20c76ac 100644 (file)
@@ -43,7 +43,7 @@ public class Muscle extends SkeletalExecutable<Muscle> {
 \r
        private static final String EXEC_STAT_FILE = "stat.log";\r
 \r
-       public static final String KEY_VALUE_SEPARATOR = Util.SPACE;\r
+       public static final String KEY_VALUE_SEPARATOR = " ";\r
 \r
        /**\r
         * Default options are\r
index 532ba30..c4f2015 100644 (file)
@@ -40,7 +40,7 @@ public class Probcons extends SkeletalExecutable<Probcons>
 \r
        private final static String ANNOTATION = "annotation.txt";\r
 \r
-       public static final String KEY_VALUE_SEPARATOR = Util.SPACE;\r
+       public static final String KEY_VALUE_SEPARATOR = " ";\r
 \r
        /**\r
         */\r
index 645b994..7108bec 100644 (file)
@@ -42,8 +42,7 @@ public class Tcoffee extends SkeletalExecutable<Tcoffee>
 \r
        private static Logger log = Logger.getLogger(Tcoffee.class);\r
 \r
-       private static PropertyHelper ph = PropertyHelperManager\r
-                       .getPropertyHelper();\r
+       private static PropertyHelper ph = PropertyHelperManager.getPropertyHelper();\r
 \r
        public static final String KEY_VALUE_SEPARATOR = "=";\r
 \r
index 918918e..996e7d8 100644 (file)
@@ -1,6 +1,5 @@
 package compbio.runner.structure;\r
 \r
-\r
 import java.io.FileNotFoundException;\r
 import java.io.IOException;\r
 \r
@@ -14,13 +13,12 @@ import compbio.runner.Util;
 \r
 public class RNAalifold extends SkeletalExecutable<RNAalifold> \r
                implements PipedExecutable<RNAalifold> {\r
-       \r
-       \r
+\r
        private static Logger log = Logger.getLogger(RNAalifold.class);\r
 \r
        // May not be necessary as defult is "<space>" but still dont know\r
        // How to deal with different key value separators for different params\r
-       public static final String KEY_VALUE_SEPARATOR = Util.SPACE;\r
+       public static final String KEY_VALUE_SEPARATOR = " ";\r
        \r
        public RNAalifold() {\r
                super(KEY_VALUE_SEPARATOR);\r
@@ -51,7 +49,6 @@ public class RNAalifold extends SkeletalExecutable<RNAalifold>
                        throws ResultNotAvailableException {\r
                try {\r
                        return Util.readRNAStruct(workDirectory, getOutput());\r
-                       \r
                } catch (FileNotFoundException e) {\r
                        log.error(e.getMessage(), e.getCause());\r
                        throw new ResultNotAvailableException(e);\r
index 0171128..f3e2118 100644 (file)
@@ -19,21 +19,13 @@ package compbio.stat.collector;
 \r
 import java.io.File;\r
 import java.io.FileFilter;\r
-import java.io.IOException;\r
-import java.sql.SQLException;\r
-import java.text.SimpleDateFormat;\r
-import java.util.ArrayList;\r
 import java.util.Date;\r
 \r
 import org.apache.log4j.Logger;\r
 \r
 import compbio.engine.Cleaner;\r
-import compbio.engine.client.Executable;\r
 import compbio.engine.client.PathValidator;\r
-import compbio.engine.client.SkeletalExecutable;\r
-import compbio.metadata.JobStatus;\r
 import compbio.stat.collector.JobStat;\r
-import compbio.util.FileUtil;\r
 \r
 /**\r
  * Number of runs of each WS = number of folders with name\r
index 4c36445..03466fe 100644 (file)
@@ -40,6 +40,7 @@ public class InputFilter {
 \r
        private static boolean compareLines(File input, String[] reference) {\r
                BufferedReader reader = null;\r
+               boolean status = true;\r
                try {\r
                        reader = new BufferedReader(new FileReader(input));\r
                        // only compare first four lines of the file with reference\r
@@ -47,11 +48,13 @@ public class InputFilter {
                        for (int i = 0; i < 4; i++) {\r
                                String line = reader.readLine();\r
                                if (Util.isEmpty(line)) {\r
-                                       return false;\r
+                                       status = false;\r
+                                       break;\r
                                }\r
                                line = line.trim();\r
                                if (!line.equals(reference[i].trim())) {\r
-                                       return false;\r
+                                       status = false;\r
+                                       break;\r
                                }\r
                        }\r
                        reader.close();\r
@@ -60,6 +63,6 @@ public class InputFilter {
                } finally {\r
                        FileUtil.closeSilently(reader);\r
                }\r
-               return true;\r
+               return status;\r
        }\r
 }\r
index 119b9b1..86f3e05 100644 (file)
@@ -49,28 +49,23 @@ public class DisplayStat extends HttpServlet {
                toCal.add(Calendar.MONTH, 1);\r
 \r
                try {\r
-                       StatCollection stats = StatCollection.newStatCollecton(fromDate,\r
-                                       toCal.getTime());\r
+                       StatCollection stats = StatCollection.newStatCollecton(fromDate, toCal.getTime());\r
 \r
                        log.trace("Stats: " + stats);\r
                        req.setAttribute("stat", stats);\r
                        req.setAttribute("statTotal", Totals.sumStats(stats.getAllStat()));\r
-                       req.setAttribute("statTotalCluster",\r
-                                       Totals.sumStats(stats.getClusterStat()));\r
-                       req.setAttribute("statTotalLocal",\r
-                                       Totals.sumStats(stats.getLocalStat()));\r
+                       req.setAttribute("statTotalCluster", Totals.sumStats(stats.getClusterStat()));\r
+                       req.setAttribute("statTotalLocal", Totals.sumStats(stats.getLocalStat()));\r
 \r
                        req.setAttribute("startDate", fromDate);\r
                        req.setAttribute("stopDate", toCal.getTime());\r
                        log.trace("from " + fromDate + "  to " + toCal.getTime());\r
-                       RequestDispatcher dispatcher = req\r
-                                       .getRequestDispatcher("statpages/Statistics.jsp");\r
+                       RequestDispatcher dispatcher = req.getRequestDispatcher("statpages/Statistics.jsp");\r
                        dispatcher.forward(req, resp);\r
-\r
                } catch (SQLException e) {\r
                        log.error(e.getMessage(), e);\r
                        throw new ServletException(e);\r
                }\r
-\r
        }\r
+\r
 }\r
index 35a35a4..b36f700 100644 (file)
@@ -71,8 +71,7 @@ public class HttpCodeResponseServiceStatus extends HttpServlet {
                // convert it to http://localhost:8080/jabaws\r
                StringBuffer jabawspath = req.getRequestURL();\r
                jabawspath = jabawspath.delete(\r
-                               jabawspath.indexOf("/"\r
-                                               + HttpCodeResponseServiceStatus.class.getSimpleName()),\r
+                               jabawspath.indexOf("/" + HttpCodeResponseServiceStatus.class.getSimpleName()),\r
                                jabawspath.length());\r
                boolean operating = false;\r
                // save for the future use\r
@@ -110,8 +109,7 @@ public class HttpCodeResponseServiceStatus extends HttpServlet {
                                        "Service: " + failedService\r
                                                        + "\n is not available! Error message:\n "\r
                                                        + failMessage);\r
-\r
                }\r
-\r
        }\r
+\r
 }\r
index 88d96bb..c646207 100644 (file)
@@ -29,7 +29,6 @@ import org.apache.log4j.Logger;
 \r
 import compbio.stat.collector.StatDB;\r
 import compbio.stat.collector.StatProcessor;\r
-import compbio.stat.servlet.DisplayStat;\r
 import compbio.ws.client.Services;\r
 \r
 public class StatCollection {\r
index f7f2603..2fd40f8 100644 (file)
@@ -62,12 +62,11 @@ import compbio.ws.server.AAConWS;
  */\r
 public class AAConClient {\r
 \r
-       /*\r
+       /**\r
         * Use java.util.Logger instead of log4j logger to reduce the size of the\r
         * client package\r
         */\r
-       private static final Logger log = Logger.getLogger(AAConClient.class\r
-                       .getCanonicalName());\r
+       private static final Logger log = Logger.getLogger(AAConClient.class.getCanonicalName());\r
 \r
        /**\r
         * The fully qualified web service namespace\r
@@ -78,7 +77,6 @@ public class AAConClient {
         * Web service host\r
         */\r
        static final String hostname = "http://www.compbio.dundee.ac.uk/aacon";\r
-       // static final String hostname = "http://localhost:8080/jabaws";\r
 \r
        /**\r
         * Web service name\r
@@ -96,7 +94,6 @@ public class AAConClient {
         */\r
        @SuppressWarnings("unchecked")\r
        AAConClient(String[] cmd) throws IOException {\r
-\r
                File inputFile = IOHelper.getFile(cmd, inputkey, true);\r
                File outFile = IOHelper.getFile(cmd, outputkey, false);\r
                File parametersFile = IOHelper.getFile(cmd, paramFile, true);\r
@@ -110,8 +107,7 @@ public class AAConClient {
                List<Option<AAConWS>> customOptions = null;\r
                if (parametersFile != null) {\r
                        List<String> prms = IOHelper.loadParameters(parametersFile);\r
-                       customOptions = MetadataHelper.processParameters(prms,\r
-                                       msaws.getRunnerOptions());\r
+                       customOptions = MetadataHelper.processParameters(prms, msaws.getRunnerOptions());\r
                }\r
                ScoreManager result = null;\r
                if (inputFile != null) {\r
@@ -157,8 +153,7 @@ public class AAConClient {
                try {\r
                        result.writeOut(writer);\r
                } catch (IOException e) {\r
-                       System.err\r
-                                       .println("Problems writing output file! Stack trace is below: ");\r
+                       System.err.println("Problems writing output file! Stack trace is below: ");\r
                        e.printStackTrace();\r
                } finally {\r
                        if (writer != null) {\r
@@ -194,8 +189,7 @@ public class AAConClient {
                QName portName = new QName(QUALIFIED_SERVICE_NAME, "AAConWS" + "Port");\r
 \r
                @SuppressWarnings("unchecked")\r
-               SequenceAnnotation<AAConWS> serviceIF = serv.getPort(portName,\r
-                               SequenceAnnotation.class);\r
+               SequenceAnnotation<AAConWS> serviceIF = serv.getPort(portName, SequenceAnnotation.class);\r
 \r
                log.log(Level.FINE, "Connected successfully!");\r
                return serviceIF;\r
@@ -225,8 +219,7 @@ public class AAConClient {
 \r
                        String jobId = null;\r
                        if (customOptions != null && preset != null) {\r
-                               System.out\r
-                                               .println("WARN: Parameters (-f) are defined together with a preset (-r) ignoring preset!");\r
+                               System.out.println("WARN: Parameters (-f) are defined together with a preset (-r) ignoring preset!");\r
                        }\r
                        if (customOptions != null) {\r
                                jobId = wsproxy.customAnalize(fastalist, customOptions);\r
@@ -239,14 +232,12 @@ public class AAConClient {
                        scores = wsproxy.getAnnotation(jobId);\r
 \r
                } catch (IOException e) {\r
-                       System.err\r
-                                       .println("Exception while reading the input file. "\r
+                       System.err.println("Exception while reading the input file. "\r
                                                        + "Check that the input file contains a list of fasta formatted sequences! "\r
                                                        + "Exception details are below:");\r
                        e.printStackTrace();\r
                } catch (JobSubmissionException e) {\r
-                       System.err\r
-                                       .println("Exception while submitting job to a web server. "\r
+                       System.err.println("Exception while submitting job to a web server. "\r
                                                        + "Exception details are below:");\r
                        e.printStackTrace();\r
                } catch (ResultNotAvailableException e) {\r
@@ -257,14 +248,12 @@ public class AAConClient {
                        // ignore and propagate an interruption\r
                        Thread.currentThread().interrupt();\r
                } catch (WrongParameterException e) {\r
-                       System.err\r
-                                       .println("Exception while parsing the web method input parameters. "\r
+                       System.err.println("Exception while parsing the web method input parameters. "\r
                                                        + "Exception details are below:");\r
                        e.printStackTrace();\r
                } catch (UnknownFileFormatException e) {\r
-                       System.err\r
-                                       .println("Exception while attempting to read the input file "\r
-                                                       + "Exception details are below:");\r
+                       System.err.println("Exception while attempting to read the input file "\r
+                                               + "Exception details are below:");\r
                        System.out.println(e.getMessage());\r
                        e.printStackTrace();\r
                }\r
@@ -278,38 +267,20 @@ public class AAConClient {
         */\r
        static void printUsage(int exitStatus) {\r
                System.out.println();\r
-               System.out.println("Usage: <Class or Jar file name> "\r
-                               + " ACTION [OPTIONS] ");\r
+               System.out.println("Usage: <Class or Jar file name>  ACTION [OPTIONS] ");\r
                System.out.println();\r
                System.out.println("ACTIONS: ");\r
-               System.out\r
-                               .println(inputkey\r
-                                               + pseparator\r
-                                               + "<inputFile> - full path to fasta or Clustal formatted alignment file ");\r
-               System.out.println(paramList\r
-                               + " - lists parameters supported by web service");\r
-               System.out.println(presetList\r
-                               + " - lists presets supported by web service");\r
+               System.out.println(inputkey + pseparator + "<inputFile> - full path to fasta or Clustal formatted alignment file ");\r
+               System.out.println(paramList + " - lists parameters supported by web service");\r
+               System.out.println(presetList + " - lists presets supported by web service");\r
                System.out.println(limitList + " - lists web services limits");\r
-               System.out\r
-                               .println("Please note that if input file is specified other actions are ignored");\r
-\r
-               System.out.println();\r
+               System.out.println("Please note that if input file is specified other actions are ignored\n");\r
                System.out.println("OPTIONS (only for use with -i action):");\r
-\r
-               System.out.println(presetkey + pseparator\r
-                               + "<presetName> - name of the preset to use");\r
-               System.out\r
-                               .println(outputkey\r
-                                               + pseparator\r
-                                               + "<outputFile> - full path to the file where to write the result");\r
-               System.out\r
-                               .println("-f=<parameterInputFile> - the name of the file with the list of parameters to use.");\r
-               System.out\r
-                               .println("Please note that -r and -f options cannot be used together. "\r
-                                               + "Conservation is calculated with either a preset or "\r
-                                               + "the parameters from the file, but not both!");\r
-\r
+               System.out.println(presetkey + pseparator + "<presetName> - name of the preset to use");\r
+               System.out.println(outputkey + pseparator + "<outputFile> - full path to the file where to write the result");\r
+               System.out.println("-f=<parameterInputFile> - the name of the file with the list of parameters to use.");\r
+               System.out.println("Please note that -r and -f options cannot be used together. "\r
+                                               + "Conservation is calculated with either a preset or parameters from the file, but not both!");\r
                System.exit(exitStatus);\r
        }\r
 \r
@@ -353,8 +324,7 @@ public class AAConClient {
                try {\r
                        new AAConClient(args);\r
                } catch (IOException e) {\r
-                       log.log(Level.SEVERE, "IOException in client! " + e.getMessage(),\r
-                                       e.getCause());\r
+                       log.log(Level.SEVERE, "IOException in client! " + e.getMessage(), e.getCause());\r
                        System.err.println("Cannot write output file! Stack trace: ");\r
                        e.printStackTrace();\r
                }\r
index 2a2f3d1..d46d978 100644 (file)
@@ -27,7 +27,6 @@ import java.io.File;
 import java.io.FileInputStream;\r
 import java.io.FileOutputStream;\r
 import java.io.IOException;\r
-import java.io.OutputStream;\r
 import java.io.PrintWriter;\r
 import java.io.Writer;\r
 import java.net.ConnectException;\r
@@ -50,7 +49,6 @@ import compbio.data.msa.MsaWS;
 import compbio.data.msa.RegistryWS;\r
 import compbio.data.msa.SequenceAnnotation;\r
 import compbio.data.sequence.Alignment;\r
-import compbio.data.sequence.AlignmentMetadata;\r
 import compbio.data.sequence.JpredAlignment;\r
 import compbio.data.sequence.FastaSequence;\r
 import compbio.data.sequence.ScoreManager;\r
@@ -512,7 +510,6 @@ public class Jws2Client {
         * \r
         */\r
        public static void main(String[] args) {\r
-\r
                if (args == null) {\r
                        System.out.println(Constraints.help_text);\r
                        System.exit(1);\r
@@ -522,7 +519,6 @@ public class Jws2Client {
                        System.out.println(Constraints.help_text);\r
                        System.exit(1);\r
                }\r
-\r
                try {\r
                        new Jws2Client(args);\r
                } catch (IOException e) {\r
index 6555802..53acc88 100644 (file)
@@ -19,12 +19,10 @@ public class GAUtils {
 \r
        private static final Logger log = Logger.getLogger(GAUtils.class);\r
 \r
-       static PropertyHelper PROP_HELPER = PropertyHelperManager\r
-                       .getPropertyHelper();\r
+       static PropertyHelper PROP_HELPER = PropertyHelperManager.getPropertyHelper();\r
 \r
        // compbio.dundee.ac.uk GA tracker\r
-       private static AnalyticsConfigData config = new AnalyticsConfigData(\r
-                       "UA-5356328-1");\r
+       private static AnalyticsConfigData config = new AnalyticsConfigData("UA-5356328-1");\r
 \r
        private static GoogleAnalyticsTracker TRACKER = new GoogleAnalyticsTracker(\r
                        config);\r
index 07d005d..d0c9226 100644 (file)
@@ -115,8 +115,7 @@ public final class WSUtil {
 \r
        static <T> void reportUsage(ConfiguredExecutable<T> confExec, Logger logger) {\r
                if (GAUtils.IS_GA_ENABLED) {\r
-                       Services service = ServicesUtil.getServiceByRunner(confExec\r
-                                       .getExecutable().getClass());\r
+                       Services service = ServicesUtil.getServiceByRunner(confExec.getExecutable().getClass());\r
                        GAUtils.reportUsage(service);\r
                        logger.info("Reporting GA usage for " + service);\r
                }\r
@@ -128,15 +127,14 @@ public final class WSUtil {
                if (limit != null && limit.isExceeded(sequences)) {\r
                        throw LimitExceededException.newLimitExceeded(limit, sequences);\r
                }\r
-               log.debug("Method: " + method + " with task: " + confExec.getTaskId());\r
                compbio.runner.Util.writeInput(sequences, confExec);\r
                AsyncExecutor engine = Configurator.getAsyncEngine(confExec);\r
                String jobId = engine.submitJob(confExec);\r
                reportUsage(confExec, log);\r
                return jobId;\r
        }\r
-       \r
-       // Same as analize but Alifold takes clustal input not fasta\r
+\r
+       // Same as analize(...) but RNAalifold takes clustal input not fasta\r
        // An if condition in the above method might be a better solution but \r
        // you need a way of finding out the type of confExec at runtime\r
        \r
@@ -146,8 +144,6 @@ public final class WSUtil {
                if (limit != null && limit.isExceeded(sequences)) {\r
                        throw LimitExceededException.newLimitExceeded(limit, sequences);\r
                }\r
-               log.debug("Method: " + method + " with task: " + confExec.getTaskId());\r
-               // This line is different from the above method\r
                compbio.runner.Util.writeClustalInput(sequences, confExec, '-');\r
                AsyncExecutor engine = Configurator.getAsyncEngine(confExec);\r
                String jobId = engine.submitJob(confExec);\r
@@ -210,44 +206,8 @@ public final class WSUtil {
                AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId);\r
                ConfiguredExecutable<T> aacon = (ConfiguredExecutable<T>) asyncEngine.getResults(jobId);\r
                ScoreManager mas = aacon.getResults();\r
-               \r
                log.trace(jobId + " getConservation : " + mas);\r
                return mas;\r
        }\r
-       \r
 \r
-       /*\r
-        * UNUSED\r
-        * \r
-        * @SuppressWarnings("unchecked") static <T> LimitsManager<T>\r
-        * getLimits(Class<? extends Executable<T>> clazz, WebServiceContext\r
-        * wsContext) {\r
-        * \r
-        * String LIMIT_KEY = CACHE_KEY + clazz.getCanonicalName(); LimitsManager<T>\r
-        * limit = (LimitsManager<T>) getObjectFromApplContext( LIMIT_KEY,\r
-        * wsContext); if (limit == null) { synchronized (WSUtil.class) { limit =\r
-        * (LimitsManager<T>) getObjectFromApplContext(LIMIT_KEY, wsContext); if\r
-        * (limit == null) { limit = compbio.runner.Util\r
-        * .getLimits((Class<Executable<T>>) clazz);\r
-        * addObjectToApplContext(wsContext, LIMIT_KEY, limit); } } } return limit;\r
-        * }\r
-        * \r
-        * static void addObjectToApplContext(WebServiceContext wsContext, String\r
-        * objKey, Object obj) { assert !Util.isEmpty(objKey) :\r
-        * "Key for the object must not be empty! "; assert wsContext != null;\r
-        * \r
-        * ServletContext ctx = ((javax.servlet.ServletContext) wsContext\r
-        * .getMessageContext().get(MessageContext. SERVLET_CONTEXT)); assert ctx !=\r
-        * null; log.debug("Adding object with key '" + objKey + "' and value '" +\r
-        * obj + "' to the application context"); ctx.setAttribute(objKey, obj); }\r
-        * static Object getObjectFromApplContext(String objKey, WebServiceContext\r
-        * wsContext) { assert !Util.isEmpty(objKey) :\r
-        * "Key for the object must not be empty! "; assert wsContext != null;\r
-        * \r
-        * ServletContext ctx = ((javax.servlet.ServletContext) wsContext\r
-        * .getMessageContext().get(MessageContext. SERVLET_CONTEXT)); Object obj =\r
-        * ctx.getAttribute(objKey); log.trace("Retrieving object with key '" +\r
-        * objKey + "' and value '" + obj + "' from the application context");\r
-        * return obj; }\r
-        */\r
 }\r