public abstract class GeneiousGridDocumentOperation extends DocumentOperation
A grid-aware version of DocumentOperation, containing many
convenience features to simplify the task of creating a grid-aware DocumentOperation.
While you do not have to extend this class to create a grid-aware document operation, you must extend it if you want your operation to be part of a GeneiousGridWorkflow.
| Modifier and Type | Class and Description |
|---|---|
static class |
GeneiousGridDocumentOperation.GridInput
A class describing all the elements needed to run a program on the grid.
|
DocumentOperation.OperationCallback, DocumentOperation.Wrapper| Constructor and Description |
|---|
GeneiousGridDocumentOperation() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRunOnLocalGeneious() |
abstract String |
getExecutableName()
Returns the name of (or path to) the executable used for local runs (or null if the DocumentOperation does not support local runs)
|
String |
getGeneiousServerExecutableName()
If this operation returns true from
DocumentOperation.canRunOnGeneiousServer() then this method returns the executable
name used to run the operation on the server. |
Options |
getGeneralOptions()
Gets some Options that work for this document operation when invoked on any set of input sequences.
|
abstract GeneiousGridDocumentOperation.GridInput |
getGridInput(AnnotatedPluginDocument[] documents,
Options programOptions,
Options fullOptions)
Returns a
GeneiousGridDocumentOperation.GridInput object representing
all the files and command-line inputs needed to run a job on the grid |
String |
getHelpForFindingProgram()
Returns an HTML fragment that contains instructions to the user for downloading the program for local runs.
|
String |
getHTMLSummary(Options options)
Should return a summary of the operation that was run including all parameters sent to the command line application
and any other options that the user entered.
|
GeneiousGridImporter |
getImporter()
If this method returns a non-null value, then Geneious will use the returned
GeneiousGridImporter to produce documents from the results returned by the operation. |
static OperationLocationOptions |
getLocationOptions(Options options)
A utility method to get the location options (the options visible at the top of the options taken from
DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]) ) , |
Options |
getOptions(DocumentOperationInput operationInput)
Returns options for running the full grid operation (an almagimation of the options given by
getProgramOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]),
and some extra options describing where the job will run. |
abstract String |
getProgramName()
Returns the name of the program as given on the grid.
|
abstract Options |
getProgramOptions(AnnotatedPluginDocument... documents)
This method returns options for running the program
|
static Options |
getProgramOptions(Options options)
A utility method to get the program options (equivalent to options taken from
getProgramOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]) ,
given options taken from DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]) |
String |
getProgramVersion()
Returns the version of the program to run on the grid.
|
static Options |
getSelectedServiceOptions(Options options)
A utility method to get the configuration options for the service this operation has been chosen to run on.
|
static boolean |
isRemoteRun(Options options)
Returns true if the job represented by the given options (from
DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]))
is a remote run. |
void |
performOperation(AnnotatedPluginDocument[] documents,
ProgressListener progress,
Options _options,
SequenceSelection sequenceSelection,
DocumentOperation.OperationCallback callback)
Do not use.
|
List<AnnotatedPluginDocument> |
runLocally(AnnotatedPluginDocument[] documents,
ProgressListener progressListener,
Options programOptions,
Options fullOptions,
String executableLocation)
GeneiousGridDocumentOperations that support local runs must implement either this method or
#runLocally(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[], jebl.util.ProgressListener, Options, Options, String, OperationCallback)
Performs a local run of the program, and returns any documents that are generated. |
void |
runLocally(AnnotatedPluginDocument[] documents,
ProgressListener progressListener,
Options programOptions,
Options fullOptions,
String executableLocation,
DocumentOperation.OperationCallback callback)
GeneiousGridDocumentOperations that support local runs must implement either this method or
runLocally(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[], jebl.util.ProgressListener, Options, Options, String)
Performs a local run of the program, and adds any documents that are generated to an OperationCallback. |
List<AnnotatedPluginDocument> |
runLocally(List<AnnotatedPluginDocument> documents,
ProgressListener progressListener,
Options programOptions,
Options fullOptions,
String executableLocation)
GeneiousGridDocumentOperations that support local runs should implement this method.
|
canRunOnGeneiousServer, getActionOptions, getFractionOfTimeToSaveResults, getHelp, getLocationOptions, getOptions, getOptions, getOptions, getOptions, getOrderDependentOperationMessage, getSelectionSignatures, getUniqueId, isDocumentGenerator, loadDocumentsBeforeRunningOperation, loadDocumentsBeforeShowingOptions, performOperation, performOperation, performOperation, performOperationpublic abstract String getExecutableName()
public abstract String getProgramName()
public String getProgramVersion()
public String getHelpForFindingProgram()
public void runLocally(AnnotatedPluginDocument[] documents, ProgressListener progressListener, Options programOptions, Options fullOptions, String executableLocation, DocumentOperation.OperationCallback callback) throws DocumentOperationException
runLocally(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[], jebl.util.ProgressListener, Options, Options, String)
Performs a local run of the program, and adds any documents that are generated to an OperationCallback.documents - The user-selected input documentsprogressListener - a progress listenerprogramOptions - the options returned by getProgramOptions(AnnotatedPluginDocument[])fullOptions - the options returned by DocumentOperation.getOptions(AnnotatedPluginDocument[])executableLocation - a string representing the location of the program executable on diskcallback - a callback to add documents to as they are generatedDocumentOperationException - if something goes wrongpublic List<AnnotatedPluginDocument> runLocally(AnnotatedPluginDocument[] documents, ProgressListener progressListener, Options programOptions, Options fullOptions, String executableLocation) throws DocumentOperationException
#runLocally(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[], jebl.util.ProgressListener, Options, Options, String, OperationCallback)
Performs a local run of the program, and returns any documents that are generated.documents - The user-selected input documentsprogressListener - a progress listenerprogramOptions - the options returned by getProgramOptions(AnnotatedPluginDocument[])fullOptions - the options returned by DocumentOperation.getOptions(AnnotatedPluginDocument[])executableLocation - a string representing the location of the program executable on diskDocumentOperationException - if something goes wrongpublic final List<AnnotatedPluginDocument> runLocally(List<AnnotatedPluginDocument> documents, ProgressListener progressListener, Options programOptions, Options fullOptions, String executableLocation) throws DocumentOperationException
documents - The user-selected input documentsprogressListener - a progress listenerprogramOptions - the options returned by getProgramOptions(AnnotatedPluginDocument[])fullOptions - the options returned by DocumentOperation.getOptions(AnnotatedPluginDocument[])executableLocation - a string representing the location of the program executable on diskDocumentOperationException - if something goes wrongpublic abstract GeneiousGridDocumentOperation.GridInput getGridInput(AnnotatedPluginDocument[] documents, Options programOptions, Options fullOptions) throws DocumentOperationException
GeneiousGridDocumentOperation.GridInput object representing
all the files and command-line inputs needed to run a job on the griddocuments - the user-selected documentsprogramOptions - the options returned by getProgramOptions(AnnotatedPluginDocument[])fullOptions - the options returned by DocumentOperation.getOptions(AnnotatedPluginDocument[])GeneiousGridDocumentOperation.GridInput object representing
all the files and command-line inputs needed to run a job on the gridDocumentOperationException - if something goes wrongpublic GeneiousGridImporter getImporter()
GeneiousGridImporter to produce documents from the results returned by the operation. Geneious will give the importer a folder containing all the files specified in getGridInput(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[], Options, Options) and also any output files produced by the operation.GeneiousGridImporter capable of importing results for this operation, or null to import no documents.public String getHTMLSummary(Options options)
options - the options generated by DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]) .public static boolean isRemoteRun(Options options)
DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]))
is a remote run.options - options taken from DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[])public final void performOperation(AnnotatedPluginDocument[] documents, ProgressListener progress, Options _options, SequenceSelection sequenceSelection, DocumentOperation.OperationCallback callback) throws DocumentOperationException
DocumentOperationDocumentOperation.performOperation(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[], jebl.util.ProgressListener, Options)
which may provide the currently selected region of any sequence in the documents. eg. if a region of a sequence
is slected in the Sequence View then the selection will be passed in.
It also provides a callback which allows you to specify points from which this operation can be resumed, and to return documents while the operation is in progress.performOperation in class DocumentOperationdocuments - the documents to apply the operation to. These must be the same documents as those passed to DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]).progress - report progress for slow operations. If the progressListener requests that the operation cancels, the operation may choose to throw a DocumentOperationException.Canceled_options - the options returned from getOptionssequenceSelection - the currently selected region of any sequence in the documents, never null but may be an empty selectioncallback - provides a mechanism to specify persistent data so that the operation can be resumed, and also a mechanism to return documents while the operation is in progress (see DocumentOperation.OperationCallback)DocumentOperationException - when something goes wrong.public abstract Options getProgramOptions(AnnotatedPluginDocument... documents) throws DocumentOperationException
documents - user-selected documentsDocumentOperationException - if something goes wrongpublic boolean canRunOnLocalGeneious()
canRunOnLocalGeneious in class DocumentOperationpublic final Options getOptions(DocumentOperationInput operationInput) throws DocumentOperationException
getProgramOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]),
and some extra options describing where the job will run.getOptions in class DocumentOperationoperationInput - the operation inputDocumentOperationException - if something goes wrongDocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[])public final Options getGeneralOptions() throws DocumentOperationException
DocumentOperationgetGeneralOptions in class DocumentOperationOptions.valuesToXML(String) and Options.valuesFromXML(org.jdom.Element)DocumentOperationException - if this document operation does not support general options.public static Options getSelectedServiceOptions(Options options)
options - options taken from DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[])public static Options getProgramOptions(Options options)
getProgramOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]) ,
given options taken from DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[])options - options taken from DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[])public static OperationLocationOptions getLocationOptions(Options options)
DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[]) ) ,options - options taken from DocumentOperation.getOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument[])public String getGeneiousServerExecutableName()
DocumentOperation.canRunOnGeneiousServer() then this method returns the executable
name used to run the operation on the server. The executable is then expected to be on the path for Geneious
Server.
The default implementation of this method returns getExecutableName().