import java.util.ArrayList;
import java.util.List;
-import java.util.function.Consumer;
import org.junit.Test;
}
String jobid = msaservice.align(iseqs);
- if (jobid != null) {
- JobStatus js = null;
- do {
- try {
- Thread.sleep(500);
- } catch (InterruptedException q) {
- }
- ;
- js = msaservice.getJobStatus(jobid);
- } while (!js.equals(JobStatus.FAILED)
- && !js.equals(JobStatus.CANCELLED)
- && !js.equals(JobStatus.FINISHED));
- assertEquals("Trial alignment failed. State was " + js.name(),
- js, JobStatus.FINISHED);
- assertEquals(
- "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
- msaservice.getResult(jobid).getSequences().size(),
- iseqs.size());
- msaservice.getResult(jobid).getSequences()
- .forEach(new Consumer<FastaSequence>() {
- @Override
- public void accept(FastaSequence t) {
- System.out.println(">"+t.getId());
- System.out.println(t.getFormattedFasta());
- }
- });
+ if (jobid != null)
+ {
+ JobStatus js = null;
+ do
+ {
+ try
+ {
+ Thread.sleep(500);
+ } catch (InterruptedException q)
+ {
+ }
+ ;
+ js = msaservice.getJobStatus(jobid);
+ } while (!js.equals(JobStatus.FAILED)
+ && !js.equals(JobStatus.CANCELLED)
+ && !js.equals(JobStatus.FINISHED));
+ assertEquals("Trial alignment failed. State was " + js.name(), js,
+ JobStatus.FINISHED);
+ assertEquals(
+ "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
+ msaservice.getResult(jobid).getSequences().size(),
+ iseqs.size());
+ for (FastaSequence t : msaservice.getResult(jobid).getSequences())
+ {
+ System.out.println(">" + t.getId());
+ System.out.println(t.getFormattedFasta());
+ }
+ // .forEach(new Consumer<FastaSequence>() {
+ // @Override
+ // public void accept(FastaSequence t) {
+ // System.out.println(">"+t.getId());
+ // System.out.println(t.getFormattedFasta());
+ // }
+ // });
}
}