The PluginHelper class
com.treestar.lib.PluginHelper provides a number of convenience methods you can use in your plugin code. The input to the PluginHelper’s methods is the XML element argument that is passed into to your plugin methods.
The following helper methods are used by your Population Plugin:
String getSampleURI(SElement fcmlElem)
Returns the sample data file’s URI.
String getSampleName(SElement fcmlElem)
This method returns the name of the sample file as found in the sample’s URI.
int getNumTotalEvents(SElement fcmlElem)
Returns the total number of events in the sample data file (not the number of events in the parent population).
int getNumExportedEvents(SElement fcmlElem)
This method returns the number of events in the plugin node’s parent population.
void createClusterParameter(ExternalAlgorithmResults results, String parameterName, File parameterCSV)
The create cluster parameter method will add information to the ExternalAlgorithmResults object, results. The input CSV file must have a header, and a row for every event in the sample, even if a subpopulation is the algorithm's input. It is sufficient to write a "0" in rows that do not belong to the subpopulation.
The following helper methods are used by your Workspace Plugin:
String getWorkspaceName(SElement workspaceElement)
This method returns the name of the FlowJo workspace.
File getWorkspaceAnalysisFolder(SElement workspaceElement)
This method returns a File that is the folder location of the FlowJo workspace file.
Map<String, Map<String, Map <String, Double>>> collectStats(SElement workspaceElement)
This convenience method returns a map of maps that collects all the statistics and gate counts for each population in the FlowJo workspace. The key to the outer map is the sample name of all samples contained in the FlowJo workspace. Each sample name in this map refers to a secondary map whose key is a population path name, such as “Singlets/Live/Lymphocytes/TCells”. This population name is the key to a tertiary map whose key is the name of a statistic and whose value is the numerical value for that statistic.