Workflow Type: Common Workflow Language
Stable

Workflow for long read quality control, contamination filtering, assembly, variant calling and annotation.

  • Preprocessing of reference file
  • LongReadSum before and after filtering (read quality control)
  • Filtlong filter on quality and length
  • Flye assembly
  • Minimap2 mapping of reads and assembly
  • Clair3 variant calling of reads
  • Freebayes variant calling of assembly
  • Optional Bakta annotation of genomes with no reference
  • SnpEff building or downloading of a database
  • SnpEff functional annotation
  • Liftoff annotation lift over

This workflow on WorkflowHub: https://workflowhub.eu/workflows/1868

All tool CWL files and other workflows can be found here: Tools: https://git.wur.nl/ssb/automated-data-analysis/cwl/-/tree/main/tools Workflows: https://git.wur.nl/ssb/automated-data-analysis/cwl/-/tree/main/workflows

Inputs

ID Name Description Type
input_read long reads input Long read sequence file in FASTQ format.
  • File
sample_name sample name Sample name, by default is extracted from the file input. Used as output names for LongReadSum, Filtlong, and minimap2.
  • string?
reference_gb reference GenBank file Reference file in GenBank format. If not provided requires NCBI identifier.
  • File?
plasmids plasmid file(s) Input plasmid GenBank files, which will be merged with the reference.
  • File[]?
skip_qc_unfiltered skip LongReadSum before filtering Skip LongReadSum analyses of unfiltered input data, default is false.
  • boolean?
skip_qc_filtered skip LongReadSum after filtering Skip LongReadSum analyses of filter input data, default is false.
  • boolean?
include_reads include filtered reads Will include mapping and variant calling filtered reads in the pipeline, default is true.
  • boolean
include_assembly include assembly Will include mapping and variant calling an assembly in the pipeline, default is true.
  • boolean
include_strainy include strainy Will include strain level analysis on the filtered reads, default is false.
  • boolean
include_snpeff include SnpEff Will include functional interpretation of variants with SnpEff in the pipeline, default is true.
  • boolean
snpeff_database_exists existing SnpEff database The used genome has an existing database within SnpEff, instead of building a database, the existing database will be downloaded, default is false.
  • boolean?
ncbi_data_exists existing NCBI data The used genome has an existing NCBI identifier, instead of annotating genes, the genbank file from NCBI will be used to build a database.
  • boolean?
transfer_annotation transfer annotation Whether the annotation of the reference should be carried over to the new assembly (use Liftoff), default is false.
  • boolean?
input_type input file type Acceptable input types: fa FASTA file input fq FASTQ file input f5 FAST5 file input f5s FAST5 file input with signal statistics output seqtxt sequencing_summary.txt input bam BAM file input rrms RRMS BAM file input Defaults to FQ file in this workflow.
  • <strong>enum</strong> of: fa, fq, f5, f5s, seqtxt, bam, rrms
log_level level of logging Logging level (1: DEBUG, 2: INFO, 3: WARNING, 4: ERROR, 5: CRITICAL), defaults to 2.
  • int?
seed random seed Sets the random seed for reproducability. Using the same seed number for random seed. Default is set to 1.
  • int?
target_bases target bases Keep only the best reads up to this many total bases.
  • int?
keep_percent Maximum read length threshold Maximum read length threshold (default 90).
  • float?
minimum_length Minimum read length Minimum read length threshold (default 1000).
  • int?
maximum_length maximum length Maximum read length threshold.
  • int?
length_weight Length weigth Weight given to the length score (default 10).
  • float?
min_mean_q minimum mean quality Minimum mean quality threshold.
  • float?
min_window_q minimum window quality Minimum window quality threshold.
  • float?
file_format input file type Input file type. Possible choices are bigwig or bedgraph. Defaults to bigwig in this workflow.
  • <strong>enum</strong> of: bigwig, bedgraph
model_path Clair3 Model Directory Path to the Clair3 model inside the Docker container.
  • string
haploid_sensitive haploid calling mode Set to true to enable haploid calling mode, this is an experimental flag.
  • boolean?
no_phasing_for_fa no phasing in full alignment Set to true to skip whatshap phasing in full alignment, this is an experimental flag.
  • boolean?
