ONT wf-transcriptomes v2.0.2 for DAU validation
Go to file
2021-02-04 14:26:36 +00:00
test_data First sketch 2021-01-29 15:04:44 +00:00
.dockerignore Update .dockerignore 2021-01-29 15:57:56 +00:00
.gitignore First sketch 2021-01-29 15:04:44 +00:00
.gitlab-ci.yml Condaenv 2021-01-29 18:05:35 +00:00
Dockerfile Update Dockerfile 2021-02-02 17:19:54 +00:00
environment.yaml Condaenv 2021-01-29 18:05:35 +00:00
LICENSE First sketch 2021-01-29 15:04:44 +00:00
nextflow.config Templating for multiple envs/containers 2021-02-04 14:26:27 +00:00
README.md Condaenv 2021-01-29 18:05:35 +00:00
workflow.nf Templating for multiple envs/containers 2021-02-04 14:26:27 +00:00

Workflow template

This repository contains a Nextflow workflow template and associated Docker container build. The workflow also supports using conda environments as an alternative software isolation method to Docker.

Quickstart

Building the container

This step is not necessary if you intend to run the workflow using conda environments.

The Docker container image can be built with the following command:

CONTAINER_TAG=template-workflow
docker build \
    -t ${CONTAINER_TAG} -f Dockerfile \
    --build-arg BASEIMAGE=epi2melabs/base-workflow-image:latest \
    .

The BASEIMAGE argument here can be changed to use an alternative image.

Running the workflow

The template includes a simple workflow that outputs a file with the lengths of sequences contained in a .fastq.gz file.

Running the workflow with Docker containers

To run the workflow using Docker containers supply the -profile standard argument to nextflow run:

OUTPUT=template-workflow
nextflow run workflow.nf \
    -w ${OUTPUT}/workspace \
    -profile standard \
    --reads test_data/reads.fq.gz \
    --out_dir ${OUTPUT}

The output of the pipeline will be found in ./template-workflow for the above example. This directory contains the nextflow working directories alongside the two primary outputs of the pipeline.

Using conda environments

To run the workflow backed by conda environments, simply provide the -profile conda argument to nextflow run.

# run the pipeline with the test data
OUTPUT=template-workflow
nextflow run workflow.nf \
    -w ${OUTPUT}/workspace \
    -profile conda \
    --reads test_data/reads.fq.gz \
    --out_dir ${OUTPUT}

This will create a conda environment with all required software within the workspace directory. When running multiple analyses on distinct datasets it may not be desirable to have Nextflow create a conda environment for each analysis. To avoid the situation editing the file nextflow.config will be necessary. Search for the term cacheDir and set this to a directory where you wish the conda environment to be placed.