Skip to content

Nextflow Long Reads Eukaryotic Genome Analysis Workflow

rlopez edited this page Jul 31, 2026 · 2 revisions

Engine: Nextflow  ·  Workflow ID: long_reads_eukaryotic_genome_analysis  ·  Path in repo: nextflow/workflows/long_reads_eukaryotic_genome_analysis/

This workflow reconstructs and characterises a eukaryotic genome from long-read sequencing data, using short reads as a second, higher-accuracy line of evidence: starting from raw reads alone, with no reference assembly to align against, it produces a polished draft genome, the protein-coding genes predicted on it, and the biological function of those genes. It assumes PacBio or Oxford Nanopore long reads of a eukaryotic organism together with a short-read library — single-end or paired-end — whose only role is to polish the assembly, and it covers the whole chain in one run: long-read quality control and trimming, de novo assembly, assembly evaluation, hybrid polishing, completeness assessment, repeat masking, evidence-aware or ab initio gene finding, and functional annotation of the predicted proteins. The pipeline orchestrates the OmicsBox genome analysis and BLAST2GO annotation suites, from LongQC and Flye through QUAST, BWA, Pilon, BUSCO, RepeatMasker and AUGUSTUS, to DIAMOND BLAST, InterProScan, GO mapping and annotation, and the final InterPro-to-annotation merge.


Workflow Architecture

flowchart TD
    %% ---- Inputs ----
    IN1[/"Long reads FASTQ"/]:::input
    IN2[/"Short reads FASTQ"/]:::input
    IN3[/"Reference genome"/]:::input
    IN4[/"Repeat database"/]:::input
    IN5[/"Gene finding hints"/]:::input

    %% ---- Processes, declared in execution order ----
    P01["LONGQC"]:::omicsbox
    P02["FLYE"]:::omicsbox
    P03["QUAST"]:::chart
    P04["BWA"]:::omicsbox
    P05["PILON"]:::omicsbox
    P06["BUSCO"]:::chart
    P07["REPEATMASKER"]:::omicsbox
    P08["AUGUSTUS"]:::omicsbox
    P09["DIAMOND_BLAST"]:::omicsbox
    P10["INTERPROSCAN"]:::omicsbox
    P11["COMBINE_PROJECTS"]:::omicsbox
    P12["GO_MAPPING"]:::omicsbox
    P13["GO_ANNOTATION"]:::omicsbox
    P14["MERGE_IPS_GOS_<br/>TO_ANNOTATION"]:::omicsbox

    %% ---- Data flow ----
    IN1 --> P01
    IN2 --> P04
    IN3 --> P03
    IN4 -.-> P07
    IN5 -.-> P08

    P01 --> P02

    P02 --> P03
    P02 --> P04
    P02 --> P05

    P04 --> P05

    P05 --> P06
    P05 --> P07

    P07 --> P08
    P08 --> P09
    P08 --> P10

    P09 --> P11
    P10 --> P11

    P11 --> P12 --> P13 --> P14

    classDef input fill:#e8f4fd,stroke:#1f77b4,stroke-width:1px;
    classDef omicsbox fill:#fff3e0,stroke:#e67e22,stroke-width:1px;
    classDef chart fill:#f4ecf7,stroke:#8e44ad,stroke-width:1px;
Loading

