- 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());
- List<FastaSequence> seqList = msaservice.getResult(jobid).getSequences();
- for(FastaSequence fSeq : seqList){
- System.out.println(">"+fSeq.getId());
- System.out.println(fSeq.getFormattedFasta());
- }
- }
+ 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());
+ 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());
+ // }
+ // });
+ }