import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentView;
+import jalview.datamodel.HiddenColumns;
import jalview.datamodel.SeqCigar;
import jalview.datamodel.SequenceI;
import jalview.io.AlignFile;
import jalview.ws2.api.JobStatus;
import jalview.ws2.client.api.SecStructPredWebServiceClientI;
-public class SecStructPredTask extends BaseTask<BaseJob, AlignmentI>
+public class SecStructPredTask extends BaseTask<SecStructPredJob, AlignmentI>
{
private final SecStructPredWebServiceClientI client;
}
@Override
- protected List<BaseJob> prepareJobs() throws ServiceInputInvalidException
+ protected List<SecStructPredJob> prepareJobs()
+ throws ServiceInputInvalidException
{
SeqCigar[] msf = alignmentView.getSequences();
SequenceI referenceSeq = msf[0].getSeq('-');
}
@Override
- protected AlignmentI collectResult(List<BaseJob> jobs) throws IOException
+ protected AlignmentI collectResult(List<SecStructPredJob> jobs)
+ throws IOException
{
var job = jobs.get(0); // There shouldn't be more than one job
var status = job.getStatus();
return null;
JPredFile predictionFile = client.getPredictionFile(job.getServerJob());
AlignFile alignmentFile = client.getAlignmentFile(job.getServerJob());
- // Object[] alnAndHiddenCols =
- // alignmentView.getAlignmentAndHiddenColumns(gapChar);
- // SequenceI[] sequences = (SequenceI[]) alnAndHiddenCols[0];
- var sequences = alignmentFile.getSeqsAsArray();
- // HiddenColumns hiddenCols = (HiddenColumns) alnAndHiddenCols[1];
- var aln = new Alignment(sequences);
- int firstSeq = 0;
+
+ Object[] alnAndHiddenCols = alignmentView
+ .getAlignmentAndHiddenColumns(gapChar);
+ SequenceI[] sequences = (SequenceI[]) alnAndHiddenCols[0];
+ Alignment aln = new Alignment(sequences);
+ HiddenColumns alhidden = (HiddenColumns) alnAndHiddenCols[1];
aln.setDataset(currentView.getDataset());
try
{
- JnetAnnotationMaker.add_annotation(predictionFile, aln, firstSeq, false);
+ JnetAnnotationMaker
+ .add_annotation(predictionFile, aln, 0, false, job.getDelMap());
} catch (Exception e)
{
throw new IOException(e);
getClass().getSimpleName());
}
}
- aln.setSeqrep(aln.getSequenceAt(firstSeq));
+ aln.setSeqrep(aln.getSequenceAt(0));
return aln;
}