genome_size Genome size Estimated genome size (for example, 5m or 2.6g).
  • string?
coverage_threshold assembly coverage Reduced coverage for the initial disjointig assembly. If set, Flye will downsample the reads to the specified coverage before assembly. Useful for high-coverage datasets to reduce memory usage. If not set, Flye will use all available reads.
  • int?
ploidy ploidy settings Settings of the ploidy, for haploid organisms, set to 1 (default).
  • int?
min_alt_count min_alt_count Require at least this count of observations supporting an alternate allele. Defaults to 1 in this pipeline.
  • int?
bakta_db Bakta DB Bakta database directory (default bakta-db_v5.1-light built in the container).
  • Directory?
snpeff_genome genome/database identifier Identifier for the SnpEff database to download or build (e.g. 'GRCh37.75' for human, or a custom name for microbial strains).
  • string?
NCBI_identifier NCBI genome identifier NCBI Identifier of a genome for SnpEff to extract a genbank file and build a custom database out of.
  • string?
no_upstream no upstream changes Set to true to omit upstream changes.
  • boolean?
no_downstream no downstream changes Set to true to omit downstream changes.
  • boolean?
annotation_file annotation file to lift over GFF or GTF file containing the annotations to lift over.
  • File?
merging_script merging script Python script that merges input from both Clair3 and freebayes. Passed externally within the git structure to avoid having to host a new python docker.
  • File?
threads Number of threads Number of threads to use for computational processes.
  • int?
provenance include provenance information Will include metadata on tool performance of LongReadSum, Filtlong, and Flye, default is true.
  • boolean
dummy_annotation_file n/a n/a
  • File?
dummy_database_folder n/a n/a
  • Directory?

Steps

ID Name Description
preprocess_reference plasmid preprocessing Pre-processing of reference, merging reference with optional plasmid input and extracting GenBank, GFF3 and FASTA files.
longreadsum_unfiltered LongReadSum unfiltered LongReadSum Quality assessment of reads prior to filtering.
filtlong long read filtering Filter long reads based on set parameters.
longreadsum_filtered LongReadSum filtered LongReadSum Quality assessment of reads after filtering.
minimap2_reads Minimap2 read mapping Read mapping of filtered reads using Minimap2.
samtools_reads_index samtools index reads Indexing of reads BAM file with samtools index.
deeptools_bamcoverage deeptools bamCoverage Generating coverage track with deeptools bamCoverage.
samtools_faidx_reads samtools faidx Indexing of FASTA file with samtools faidx.
clair3 Clair3 variant calling Variant calling of filtered reads with Clair3 using input models.
strainy Strainy strain level analysis Strain level analysis on assembled reads. Produces multi-allelic phasing, individual haplotypes and strain-specific variant calls.
flye Flye assembly De novo assembly of single-molecule reads with Flye.
quast QUAST quality assessment Quality assessment of assembly with QUAST.
samtools_faidx_assembly samtools faidx assembly Indexing of FASTA file with samtools faidx.
minimap2_assembly Minimap2 assembly mapping Assembly mapping of filtered reads using Minimap2.
bedtools_bamtobed bedtools bamtobed Conversion of BAM file to BED with bedtools bamtobed
samtools_assembly_index samtools index assembly Indexing of assembly BAM file with samtools index.
freebayes FreeBayes variant calling Variant calling of assembly with FreeBayes.
unzip unzipping clair3 Unzipping Clair3 VCF file.
merging_vcfs merging vcf files Merging the VCF output from Clair3 and freebayes.
snpeff_download SnpEff database downloading Downloading of a SnpEff database based on the genome name within the database.
bakta bakta genome annotation Bacterial genome annotation, only runs when no reference (genbank file(s) or NCBI identifier) is supplied.
snpeff_build SnpEff database building Downloading of a SnpEff database based on the genome name within the database.
snpeff_reads SnpEff reads Running SnpEff on the reads variant output of Clair3.
snpeff_assembly SnpEff assembly Running SnpEff on the assembly variant output of freebayes.
snpeff_merged SnpEff merged Running SnpEff on the merged variant output of both Clair3 and freebayes.
liftoff Liftoff annotation lift over Lifting over annotations from reference to assembly.
filtlong_files_to_folder Filtlong folder Preparation of Filtlong output files to a specific output folder.
flye_files_to_folder Flye output folder Preparation of Flye output files to a specific output folder.
snpeff_reads_files_to_folder SnpEff reads output folder Preparation of SnpEff reads output files to a specific output folder.
snpeff_assembly_files_to_folder SnpEff assembly output folder Preparation of SnpEff assembly output files to a specific output folder.
snpeff_merged_files_to_folder SnpEff merged output folder Preparation of SnpEff merged output files to a specific output folder.
liftoff_files_to_folder liftoff assembly output folder Preparation of Liftoff output files to a specific output folder.
provenance_files_to_folder provenance output folder Preparation of provenance output files to a specific output folder.

