Post

2 followers Follow
0
Avatar

How to add a child of "Cloning"

I wonder if it is possible to add a child of "Cloning" in the toolbar.

I try to use GeneiousActionOptions.createSubmenuActionOptions(PluginUtilities.getDocumentOperation("XX").getActionOptions().getParentOptions(),new GeneiousActionOptions("","")), but when Geneious is launching and loading plugins, it seems that user plugins are loaded before "Cloning", and cannot locate the action of "Cloning".

 

Weixi Liao

Please sign in to leave a comment.

8 comments

0
Avatar

No, unfortunately we haven't made the Cloning menu available through the public api. Your next best option is probably the Tools menu.

What plugin are you working on if you don't mind me asking? We could be interested in listing it on our plugins page if you're interested.

Richard Moir 0 votes
Comment actions Permalink
0
Avatar

Thanks for answering.

I am working on a plugin importing a list to run a series of cloning operation, used in library construction for example. Another problem I meet is that I cannot set the options and perform the operation of digestion, and I am trying to rewrite a simple one.

The inputs of "workflow" cannot be customed other than document selection, is it?

Weixi Liao 0 votes
Comment actions Permalink
0
Avatar

Ok, what kind of digest are you doing? Restriction enzyme?

Richard Moir 0 votes
Comment actions Permalink
0
Avatar

Unfortunately our digest operation is not set up that well for scripting. What you need to do is annotate your sequence with "restriction site" type annotations for the enzymes you want to use then run our digest operation on that with default options. Here is an example BsaI restriction site which the digest operation will recognize:

SequenceAnnotation anno = new SequenceAnnotation("BsaI", "restriction site");
anno.addQualifier("Recognition pattern", "GGTCTC(1/5)");
anno.addInterval(new SequenceAnnotationInterval(472,477));

Alternatively you can digest the sequence manually using SequenceExtractionUtilities or by creating new sequence documents from scratch.

Richard Moir 0 votes
Comment actions Permalink
0
Avatar

Thanks, but I meet a new problem.

I add the annotations of "restriction site", and it works tested by "Digest ..." in "workflow", but when I call "performOperation", it fails.

 

DocumentOperation digest=PluginUtilities.getDocumentOperation("com.biomatters.plugins.restrictionAnalysis.DigestOperation");

List<AnnotatedPluginDocument> list=digest.performOperation(doclist, ProgressListener.EMPTY, digest.getOptions(doclist));

 

Is there anything wrong?

Weixi Liao 0 votes
Comment actions Permalink
0
Avatar

Are you getting the assertion about running in the swing thread? If so, you need to invokeAndWait like this:

DocumentOperation digest=PluginUtilities.getDocumentOperation("com.biomatters.plugins.restrictionAnalysis.DigestOperation");
final AtomicReference<Options> options = new AtomicReference<Options>();
ThreadUtilities.invokeNowOrWait(new Runnable() {
  public void run() {
    options.set(digest.getOptions(doclist));
  }
});
List<AnnotatedPluginDocument> list=digest.performOperation(doclist, ProgressListener.EMPTY, options.get());

Richard Moir 0 votes
Comment actions Permalink