Premium Feature — Available with all Premium Editions of LabKey Server. Learn more or contact LabKey.

A script pipeline lets you run scripts and commands in a sequence, where the output of one script becomes the input for the next in the series. The pipeline supports any of the scripting languages that can be configured for the server, including R, JavaScript, Perl, Python, SAS, and others.

With Premium Editions of LabKey Server, script pipelines are available as file watchers, so that they may be run automatically when desired files appear in a watched location.

Define Script Pipelines

Script pipelines are defined in modules, and will be available as file watchers in any folder where that module is enabled.

Using the instructions in this topic, define the tasks and pipelines in the module of your choice:

For example, you might use a "helloworld" module and define two pipelines, named "Generate Matrix and Import into 'myassay'" and "Use R to create TSV file during import".

Next, enable the module containing your pipeline in any folder where you want to be able to use the script pipelines as file watchers.

  • Select (Admin) > Folder > Management > Folder Type.
  • Check the module and click Update Folder.

Once the module is enabled, you will see your script pipelines on the folder management Import tab alongside the predefined tasks for your folder type:

Customize Help Text

The user interface for defining file watchers includes an information box that begins "Fields marked with an asterisk * are required." You can place your own text in that same box after that opening phrase by including a <help> element in your script pipeline definition (*.pipeline.xml file).

<pipeline xmlns=""
name="hello" version="0.0">
<description>Generate Matrix and Import into 'myassay'</description>
<help>Custom help text to explain this script pipeline.</help>
<taskref ref="HelloWorld:task:hello"/>

Configure File Watcher

As with other file watchers, give it a name and provide the Details and Configuration information using the Create Pipeline Trigger wizard. See Create a File Watcher for details.

Prevent Usage of Script Pipeline with File Watcher

If you want to disable usage of a specific script pipeline as a file watcher entirely, include in your *.pipeline.xml file setting the triggerConfiguration:allow parameter to false. Syntax would look like:

<pipeline xmlns=""
name="hello2" version="0.0">
<description>Use R to create TSV file during import</description>
<taskref ref="HelloWorld:task:hello"/>
<triggerConfiguration allow="false"/>

Related Topics


Was this content helpful?

Log in or register an account to provide feedback

expand all collapse all