The User added tasks feature in Partek® Flow® allows administrators to add their own executables and scripts to the set of analysis tools available on a given installation. These tasks can then be run through the Partek Flow graphical user interface and can be included as part of analysis pipelines. 

The process of adding a task is only available to users with administrative privileges. However, once the task has been added to an instance of Partek Flow, all other users, including regular users, can use the task.

The instructions below assume that you are logged in as an admin.

Licensing

The User added tasks feature is a part of the Partek Flow Enterprise offerings and requires a separate license. Having this license allows the addition of new user added tasks and allows existing user added tasks to be run individually or within pipelines. To check if your installation is licensed, go to Settings > Licensing and make sure that the User added tasks is licensed (Figure 1).


Creation

Prior to beginning, the analysis tool needs to be downloaded and installed in a directory the Partek Flow user has access to. The executable (or a symbolic link to it) must be in this directory: FLOWhome/user_tasks, where FLOWhome is the location of the database directory. This directory and any binaries within it must be available to all workers in a cluster install environment.

To create a new user added task, go to Settings > Task management. Select the Add task button and choose Create new task in the pop-up dialog (Figure 2).



The creation of a new user added task has four steps:


The task creation wizard will guide you through each step. Please consult the user documentation of the analysis tool you wish to add for details to enter into the task creation wizard.

Task details


 

In the Task details step (Figure 3), provide the following:

Click Next to proceed to the Input step


Input

In the Input step, specify what type of data the task can run on and how to pass that data on the command line (Figure 7). 


You can optionally include Sample information as an argument to pass to the command (Figure 8). Select Include sample info and enter the Sample info parameter. The parameter is used to specify the sample information file on the command line. 



A tab-delimited text file will be passed to the command line using the specified parameter. Each row in the file will be composed of the File name, Sample name, and its associated attributes in that project (Figure 9). When running the command on All samples, the text file will have all sample files as rows. When running the command as Each sample then there will be one info file per command and it will only contain the rows for the files in that sample.


Output

The expected outputs of the task must be defined and configured. To add a new output, select the Add output button (Figure 10), then configure the dialog (Figure 11).





After configuring the dialog, click Save. The Output will appear in the Table (Figure 12). Any existing output can be edited or deleted using the action buttons on the far right of the table.



Options

Additional input options to the command line can be configured. To add a new input, select the Add option button (Figure 13), then configure the dialog (Figure 14).


 


After configuring the dialog field, click Save. The Option will appear in the Table as in Figure 15. Any existing option can be edited  or deleted  using the action buttons on the far right of the table.

Complete the addition of the User added task by clicking the Finish button from the Options step.

Management

The new task will show up as an entry in the Task management table (Figure 16).


Like native Partek Flow tasks this task can have its system wide version set, and can be globally enabled or disabled. Unlike native Partek Flow tasks, there are additional actions that can be taken on user added tasks:

 - Download: Downloads the task definition as a file that can be imported into other Partek Flow installations.

 - Edit: Opens the add task wizard with all fields pre-filled. This is a clone operation, so a new task name or version must be selected.

- Delete: Removes the task

Running a Task

User added tasks appear in the context sensitive Task Menu when a selected data node matches the Input data type (Figure 17).


If there are additional options that need to be defined, a task wizard will appear (Figure 18).


The Name of the User added task will appear as a task node in the Analyses tab (Figure 19).



Integration Scripts


User added tasks has some format restrictions for passing arguments to the command line.

For example, a binary that has multiple positional arguments cannot be directly wrapped. To execute these binaries through Partek Flow’s User added tasks, one must first wrap the binary in a script that can, for example, parse parameterized arguments into positional arguments. This can be done using any scripting language executable by the Partek Flow server.

User added tasks also require a single binary per task. So if you wish to execute multiple steps and have that represented as a single task in Partek Flow, one must first wrap those steps in a script that can be imported into Partek Flow.