Outputs

ID Name Description Type
longreadsum_unfiltered_outdir LongReadSum folder Folder with LongReadSum output files.
  • Directory?
filtlong_outdir Filtlong folder Folder with Filtlong output files.
  • Directory?
longreadsum_filtered_outdir LongReadSum folder 2 Folder with LongReadSum output files.
  • Directory?
clair3_outdir Clair3 output directory Clair3 output directory containing the vcf file.
  • Directory?
clair3_vcf Clair3 output file Output variant file from Clair3.
  • File?
freebayes_output freebayes output file Output variant file from freebayes.
  • File?
merged_output merged output file Merged output variant file from both Clair3 and freebayes.
  • File?
flye_outdir Filtlong folder Folder with Filtlong output files.
  • Directory?
quast_outdir Filtlong folder Folder with Filtlong output files.
  • Directory?
minimap2_reads_bam mapped reads Filtered reads mapped by minimap2.
  • File?
reads_bam_index_out indexed mapped reads Indexed filtered mapped reads.
  • File?
minimap2_assembly_bam mapped assembly Assembly mapped by minimap2.
  • File?
assembly_bam_index_out indexed mapped assembly Indexed mapped assembly.
  • File?
bedtools_bamtobed_out output BED file The output BED file.
  • File?
reads_fasta_index_out indexed reference Indexed reference FASTA file.
  • File?
deeptools_bamcoverage_out coverage track output Output coverage track file. Either in bigWig or bedGraph format.
  • File?
assembly_fasta_index_out indexed reference Indexed reference FASTA file.
  • File?
bakta_outdir bakta folder Folder with bakta output files.
  • Directory?
strainy_outdir strainy folder Folder with strainy output files.
  • Directory?
snpeff_reads_outdir SnpEff reads folder Folder with SnpEff reads output files.
  • Directory?
snpeff_assembly_outdir SnpEff assembly folder Folder with SnpEff assembly output files.
  • Directory?
snpeff_merged_outdir SnpEff merged folder Folder with SnpEff merged output files.
  • Directory?
liftoff_outdir Liftoff folder Folder with liftoff output files.
  • Directory?
logs_outdir logs folder Folder with provenance information.
  • Directory?
preprocessed_genbank preprocessed GenBank file The preprocessed GenBank file. This file only differs from the input GenBank file (if provided) when plasmids are included.
  • File?
preprocessed_fasta preprocessed FASTA file The preprocessed FASTA file. This file is extracted from the above GenBank file.
  • File?
preprocessed_gff3 preprocessed GFF3 file The preprocessed GFF3 file. This file is extracted from the above GenBank file.
  • File?

Version History

Version 2 (latest) Created 9th Jul 2026 at 13:38 by Martijn Melissen

Improved clair3 and freebayes merger function among other things


Frozen Version-2 da7178a

Version 1 (earliest) Created 12th Aug 2025 at 13:00 by Martijn Melissen

No revision comments

Frozen Version-1 25fa72f
help Creators and Submitter
Activity

Views: 1864   Downloads: 360

Created: 12th Aug 2025 at 13:00

Last updated: 14th Jul 2026 at 09:56

Annotated Properties
Topic annotations
Operation annotations
Scientific disciplines
Agricultural and Biological Sciences
help Attributions

None

Total size: 804 KB
Powered by
(v.1.18.0)
Copyright © 2008 - 2026 The University of Manchester and HITS gGmbH