SequenceAnnotationGenerator in Workflow
Hello,
I want to expose options from a SequenceAnnotationGenerator plugin in a workflow, however, I am not sure how to do it. In my plugin I have added the following method:
public DocumentOperation[] getDocumentOperations() {
DocumentOperation operation = new DocumentOperation() {
@Override
public GeneiousActionOptions getActionOptions() {
GeneiousActionOptions actionOptions = new GeneiousActionOptions("Absawi Plugin", "Absawi Plugin", null, GeneiousActionOptions.Category.None);
actionOptions.setMainMenuLocation(GeneiousActionOptions.MainMenu.Sequence);
actionOptions.setInMainToolbar(false);
return actionOptions;
}
@Override
public String getHelp() {
return null;
}
@Override
public DocumentSelectionSignature[] getSelectionSignatures() {
return new DocumentSelectionSignature[0];
}
//Geneious will display the Options returned from this method as a panel before calling performOperation().
public Options getOptions(AnnotatedPluginDocument[] docs){
return new AnnotatorOptions();
}
@Override
public boolean isDocumentGenerator() {
return false;
}
@Override
public void performOperation(AnnotatedPluginDocument[] annotatedDocuments,
ProgressListener progressListener, Options options, SequenceSelection sequenceSelection,
OperationCallback callback) throws DocumentOperationException {
generateAnnotations(annotatedDocuments, null, progressListener, options);
}
};
return new DocumentOperation[] { operation };
}
But somehow, this does not do anything. The workflow annotates, but neither performoperation nor getOptions ever gets called.
0
-
Official comment
Hi Jo,
you may have to make use of
public Options getGeneralOptions() { return new AnnotatorOptions() }
if you want to make options show up for the workflow. Otherwise it will always run with default options.
-
Hey Jonas,
Many thanks for this info. I did not realize the solution was so simple. I have implemented the method and can confirm it works like a charm.
Greetings,
Jo
0
Please sign in to leave a comment.
Comments
2 comments