Pipeline Steps

  • LONGQC — Assesses the quality of the raw long reads and trims them with omicsbox longqc, under the sequencing-technology profile and sensitivity settings chosen in the configuration. Emits the trimmed long reads consumed by FLYE, alongside the quality control results and report. The trimmed reads are the assembler's only input, so the configuration entry that enables trimmed-read output has to stay enabled.
  • FLYE — Assembles the trimmed long reads de novo with omicsbox flye. The configured library type decides which OmicsBox input the reads are handed to, and therefore which platform and read-accuracy model the assembler applies. Emits the draft assembly consumed by QUAST, BWA and PILON, together with an assembly report and chart and, when the configuration asks for it, the repeat graph.
    • QUAST — Evaluates the unpolished draft assembly against the supplied reference genome with omicsbox quast, reporting contiguity, alignment and misassembly metrics under the configured genome type and the configured length, identity and misassembly thresholds. Its results are terminal — no later step consumes them.
  • BWA — Aligns the short reads against the draft assembly with omicsbox bwa, under the configured seeding, scoring and output options. For paired-end input it pairs mates by the configured upstream and downstream filename patterns. Emits the coordinate-sorted alignments consumed by PILON, plus an alignment report and mapping-statistics charts.
  • PILON — Polishes the draft assembly with omicsbox pilon, correcting it against the short-read alignments according to the configured categories of error to fix and the configured depth, quality and k-mer heuristics. Emits the polished assembly consumed by BUSCO and REPEATMASKER, a report and its charts, and the list of applied changes when the configuration asks for it.
    • BUSCO — Scores the polished assembly for gene-content completeness with omicsbox busco, against the lineage profile and assessment mode set in the configuration. Its results are terminal.
  • REPEATMASKER — Locates and masks interspersed and low-complexity repeats in the polished assembly with omicsbox repeatmasker, using the configured search engine, repeat database and masking type. Emits the masked genome consumed by AUGUSTUS, plus the repeat annotations, a run report and a repeat-type distribution chart.
  • AUGUSTUS — Predicts protein-coding genes on the masked genome with omicsbox genefinding-eukaryotic, running either ab initio or from the extrinsic evidence hint files, according to the configured gene finding mode, species model and gene model. Emits the predicted-protein project consumed by both DIAMOND_BLAST and INTERPROSCAN, together with the predicted CDS and the gene structures, a report and a length-distribution chart.
  • DIAMOND_BLAST — Searches the predicted proteins for homologues with omicsbox diamond, against the protein database, sensitivity level, taxonomy filter and hit thresholds set in the configuration. Emits the project carrying the hit tables, consumed by COMBINE_PROJECTS and used later as the evidence for GO mapping.
  • INTERPROSCAN — Scans the same predicted proteins against the InterPro member databases selected in the configuration with omicsbox ips, adding protein families, domains, sites and repeats. Emits the annotated project consumed by COMBINE_PROJECTS, together with the raw InterProScan results in the configured export formats.
  • COMBINE_PROJECTS — Merges the DIAMOND-searched project and the InterProScan project into a single project with omicsbox combine-projects, following the per-data-type merge policies and the priority project set in the configuration. Hands the unified project to GO_MAPPING.
  • GO_MAPPING — Retrieves the candidate GO terms associated with every BLAST hit from the GOA database with omicsbox mapping-cloud, at the database version selected in the configuration. Emits the project with the mapping evidence attached.
  • GO_ANNOTATION — Applies the BLAST2GO algorithm through omicsbox annotation, turning the candidate mappings into a functional annotation according to the configured annotation cut-off, GO weight, BLAST hit filters and per-evidence-code reliability weights. Emits the annotated project.
  • MERGE_IPS_GOS_TO_ANNOTATION — Promotes the InterPro-derived GO terms into the functional annotation with omicsbox interproscan-join, consolidating both lines of evidence into the final annotated genome project, and emits a merge-results chart alongside it.

Inputs

The workflow needs the long reads to assemble, a short-read library to polish that assembly with, and a reference genome for the assembly evaluation; every other file input is optional and is read only by the step that consumes it.

Parameter Format Required Description
input_long_reads FASTQ / FASTA (.fastq / .fq / .fasta / .fsa / .fa / .fna / .fas, plain or .gz) or BAM (.bam) ✅ Glob matching the long reads to assemble. Every matching file is gathered into a single OmicsBox task, which parallelises over the reads internally.
input_single_end / input_paired_end FASTQ (.fastq / .fq / .fastq.gz / .fq.gz) ✅ Glob matching the short reads used to polish the assembly — set exactly one of the two, whichever matches the library layout. Paired-end mates are paired by the upstream_pattern / downstream_pattern filename patterns, so the two files of a pair must differ only by that marker.
quast.reference_genome FASTA (.fasta / .fsa / .fa / .fna / .fas, plain or .gz) ✅ Reference genome the unpolished draft assembly is compared against by QUAST. Required even though a single step reads it — the run aborts at start-up when it is missing.
repeatmasker.database_file EMBL (.embl) or FASTA (.fasta / .fsa / .fa / .fna / .fas) ⬜ Repeat library consumed by REPEATMASKER. A RepBase database is the EMBL file distributed by GIRI; a custom library is FASTA, and its sequence IDs are best written as >repeatname#class/subclass. Required when that step is configured to run the RMBlast search engine against a RepBase or custom database — the workflow stops at start-up if that combination is selected and the file is missing — and unused by the combinations that ship their own library.
augustus.est_hints FASTA (.fasta / .fsa / .fa / .fna / .fas, plain or .gz) ⬜ EST / cDNA evidence passed to AUGUSTUS as gene finding hints.
augustus.protein_hints FASTA (.fasta / .fsa / .fa / .fna / .fas, plain or .gz) ⬜ Protein evidence passed to AUGUSTUS as gene finding hints.
augustus.isoseq_hints FASTA (.fasta / .fsa / .fa / .fna / .fas, plain or .gz) ⬜ IsoSeq evidence passed to AUGUSTUS as gene finding hints.
augustus.rna_seq_upstream_hints FASTQ / FASTA (.fastq / .fq / .fasta / .fsa / .fa / .fna / .fas, plain or .gz) ⬜ RNA-Seq evidence passed to AUGUSTUS as gene finding hints: either a single-end library, or the upstream mate of a paired-end one.
augustus.rna_seq_downstream_hints FASTQ / FASTA (.fastq / .fq / .fasta / .fsa / .fa / .fna / .fas, plain or .gz) ⬜ Downstream mate of a paired-end RNA-Seq library, passed to AUGUSTUS as gene finding hints alongside its upstream mate in augustus.rna_seq_upstream_hints. Paired-end RNA-Seq fills both parameters, one mate each; single-end RNA-Seq leaves this one empty.

