In this tutorial, we will demonstrate how to create and launch a Nextflow pipeline using the ICA command line interface (CLI).
Please refer to these instructions for installing ICA CLI. To authenticate, please follow the steps in the Authentication page.
In this tutorial, we will create Simple RNA-Seq workflow in ICA. The workflow includes four processes: index creation, quantification, FastQC, and MultiQC. We will also upload a Docker container to the ICA Docker repository for use within the workflow.
The 'main.nf' file defines the workflow that orchestrates various RNASeq analysis processes.
The script uses the following tools:
Salmon: Software tool for quantification of transcript abundance from RNA-seq data.
FastQC: QC tool for sequencing data
MultiQC: Tool to aggregate and summarize QC reports
We need a Docker container consisting of these tools. You can refer to the "Build and push to ICA your own Docker image" section in the help page to build your own docker image with the required tools. For the sake of this tutorial, we will use the container from the original tutorial
With Docker installed in your computer, download the image required for this project using the following command.
docker pull nextflow/rnaseq-nf
Create a tarball of the image to upload to ICA.
Following are lists of commands that you can use to upload the tarball to your project.
Add the image to the ICA Docker repository
The uploaded image can be added to the ICA docker repository from the ICA Graphical User Interface (GUI).
Change the format for the image tarball to DOCKER:
Navigate to Projects > <your_project> Data
Check the checkbox for the uploaded tarball
Click on "Manage" dropdown
Click on "Change format" In the new popup window, select "DOCKER" format and hit save.
To add this image to the ICA Docker repository, first click on "All Projects" to go back to the home page.
From the ICA home page, click on the "Docker Repository" page under "System Settings"
Click the "+ New" button to open the "New Docker Image" window.
In the new window, click on the "Select a file with DOCKER format"
This will open a new window that lets you select the above tarball.
Select the region (US, EU, CA) your project is in.
Select your project. You can start typing the name in the textbox to filter it.
The bottom pane will show the "Data" section of the selected project. If you have the docker image in subfolders, browse the folders to locate the file. Once found, click on the checkbox corresponding to the image and press "Select".
You will be taken back to the "New Docker image" window. The "Data" and "Name" fields will have been populated based on the imported image. You can edit the "Name" field to rename it. For this tutorial, we will change the name to "rnaseq". Select the region, and give it a version number, and description. Click on "Save".
If you have the images hosted in other repositories, you can add them as external image by clicking the "+ New external image" button and completing the form as shown in the example below.
After creating a new docker image, you can double click on the image to get the container URL for the nextflow configuration file.
Create a configuration file called "nextflow.config" in the same directory as the main.nf file above. Use the URL copied above to add the process.container
line in the config file.
You can add a pod directive within a process or in the config file to specify a compute type. The following is an example of a configuration file with the 'standard-small' compute type for all processes. Please refer to the Compute Types page for a list of available compute types.
The parameters file defines the workflow input parameters. Refer to the help page for detailed information for creating correctly formatted parameters files.
An empty form looks as follows:
The input files are specified within a single dataInputs node with individual input file specified in a separate dataInput node. Settings (as opposed to files) are specified within the steps node. Settings represent any non-file input to the workflow, including but not limited to, strings, booleans, integers, etc..
For this tutorial, we do not have any settings parameters but it requires multiple file inputs. The parameters.xml file looks as follows:
Use the following commands to create the pipeline with the above workflow in your project.
If not already in the project context, enter it by using the following command:
icav2 enter <PROJECT NAME or ID>
Create pipeline using icav2 project pipelines create nextflow
Example:
If you prefer to organize the processes in different folders/files, you can use --other
parameter to upload the different processes as additional files. Example:
You can refer to Nextflow: Pipeline Lift page to explore options to automate this process.
Refere to Launch Pipelines on CLI for details on running the pipeline from CLI.
Example command to run the pipeline from CLI:
You can get the pipeline id under "ID" column by running the following command:
You can get the file ids under "ID" column by running the following commands:
Please refer to command help (icav2 [command] --help
) to determine available flags to filter output of above commands if necessary. You can also refer to Command Index page for available flags for the icav2 commands.
For more help on uploading data to ICA, please refer to the Data Transfer options page.
Additional Resources: