import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Map;
referenceSeq.setSequence(alignmentView.getASequenceString('-', 0));
for (int i = 0; i < sequences.length; i++)
sequences[i].setSequence(alignmentView.getASequenceString('-', i));
- var sequencesList = filterEmptySequences(sequences);
- var job = new SecStructPredJob(sequencesList, referenceSeq, delMap,
- sequenceInfo);
+ var nonEmptySeqs = SeqsetUtils.getNonEmptySequenceSet(sequences);
+ var job = new SecStructPredJob(Arrays.asList(nonEmptySeqs),
+ referenceSeq, delMap, sequenceInfo);
job.setStatus(JobStatus.READY);
return List.of(job);
}
- private static List<SequenceI> filterEmptySequences(SequenceI[] seqs)
- {
- var filtered = new ArrayList<SequenceI>();
- for (var seq : seqs)
- if (seq.getEnd() - seq.getStart() > 0)
- filtered.add(seq);
- return filtered;
- }
-
@Override
protected AlignmentI collectResult(List<SecStructPredJob> jobs)
throws IOException