Nextflow Pipeline
In this tutorial, we will show how to create and launch a pipeline using the Nextflow language in Platform Core.
This tutorial references the Basic pipeline example in the Nextflow documentation.
Create the pipeline
The first step in creating a pipeline is to create a Project. In the example below, the project is named Getting Started.


Open your project
Pipelines exist within a Project, so the first step is to determine which project you want to use as home of your pipeline. In the example below, our project is named Getting Started. You can open the project (Projects > your_project) where you want to create your pipeline or create a new project at Projects > + Create.
Configure the general setting
The pipeline details screen is where you give your pipeline a name, description and version number and select your nextflow version and storage size.
Name
The name by which users can identify your pipeline. The name must be unique within your tenant to prevent users from selecting the wrong pipeline.
Nextflow Version
Select the nextflow version you want to use. For our example, this can be kept at the default version.
Description
A short description of the pipeline.
Status
The release status of the pipeline. This is set to draft as we are editing this pipeline.
Proprietary (optional)
Restricts pipeline scripts and details to users in the owning tenant. Users outside the tenant also cannot clone the pipeline.
Icon
You can keep the default icon or select an alternative from the list of icons.
Version Number
Mandatory version number of your pipeline. Since this is the initial version, we can leave it at 1.0.0
Version Comment (optional)
You can provide additional information for this version of your pipeline here.
Storage size
Select a storage size for running the pipeline. Since this is a very small basic pipeline, the smallest size you can select here will still be large enough.
Links (optional)
Here you can add links to external information by selecting the + icon.

If you want to edit an existing pipeline later on, open it from projects > your_project > pipelines > your_pipeline by selecting the three dots at the top right and choosing Edit.
Add the nextflow files
The actual work is done by the Nextflow pipeline, so we need a pipeline definition. The pipeline in this example is a modified version of the Basic pipeline example from the Nextflow documentation.
This simple end-to-end Nextflow workflow consists of two processes connected together. The first process splits the FASTA file into multiple files (one per sequence), the second process reverses the contents of each split file before they are merged again.
Navigate to the Nextflow files > main.nf tab to add the definition to the pipeline. Since this is a single file pipeline, we don't need to add any additional definition files. Paste the following definition into the text editor:
Setting Process Resources (optional)
For each process, you can use the memory directive and cpus directive to set the Compute Types. Platform Core will then determine the best matching compute type based on those settings. Suppose you set memory '10 GB' and cpus 6, then Platform Core will determine you need the standard-large compute type.
Syntax example:
Create the input form
In order to run the pipeline, we need to be able to select the input file. The input form which we will create in this step is displayed when launching the pipeline and lets you select the input file. This is a JSON-based example, so the input form is created in the Inputform files tab.
The pipeline takes a single FASTA file as input, so we create a form which takes a single FASTA file as by having dataType set to file and dataFormat as FASTA. When both minValues and maxValues are set to 1, then a single file is mandatory input.
Paste the below JSON input form in the inputForm.json text editor.
After pasting the content, your inputForm.json will look similar to this:

If you want to see what your actual input form will look like, use the simulate button at the bottom of the screen. This will show the resulting simulated form.

Adding additional information (optional)
You can add information to your pipeline on the Documentation tab. Here you can add text, images and formatting to explain the details or purpose of your pipeline.
Your pipeline users can see this documentation by selecting the view documentation button when starting an analysis.

Launching the analysis
Obtain the input file
Before launching the analysis, you need a FASTA file to use as input. For this tutorial, use a public FASTA file from the UCSC Genome Browser. Download chr1_GL383518v1_alt.fa.gz and unzip the file to obtain the decompressed FASTA file.
Upload the file to Project Core
To upload the FASTA file to the project, navigate to Projects > your_project > Data. (1) In the Data view, drag and drop the FASTA file from your local machine in the input section (2) in the browser. Once file upload completes, the file will show up in the Data explorer (3).

The file format will be auto-detected to be a FASTA file. If auto-detection fails, you can set the file type yourself by selecting the file and selecting Manage > change format > FASTA.
Start the pipeline
Now that the input data is uploaded, we can proceed to launch the pipeline. Navigate to Projects > your_project > Flow > Analyses click on Start. Select your pipeline from the list and choose Select.
The pipeline input form will be displayed. Give your analysis a name in the user reference field, select a storage size and choose the previously uploaded input FASTA file.

With the required information set, click Start Analysis.
Monitoring the Analysis
Progress
After launching the pipeline, navigate to Projects > your_project > Flow > Analyses.

The analysis status will be visible from the Analyses view. The Status will transition through the analysis states as the pipeline progresses. It may take some time (depending on resource availability) for the environment to initialize and the analysis to move to the In Progress status. Once the pipeline succeeds, the analysis record will show Succeeded as status.
Viewing the Results
Analysis outputs are written to an output folder in the project with the naming convention {Analysis User Reference}-{Pipeline Code}-{GUID}. (1)
In the analysis output folder you will find the files generated by the analysis processes written to the out folder. In this tutorial, the file test.txt (2) is written to by the reverse process. Navigating to the analysis output folder, opening the test.txt file details, and selecting the VIEW tab (3) shows the output file contents.
Use the download button (4) if you want to download the data to the local machine.

Last updated
Was this helpful?





