Calculation Methods

The three calculation methods defined by PopulationPluginInterface are used to specify the inputs desired by your plugin code, to invoke your plugin calculations at the appropriate time, and to return results of various types back to FlowJo for further processing. When your plugin calculation code is invoked, the algorithm is given as input either an FCS or CSV file containing the event-level data for the desired parameters. Your plugin code can return a variety of results to FlowJo through the returned ExternalAlgorithmResults object. This object wraps different result types that are used by FlowJo, such as a CSV derived parameter file, an image URL, GatingML definitions, tabular summary data, or derived parameter formulas. The calculation methods are described in more detail below:

ExportFileTypes useExportFileType()

This method returns an enumerated type, ExportFileTypes, to specify what type of input file to provide to your plugin algorithm. The returned ExportFileTypes is defined with the following values:

The input file is an FCS3.0 file

The input file is a CSV file with parameter data in absolute data scale

The input is a CSV file with parameter data in channel (transformed) values

No data input file is input to the algorithm

If a plugin is intended to use only one file type as input, such as CSV_SCALE, then the method can be written with a simple return statement. See the following example:

public ExportFileTypes useExportFileType() { return ExportFileTypes.CSV_SCALE; }

List<String> getParameters()

This method returns a list of parameter names when supplying the data values for the input file to your algorithm. When your algorithm method is invoked, the input data file will contain FCS parameters or CSV columns for each of the parameters in this list. If this method returns null or an empty list, then all parameters will be included in the input file.

ExternalAlgorithmResults invokeAlgorithm(SElement fcmlQueryElement, File dataFile, File outputFolder)

This method is called when the plugin node is created or when the parent population of the plugin node is modified, to allow your algorithm to calculate and return new results to FlowJo. The first argument, fcmlQueryElement, is an XML element used by FlowJo to fully describe the sample file, transforms, and gating hierarchy that defines the population. You can use this XML element with the PluginHelper class, described later, to get additional information about the input data. The second argument is the input data file, either an FCS or CSV file. This data file will only contain the values of the parent population of the plugin node, possibly a subset of the root sample file data. The third argument is the output folder, a location on the file system where the plugin code should write any files that are generated. By writing files in this folder, the FlowJo application will automatically manage those files when the workspace is saved as an ACS file, or the plugin is deployed on a FlowJo Enterprise server. This method returns an instance of ExternalAlgorithmResults, which is described in detail below. The ExternalAlgorithmResults object encapsulates all the different kinds of results that your plugin can return to FlowJo.

results matching ""

    No results matching ""