-/* Copyright (c) 2009 Peter Troshin\r
+/* Copyright (c) 2011 Peter Troshin\r
* \r
- * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0 \r
+ * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0 \r
* \r
* This library is free software; you can redistribute it and/or modify it under the terms of the\r
* Apache License version 2 as published by the Apache Software Foundation\r
import compbio.engine.client.PipedExecutable;\r
import compbio.engine.client.SkeletalExecutable;\r
import compbio.metadata.ResultNotAvailableException;\r
-import compbio.runner.Util;\r
+import compbio.runner.RunnerUtil;\r
\r
/**\r
* \r
* @author pvtroshin\r
*\r
*/\r
-public class Mafft extends SkeletalExecutable<Mafft>\r
- implements\r
- PipedExecutable<Mafft> {\r
- /*\r
- * TODO get rid of piping: Mafft now supports --out option for output file. \r
- * Multithreading support does not seem to work reliably! \r
- */\r
- \r
- \r
+public class Mafft extends SkeletalExecutable<Mafft> implements PipedExecutable<Mafft> {\r
+/*\r
+ * TODO get rid of piping: Mafft now supports --out option for output file. \r
+ * Multi-threading supported with e.g. "thread 4" only for Linux, so JABAWS \r
+ * will not support it for now, it also need editing of mafft makefile \r
+ */\r
+\r
private static Logger log = Logger.getLogger(Mafft.class);\r
\r
private static String autoOption = "--auto";\r
\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
public Alignment getResults(String workDirectory)\r
throws ResultNotAvailableException {\r
try {\r
- return Util.readClustalFile(workDirectory, getOutput());\r
+ return RunnerUtil.readClustalFile(workDirectory, getOutput());\r
} catch (FileNotFoundException e) {\r
log.error(e.getMessage(), e.getCause());\r
throw new ResultNotAvailableException(e);\r
public Class<Mafft> getType() {\r
return (Class<Mafft>) this.getClass();\r
}\r
-\r
- /*\r
- * @Override public List<String> getParameters(\r
- * compbio.runner.Executable.ExecProvider provider) { for (int i = 0; i <\r
- * param.size(); i++) { String par = param.get(i); if\r
- * (isMatrixParameter(par)) { String matrixName = getValue(i); if (new\r
- * File(matrixName).isAbsolute()) { // Matrix can be found so no actions\r
- * necessary // This method has been called already and the matrix name //\r
- * is modified to contain full path // no further actions is necessary\r
- * break; } String matrixPath = Util.getExecProperty("matrix.path", this);\r
- * String absMatrixPath = Util.convertToAbsolute(matrixPath); param.remove(i\r
- * + 1); param.remove(i); super.addParameter(MATRIX_PAR_NAME);\r
- * super.addParameter(absMatrixPath + File.separator + matrixName); break; }\r
- * } return super.getParameters(provider); }\r
- * \r
- * boolean isMatrixParameter(String parameter) { assert\r
- * !compbio.util.Util.isEmpty(parameter); if\r
- * (parameter.toUpperCase().startsWith(MATRIX_PAR_NAME)) { return true; }\r
- * return false; }\r
- * \r
- * String getValue(int i) { return param.get(i + 1); }\r
- */\r
}\r