-package compbio.ws.client;
+ package compbio.ws.client;
import compbio.metadata.AllTestSuit;
import static org.testng.Assert.assertEquals;
public class TestRNAalifoldWS {
- FoldWS<RNAalifoldWS> foldws;
+ SequenceAnnotation<RNAalifoldWS> foldws;
@BeforeTest(groups = {AllTestSuit.test_group_webservices})
void initConnection() {
try {
JABAService client = Jws2Client.connect(
"http://localhost:8080/jabaws", Services.RNAalifoldWS);
- foldws = (FoldWS<RNAalifoldWS>) client;
+ foldws = (SequenceAnnotation<RNAalifoldWS>) client;
} catch (ConnectException e) {
e.printStackTrace();
fail(e.getMessage());
Alignment aln = ClustalAlignmentUtil.readClustalFile(new FileInputStream(
AllTestSuit.test_input_aln));
+ List<FastaSequence> fsl = aln.getSequences();
+
try {
List<Option<RNAalifoldWS>> options = new ArrayList<Option<RNAalifoldWS>>();
options.add(foldws.getRunnerOptions().getArgumentByOptionName("--mis"));
+ options.add(foldws.getRunnerOptions().getArgumentByOptionName("-p"));
+ options.add(foldws.getRunnerOptions().getArgumentByOptionName("--MEA"));
+
System.out.println("TestRNAalifoldWS: print options: " + options.toString());
- String jobId = foldws.customFold(aln, options);
+
+ String jobId = foldws.customAnalize(fsl, options);
System.out.println("J: " + jobId);
- String result = foldws.getResult(jobId);
- System.out.println("fold results: \n" + result);
+ ScoreManager result = foldws.getAnnotation(jobId);
+ System.out.println("fold results: \n" + result.asRNAStruct().toString());
assertNotNull(result);
} catch (UnsupportedRuntimeException e) {
super (new RNAalifold(), log);
}
- /*
- * No options are supported, thus the result of this call will be as simple
- * call to analize without parameters
- */
- @Override
- public String customAnalize(List<FastaSequence> sequences,
- List<Option<RNAalifold>> options) throws UnsupportedRuntimeException,
- LimitExceededException, JobSubmissionException,
- WrongParameterException {
-
- return analize(sequences);
- }
/*
* No presets are supported, thus the result of this call will be as simple
throw LimitExceededException.newLimitExceeded(limit, sequences);\r
}\r
log.debug("Method: " + method + " with task: " + confExec.getTaskId());\r
-\r
- compbio.runner.Util.writeInput(sequences, confExec);\r
+ // Change this line for RNAalifold testing\r
+ // compbio.runner.Util.writeInput(sequences, confExec);\r
+ compbio.runner.Util.writeClustalInput(sequences, confExec, '-');\r
AsyncExecutor engine = Configurator.getAsyncEngine(confExec);\r
String jobId = engine.submitJob(confExec);\r
reportUsage(confExec, log);\r