CLUSTAL,\r
\r
/**\r
+ * ClustalO\r
+ */\r
+ ClustalO,\r
+ /**\r
* Mafft\r
*/\r
- MAFFT,\r
+ Mafft,\r
\r
/**\r
* Muscle\r
*/\r
- MUSCLE,\r
+ Muscle,\r
\r
/**\r
* Tcoffee\r
import compbio.data.msa.MsaWS;\r
import compbio.data.sequence.Alignment;\r
import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.Program;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.client.ConfiguredExecutable;\r
\r
private static Logger log = Logger.getLogger(ClustalOWS.class);\r
\r
- private static final RunnerConfig<ClustalO> clustalOptions = Util\r
- .getSupportedOptions(ClustalO.class);\r
+ private static final RunnerConfig<ClustalO> clustalOptions = Util.getSupportedOptions(ClustalO.class);\r
\r
- private static final PresetManager<ClustalO> clustalPresets = Util\r
- .getPresets(ClustalO.class);\r
+ private static final PresetManager<ClustalO> clustalPresets = Util.getPresets(ClustalO.class);\r
\r
- private static final LimitsManager<ClustalO> limitMan = compbio.engine.client.Util\r
- .getLimits(new ClustalO().getType());\r
+ private static final LimitsManager<ClustalO> limitMan = compbio.engine.client.Util.getLimits(new ClustalO().getType());\r
\r
@Override\r
public String align(List<FastaSequence> sequences)\r
throws JobSubmissionException {\r
-\r
WSUtil.validateFastaInput(sequences);\r
ConfiguredExecutable<ClustalO> confClust = init(sequences);\r
return WSUtil.align(sequences, confClust, log, "align", getLimit(""));\r
ConfiguredExecutable<ClustalO> init(List<FastaSequence> dataSet)\r
throws JobSubmissionException {\r
ClustalO clustal = new ClustalO();\r
- clustal.setInput(SkeletalExecutable.INPUT)\r
- .setOutput(SkeletalExecutable.OUTPUT)\r
- .setError(SkeletalExecutable.ERROR);\r
- ConfiguredExecutable<ClustalO> confClust = Configurator\r
- .configureExecutable(clustal, dataSet);\r
+ clustal.setInput(SkeletalExecutable.INPUT);\r
+ clustal.setOutput(SkeletalExecutable.OUTPUT);\r
+ clustal.setError(SkeletalExecutable.ERROR);\r
+ ConfiguredExecutable<ClustalO> confClust = Configurator.configureExecutable(clustal, dataSet);\r
// Set the number of threads for the cluster execution from conf file\r
if (confClust.getExecProvider() == Executable.ExecProvider.Cluster) {\r
- int clusterCpuNum = SkeletalExecutable.getClusterCpuNum(clustal\r
- .getType());\r
+ int clusterCpuNum = SkeletalExecutable.getClusterCpuNum(clustal.getType());\r
if (clusterCpuNum != 0) {\r
clustal.setNCore(clusterCpuNum);\r
}\r
}\r
-\r
return confClust;\r
}\r
\r
WrongParameterException {\r
WSUtil.validateFastaInput(sequences);\r
ConfiguredExecutable<ClustalO> confClust = init(sequences);\r
- List<String> params = WSUtil.getCommands(options,\r
- ClustalO.KEY_VALUE_SEPARATOR);\r
+ List<String> params = WSUtil.getCommands(options, ClustalO.KEY_VALUE_SEPARATOR);\r
confClust.addParameters(params);\r
log.info("Setting parameters: " + params);\r
- return WSUtil.align(sequences, confClust, log, "customAlign",\r
- getLimit(""));\r
+ return WSUtil.align(sequences, confClust, log, "customAlign", getLimit(""));\r
}\r
\r
@Override\r
@SuppressWarnings("unchecked")\r
@Override\r
public Alignment getResult(String jobId) throws ResultNotAvailableException {\r
-\r
WSUtil.validateJobId(jobId);\r
AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId);\r
- ConfiguredExecutable<ClustalO> clustal = (ConfiguredExecutable<ClustalO>) asyncEngine\r
- .getResults(jobId);\r
+ ConfiguredExecutable<ClustalO> clustal = (ConfiguredExecutable<ClustalO>) asyncEngine.getResults(jobId);\r
Alignment al = clustal.getResults();\r
-\r
- return al;\r
+ return new Alignment (al.getSequences(),Program.ClustalO, '-');\r
}\r
\r
@Override\r
\r
@Override\r
public ChunkHolder pullExecStatistics(String jobId, long position) {\r
-\r
WSUtil.validateJobId(jobId);\r
- String file = Configurator.getWorkDirectory(jobId) + File.separator\r
- + ClustalO.getStatFile();\r
+ String file = Configurator.getWorkDirectory(jobId) + File.separator + ClustalO.getStatFile();\r
ChunkHolder cholder = WSUtil.pullFile(file, position);\r
return cholder;\r
}\r
import compbio.data.msa.MsaWS;\r
import compbio.data.sequence.Alignment;\r
import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.Program;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.client.ConfiguredExecutable;\r
\r
private static Logger log = Logger.getLogger(ClustalWS.class);\r
\r
- private static final RunnerConfig<ClustalW> clustalOptions = Util\r
- .getSupportedOptions(ClustalW.class);\r
+ private static final RunnerConfig<ClustalW> clustalOptions = Util.getSupportedOptions(ClustalW.class);\r
\r
- private static final PresetManager<ClustalW> clustalPresets = Util\r
- .getPresets(ClustalW.class);\r
+ private static final PresetManager<ClustalW> clustalPresets = Util.getPresets(ClustalW.class);\r
\r
- private static final LimitsManager<ClustalW> limitMan = compbio.engine.client.Util\r
- .getLimits(new ClustalW().getType());\r
+ private static final LimitsManager<ClustalW> limitMan = compbio.engine.client.Util.getLimits(new ClustalW().getType());\r
\r
@Override\r
public String align(List<FastaSequence> sequences)\r
ConfiguredExecutable<ClustalW> init(List<FastaSequence> dataSet)\r
throws JobSubmissionException {\r
ClustalW clustal = new ClustalW();\r
- clustal.setInput(SkeletalExecutable.INPUT)\r
- .setOutput(SkeletalExecutable.OUTPUT)\r
- .setError(SkeletalExecutable.ERROR);\r
- ConfiguredExecutable<ClustalW> confClust = Configurator\r
- .configureExecutable(clustal, dataSet);\r
+ clustal.setInput(SkeletalExecutable.INPUT);\r
+ clustal.setOutput(SkeletalExecutable.OUTPUT);\r
+ clustal.setError(SkeletalExecutable.ERROR);\r
+ ConfiguredExecutable<ClustalW> confClust = Configurator.configureExecutable(clustal, dataSet);\r
return confClust;\r
}\r
\r
WrongParameterException {\r
WSUtil.validateFastaInput(sequences);\r
ConfiguredExecutable<ClustalW> confClust = init(sequences);\r
- List<String> params = WSUtil.getCommands(options,\r
- ClustalW.KEY_VALUE_SEPARATOR);\r
+ List<String> params = WSUtil.getCommands(options, ClustalW.KEY_VALUE_SEPARATOR);\r
confClust.addParameters(params);\r
log.info("Setting parameters: " + params);\r
- return WSUtil.align(sequences, confClust, log, "customAlign",\r
- getLimit(""));\r
+ return WSUtil.align(sequences, confClust, log, "customAlign", getLimit(""));\r
}\r
\r
@Override\r
@SuppressWarnings("unchecked")\r
@Override\r
public Alignment getResult(String jobId) throws ResultNotAvailableException {\r
-\r
WSUtil.validateJobId(jobId);\r
AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId);\r
- ConfiguredExecutable<ClustalW> clustal = (ConfiguredExecutable<ClustalW>) asyncEngine\r
- .getResults(jobId);\r
+ ConfiguredExecutable<ClustalW> clustal = (ConfiguredExecutable<ClustalW>) asyncEngine.getResults(jobId);\r
Alignment al = clustal.getResults();\r
-\r
- return al;\r
+ return new Alignment (al.getSequences(), Program.CLUSTAL, '-');\r
}\r
\r
@Override\r
\r
@Override\r
public ChunkHolder pullExecStatistics(String jobId, long position) {\r
-\r
WSUtil.validateJobId(jobId);\r
- String file = Configurator.getWorkDirectory(jobId) + File.separator\r
- + ClustalW.getStatFile();\r
+ String file = Configurator.getWorkDirectory(jobId) + File.separator + ClustalW.getStatFile();\r
ChunkHolder cholder = WSUtil.pullFile(file, position);\r
return cholder;\r
}\r
@Override\r
public String align(List<FastaSequence> sequences)\r
throws JobSubmissionException {\r
-\r
WSUtil.validateFastaInput(sequences);\r
ConfiguredExecutable<Jpred> confClust = init(sequences);\r
return WSUtil.align(sequences, confClust, log, "align", getLimit(""));\r
import compbio.data.msa.MsaWS;\r
import compbio.data.sequence.Alignment;\r
import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.Program;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.client.ConfiguredExecutable;\r
ConfiguredExecutable<Mafft> init(List<FastaSequence> dataSet)\r
throws JobSubmissionException {\r
Mafft mafft = new Mafft();\r
- mafft.setInput(SkeletalExecutable.INPUT)\r
- .setOutput(SkeletalExecutable.OUTPUT)\r
- .setError(SkeletalExecutable.ERROR);\r
+ mafft.setInput(SkeletalExecutable.INPUT);\r
+ mafft.setOutput(SkeletalExecutable.OUTPUT);\r
+ mafft.setError(SkeletalExecutable.ERROR);\r
return Configurator.configureExecutable(mafft, dataSet);\r
}\r
\r
WrongParameterException {\r
WSUtil.validateFastaInput(sequences);\r
ConfiguredExecutable<Mafft> confMafft = init(sequences);\r
- List<String> params = WSUtil.getCommands(options,\r
- Mafft.KEY_VALUE_SEPARATOR);\r
+ List<String> params = WSUtil.getCommands(options, Mafft.KEY_VALUE_SEPARATOR);\r
log.info("Setting parameters: " + params);\r
confMafft.addParameters(params);\r
- return WSUtil.align(sequences, confMafft, log, "customAlign",\r
- getLimit(""));\r
+ return WSUtil.align(sequences, confMafft, log, "customAlign", getLimit(""));\r
}\r
\r
@Override\r
ConfiguredExecutable<Mafft> mafft = (ConfiguredExecutable<Mafft>) asyncEngine\r
.getResults(jobId);\r
Alignment al = mafft.getResults();\r
- // log(jobId, "getResults");\r
- return al;\r
+ return new Alignment (al.getSequences(), Program.Mafft, '-');\r
}\r
\r
@Override\r
import compbio.data.msa.MsaWS;\r
import compbio.data.sequence.Alignment;\r
import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.Program;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.client.ConfiguredExecutable;\r
ConfiguredExecutable<Muscle> muscle = (ConfiguredExecutable<Muscle>) asyncEngine\r
.getResults(jobId);\r
Alignment al = muscle.getResults();\r
- // log(jobId, "getResults");\r
- return al;\r
+ return new Alignment (al.getSequences(),Program.Muscle, '-');\r
}\r
\r
@Override\r
import compbio.data.msa.MsaWS;\r
import compbio.data.sequence.Alignment;\r
import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.Program;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.client.ConfiguredExecutable;\r
AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId);\r
ConfiguredExecutable<Probcons> probcons = (ConfiguredExecutable<Probcons>) asyncEngine.getResults(jobId);\r
Alignment al = probcons.getResults();\r
- // log(jobId, "getResults");\r
- return al;\r
+ return new Alignment (al.getSequences(), Program.Probcons, '-');\r
}\r
\r
@Override\r
import compbio.data.msa.MsaWS;\r
import compbio.data.sequence.Alignment;\r
import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.Program;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.client.ConfiguredExecutable;\r
\r
private static Logger log = Logger.getLogger(TcoffeeWS.class);\r
\r
- private static final RunnerConfig<Tcoffee> tcoffeeOptions = Util\r
- .getSupportedOptions(Tcoffee.class);\r
+ private static final RunnerConfig<Tcoffee> tcoffeeOptions = Util.getSupportedOptions(Tcoffee.class);\r
\r
- private static final PresetManager<Tcoffee> tcoffeePresets = Util\r
- .getPresets(Tcoffee.class);\r
+ private static final PresetManager<Tcoffee> tcoffeePresets = Util.getPresets(Tcoffee.class);\r
\r
- private static final LimitsManager<Tcoffee> limitMan = compbio.engine.client.Util\r
- .getLimits(new Tcoffee().getType());\r
+ private static final LimitsManager<Tcoffee> limitMan = compbio.engine.client.Util.getLimits(new Tcoffee().getType());\r
\r
@Override\r
public String align(List<FastaSequence> sequences)\r
\r
WSUtil.validateFastaInput(sequences);\r
ConfiguredExecutable<Tcoffee> confTcoffee = init(sequences);\r
- List<String> params = WSUtil.getCommands(options,\r
- Tcoffee.KEY_VALUE_SEPARATOR);\r
+ List<String> params = WSUtil.getCommands(options, Tcoffee.KEY_VALUE_SEPARATOR);\r
log.info("Setting parameters:" + params);\r
confTcoffee.addParameters(params);\r
- return WSUtil.align(sequences, confTcoffee, log, "customAlign",\r
- getLimit(""));\r
+ return WSUtil.align(sequences, confTcoffee, log, "customAlign", getLimit(""));\r
}\r
\r
@Override\r
ConfiguredExecutable<Tcoffee> tcoffee = (ConfiguredExecutable<Tcoffee>) asyncEngine\r
.getResults(jobId);\r
Alignment al = tcoffee.getResults();\r
- // log(jobId, "getResults");\r
- return al;\r
+ return new Alignment (al.getSequences(), Program.Tcoffee, '-');\r
}\r
\r
@Override\r