Note

Seven input conditions are validated before any OmicsBox job is launched, and each one stops the run immediately with an explanatory message:

  • input_long_reads must be set.
  • flye.library_type must be set, to one of the PacBio or Nanopore read classes the configuration lists inline — it selects the assembler's error model and has no default.
  • Exactly one of input_single_end and input_paired_end must be set — neither both nor neither.
  • repeatmasker.database_file must be present when the configured search engine and database type require an external repeat library.
  • At least one hint file must be provided when AUGUSTUS is configured to run in extrinsic evidence mode; ab initio mode needs none. Only one file per evidence type is supported.
  • quast.reference_genome must be set, because QUAST passes the reference to omicsbox quast unconditionally.
  • augustus.rna_seq_downstream_hints must be accompanied by augustus.rna_seq_upstream_hints, since a downstream mate is only meaningful as one half of a paired-end library.

Configuration

This workflow follows the repository's self-documenting configuration strategy: you do not need to memorise parameter names, consult a reference table, or learn the OmicsBox CLI syntax. Every customisable option is already declared, grouped, and documented with inline comments inside the workflow's own configuration file.

To configure a run:

  1. Generate your own copy of the configuration file — Step 1 of Execution below.
  2. Open it in any text editor and read the inline comments; each option lists its accepted values and its default.
  3. Fill in the values you need and comment / uncomment the flags you want to enable or disable.
  4. Leave everything else untouched — the entries you do not change fall back to the tested defaults.

Tip

Keep your customised configuration file next to your project data and under version control. It is a complete, human-readable record of how a run was parameterised, which is all you need to reproduce it later.


Execution

Before running this workflow for the first time, complete the environment setup described on the central Nextflow Execution & Configuration page.

Two ways to run this workflow are supported. Option A is recommended when you want to inspect or modify the pipeline code; Option B runs the published version straight from GitHub with no manual clone.

Option A — Local Clone

Assuming you have already cloned the repository and navigated to its root directory:

Step 1 — Dump the configuration file

nextflow run nextflow/workflows/long_reads_eukaryotic_genome_analysis/long_reads_eukaryotic_genome_analysis.nf --dump_config

This copies the self-documenting template to ./long_reads_eukaryotic_genome_analysis.config in your current directory and exits. No OmicsBox job is launched.

Step 2 — Customise it

Open the generated long_reads_eukaryotic_genome_analysis.config and edit it as described in Configuration: set your input paths and output folder, then fill in or comment/uncomment the step-specific flags you want to change. Save the file.

Step 3 — Run the workflow

nextflow run nextflow/workflows/long_reads_eukaryotic_genome_analysis/long_reads_eukaryotic_genome_analysis.nf \
    -c long_reads_eukaryotic_genome_analysis.config \
    -resume

Option B — Directly from GitHub

No clone required — the engine fetches the workflow for you.

Step 1 — Dump the configuration file

nextflow run BioBam/omicsbox-engine-workflows \
    -r main \
    -main-script nextflow/workflows/long_reads_eukaryotic_genome_analysis/long_reads_eukaryotic_genome_analysis.nf \
    --dump_config

The template is written to your current directory exactly as in Option A.

Step 2 — Customise it

Edit the generated long_reads_eukaryotic_genome_analysis.config exactly as in Option A — see Configuration. Since the pipeline code lives remotely, this file is the only thing you own and edit.

Step 3 — Run the workflow

nextflow run BioBam/omicsbox-engine-workflows \
    -r main \
    -main-script nextflow/workflows/long_reads_eukaryotic_genome_analysis/long_reads_eukaryotic_genome_analysis.nf \
    -c long_reads_eukaryotic_genome_analysis.config \
    -resume

Outputs

All results are written under the output directory set in your configuration file (local_folder), inside a subfolder named after the Nextflow session ID of the run. Each step publishes to its own numbered directory, so every file can be traced back to the process that produced it:

results/
└── <session-id>/
    ├── 01_longqc/              # Long-read quality control results, report and trimmed reads
    ├── 02_flye/                # Draft assembly sequences with the assembly report, chart and graph
    ├── 03_quast/               # Assembly quality assessment results, report and charts
    ├── 04_bwa/                 # Short-read alignments against the draft assembly, report and charts
    ├── 05_pilon/               # Polished assembly with the applied changes, report and charts
    ├── 06_busco/               # Assembly completeness assessment project, report and charts
    ├── 07_repeatmasker/        # Masked genome, repeat annotations, report and chart
    ├── 08_augustus/            # Predicted proteins, CDS and gene structures with the report and chart
    ├── 09_diamond/             # Project with the DIAMOND BLAST hits
    ├── 10_interproscan/        # Project with the InterPro signatures, plus the raw exports
    ├── 11_combine_projects/    # DIAMOND project merged with InterProScan
    ├── 12_go_mapping/          # Project with the candidate GO mappings
    ├── 13_blast2go_annotation/ # BLAST2GO-annotated project
    └── 14_merge_ips/           # InterPro GO terms merged into the final annotation

Clone this wiki locally