private final AlignmentI dataset;
+ private final AlignViewport viewport;
+
private final List<AlignedCodonFrame> codonFrame = new ArrayList<>();
private List<ArgumentI> args = Collections.emptyList();
this.alnTitle = alnTitle;
this.submitGaps = submitGaps;
this.preserveOrder = preserveOrder;
+ this.viewport = viewport;
this.gapCharacter = viewport.getGapCharacter();
String panelInfo = String.format("%s using service hosted at %s%n%s",
@Override
public void startJobs() throws IOException
{
+ Cache.log.info(format("Starting new %s job.", service.getName()));
String outputHeader = String.format("%s of %s%nJob details%n",
submitGaps ? "Re-alignment" : "Alignment", alnTitle);
SequenceI[][] conmsa = msa.getVisibleContigs('-');
WSJob job = new WSJob(service.getProviderName(), service.getName(),
service.getHostName());
job.setJobNum(wsInfo.addJobPane());
- if (conmsa.length > 0)
+ if (conmsa.length > 1)
{
wsInfo.setProgressName(String.format("region %d", i),
job.getJobNum());
boolean done = true;
for (WSJob job : getJobs())
{
- if (!job.getStatus().isDone())
+ if (!job.getStatus().isDone() && !job.getStatus().isFailed())
{
Cache.log.debug(format("Polling job %s.", job));
try
Cache.log.debug(
format("Job %s status is %s", job, job.getStatus()));
}
- done &= job.getStatus().isDone();
+ done &= job.getStatus().isDone() || job.getStatus().isFailed();
}
updateWSInfoGlobalStatus();
return done;
Map<Long, AlignmentI> results = new LinkedHashMap<>();
for (WSJob job : getJobs())
{
+ if (job.getStatus().isFailed())
+ continue;
try
{
- AlignmentI alignment = supplier.getResult(job);
+ AlignmentI alignment = supplier.getResult(job, dataset.getSequences(), viewport);
if (alignment != null)
{
results.put(job.getUid(), alignment);
}
else
{
- String seqString = null;
- if (seq.getEnd() >= seq.getStart()) // is it ever false?
+ String seqString = "";
+ if (seq.getEnd() >= seq.getStart()) // true if gaps only
{
seqString = seq.getSequenceAsString();
if (!submitGaps)