Skip to main content

PluginUtilities.doAlignment without the popup?

Comments

1 comment

  • Matthew Cheung

    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.