Nextflow module

We provide a nextflow pipeline to run in batch the automatic steps (RepeatModeler2, Heliano, MCHelper automatic) needed for manual curation using the app. The only requirement is to have a conda flavour and to install the pipeline layer of the TEamo environment with bash configure.sh --nextflow (see envs/pipeline.yml). It is a vendorized version of the project TEamo_nf started by @dmckeow.

At the moment, the nextflow pipeline is able to:

  • Connect to NCBI and download a genome assembly by providing the accession number.

  • Process local genome assemblies by providing the path.

  • Compatible with local system and SLURM HPC systems. With some knowledge of Nextflow it can be configured for any other systems (we thank a lot PR!).

Usage

  1. Configure the pipeline (only once). The default configure.sh performs a curator-only installation without TE discovery, the Nextflow pipeline and HiTE, so run:
bash configure.sh --nextflow
  1. Activate conda environment
conda activate TEamo
  1. Create a samplesheet.tsv file as input. We provide a test file samplesheet_test.tsv and a template file samplesheet_template.tsv as examples. This file is a tab-separated file with headers and, at least, 6 columns:
Column Description
fasta Path to genome FASTA file.
accession NCBI accession code. Used to download via NCBI datasets.
species Sample name used in outputs. Allowed characters: letters, numbers, _, ..
strain Secondary identifier. Must be unique across all samples.
busco_db BUSCO lineage (e.g. diptera_odb10). See official webpage or execute busco --list-datasets for a more updated list.
rawLib (Optional) Path to existing raw TE library in FASTA. If provided, TE discovery tools (RM2, Heliano, HiTE) are skipped.
  1. Execute nextflow run nextflow/main.nf. Note that the first run might take a while, specially with conda/mamba profiles as they need to be created by nextflow.
Flag Description
--input Path to input samplesheet file (default: samplesheet.tsv)
--workdir Path to directory in which to store intermediate outputs (default: ./work).
--threads Number of threads to use (default: 4).
--mem_per_cpu Amount of memory assigned per thread (default: 2.GB)
--heliano If true, Heliano will also be run (default: true)
--hite If true, HiTE will be run (default: true)
--teamo_env Path to the existing TEamo conda environment (default: the active env if it is TEamo, otherwise <conda base>/envs/TEamo)
-stub-run Nextflow built-in option for development/testing; executes stub: blocks for quicker test runs

Running the example test pipeline

The repository ships with a ready-to-use test samplesheet (samplesheet_test.tsv) containing two entries:

Entry Description
dev / N2 C. elegans N2 genome subsample — very fast, good for verifying the installation
dev / toy D. melanogaster genome with a pre-provided TE library — skips TE discovery tools, good for exploring the curation app

Run the test pipeline with:

conda activate TEamo
nextflow run nextflow/main.nf --input samplesheet_test.tsv --threads 4

For a quick smoke test without running actual tools:

nextflow run nextflow/main.nf --input samplesheet_test.tsv -stub-run

On HPC with SLURM

Warning: this needs to be tested, I have not tried

sbatch nextflow/sbatch.sh nextflow run nextflow/main.nf -profile standard,slurm