PluginUtilities.doAlignment without the popup?
I have a DocumentOperation that performs a variety of tasks. At one point I have a series of sequences - let's call them A and B-Z. I want to align B-Z to A. I was looking to see if there were any helper capabilities within the API to do this.
I see PluginUtiltiies.doAlignment() and that is close to what I want. But I'd like to be able to get the same functionality (e.g. the Geneious Aligner) without going through the popup.
I'm not seeing similar, but more programatic, API access to this. Is there a way to get what I'm after?
-
Yes, you can do that but it'll require a bit more code than a single method call. All of the operations in Geneious Prime can be accessed programatically using the PluginUtilities class.
If you want to map some sequences to a reference then you want something like the following:
var mapper = PluginUtilities.getDocumentOperation("com.biomatters.plugins.alignment.AssemblyOperation_Reference");
Options mapperOptions = mapper.getOptions(annotatedDocuments);
List<AnnotatedPluginDocument> results = mapper.performOperation(progressListener, mapperOptions, annotatedDocuments);That'll work for your example if Geneious detects that the A in your example is likely to be a reference sequence. e.g. if it is the only sequence without a chromatogram or is sufficiently longer than the rest.
Let me know if that works for you. Otherwise you'll need to either:
- set the reference sequence programatically or
- extract out the reference sequence to a standalone document before passing it onto the operation
Both of which can be a bit more involved.
0
Please sign in to leave a comment.
Comments
1 comment