Skip to content
Microbial & metagenomicslatest-release

viralmetagenome

nf-core/viralmetagenome

A bioinformatics best-practice analysis pipeline for untargeted viral genome reconstruction and to identify intra-host variants from metagenomic sequencing data.

version1.2.074064a43f4Sep 16, 2026 Upstream Usage docs

Key tools

BbdukBBNormBCFtoolsBEDToolsblastBowtie2BrackenBWA-MEM2cdhitcheckvClustyFastQCfastpHUMIDiVarKaijuKraken2leiden-algorithmMAFFTMashMegahitMinimap2MMseqs2MosdepthMultiQCpicard-toolsprinseq++prokkaQUASTSAMtoolsSNPeffSPAdesSSPACE BasicTrimmomaticTrinityUMI-toolsvRhymeVSEARCH

Run it

nfclaw
nfclaw run viralmetagenome --input samplesheet.csv --outdir results -profile docker
raw nextflow
nextflow run pipelines/viralmetagenome/upstream -profile docker --input samplesheet.csv --outdir results
demo · bundled test profile
nfclaw run viralmetagenome --demo --outdir results # adds the upstream test profile (-profile test,docker)

Inputs

columntyperequiredallowed valuesconstraints
samplestringyesmatches ^\S+$
fastq_1string (file path)yesmatches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$
fastq_2string (file path)nomatches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$

--input must match ^\S+\.csv$.

The samplesheet is a CSV with this header (the columns the schema requires); fill each value per the table above and reference.md (no example value is invented here):

csv
sample,fastq_1

Any of the optional columns above may be appended to the header when your data needs them: fastq_2.

From data files. --input may also be the data files — a directory (searched recursively), a quoted glob, or files (--input once per file) — from which nfclaw writes this samplesheet: sample from file names; fastq_1/fastq_2 from FastQ files (mates paired by _R1/_R2, or by _1/_2 when their read names show they are mates). Set other columns with --sheet-set COLUMN=VALUE. Preview it with --check; a run records it in <outdir>/provenance/ for replay.

Resources

Resource requests follow the pipeline's configs and selected profiles. nf-core's resource labels often assume a server — a single step can request far more memory than a workstation has, and retry rules can increase requests. If a run fails with Process requirement exceeds available memory (or CPUs), cap every request, and every retry, at what this machine actually has:

bash
nfclaw run viralmetagenome --input samplesheet.csv --outdir results -profile docker \
--limit-cpus 4 --limit-memory 15.GB

nfclaw turns those into Nextflow's process.resourceLimits and passes them as a -c config — the mechanism nf-core prescribes for exactly this (docs). Set them to the machine's real capacity. --limit-time DURATION also caps how long any one task may run: a task that needs longer is stopped, and so is every retry, so set it only as a deliberate ceiling, never as a guess at how long the analysis takes. The generated config is kept in <outdir>/provenance/, so commands.sh replays the run under the same ceiling.

Nextflow engine

This release declares nextflowVersion = '!>=25.10.4'.

To pin this release's declared minimum engine — useful when a newer Nextflow has incompatible config parsing:

bash
nfclaw run viralmetagenome ... --nxf-ver 25.10.4

--nxf-ver is recorded in <outdir>/provenance/, so the replay uses the same engine. See known-issues.

Demo

bash
nfclaw run viralmetagenome --demo --outdir results # adds the upstream test profile (-profile test,docker)
<!-- Generated from nf-core/viralmetagenome@74064a43f4b00c163c22bcfc9cf1d84a2a69e988. Do not edit by hand. -->

Samplesheet

A CSV with this header (the columns the schema requires). Fill each value per the constraints below; optional columns from the table may be appended.

samplesheet.csv header
sample,fastq_1
ColumnTypeRequiredAllowed / constraints
samplestringrequiredmatches ^\S+$
fastq_1string (file path)requiredmatches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$
fastq_2string (file path)optionalmatches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$

Required parameters

--inputstring (file path)

Path to comma-separated file containing information about the samples in the experiment.

Constraint · matches ^\S+\.csv$

--outdirstring (directory path)

The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.

Parameter explorer

196 parameters · 10 groups

Every parameter from the pinned nextflow_schema.json. nfclaw checks explicit values before launch; complex rules use the pinned pipeline's runtime validation. Search, filter by group, and expand any parameter for its default, allowed values and constraints.

101 parameters · 95 hidden

Assembly11

Extra arguments passed to BBNorm

Arguments for Prinseq tool for contigs

The specified tools for de novo assembly, multiple options are possible

Digitally normalise reads with BBNorm before de novo assembly

Specify the mean distance between the paired reads

Specify the deviation of the mean distance that is allowed.

Skip de novo assembly of reads

Skip the filtering of low complexity contigs with prinseq

Skip the contig extension with sspace_basic

File or directory with amino acid HMMs for Spades HMM-guided mode.

Specific SPAdes mode to run

Generic options4

Display the help message.

Display the full detailed help message.

Custom MultiQC yaml file containing HTML including a methods description.

Display hidden parameters in the help message (only works when --help or --help_full are provided).

Genome Qc12

Database used for annotation of the consensus constructs

Metadata table describing the sequences of the annotation database

Arguments for QUAST quality control

Reference database used by checkv for consensus quality control

Define a prokka --protein database for protein annotation

Skip creating an alignment of each the collapsed clusters and each iterative step

Skip the blast search of contigs to the provided reference DB

Skip the use of checkv for quality check

Skip the annotation of the consensus constructs

Skip the quality measurements on consensus genomes

Skip gene estimation & annotation with prokka

Skip the use of QUAST for quality check

Input Output options6

Email address for completion summary.

Path to comma-separated file containing information about the samples in the experiment.

Sample metadata that is included in the multiqc report

MultiQC report title. Printed as page header, used for filename if not otherwise specified.

The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.

Transpose the samples overview table so samples become columns and result fields become rows.

Iterative Consensus Refinement7

Call variants during the iterations

Consensus tool used for calling new consensus during iterations

Mapping tool used during iterations

Calculate summary statistics during iterations

Variant caller used during iterations

Number of iterations

Don't realign reads to consensus sequences and redefine the consensus through (multiple) iterations

Metagenomic Diversity10

Arguments for Kreport2Krona tool

Location of bracken database

Location of Kaiju database

Location of the Kraken2 database

Save kraken2's used minimizers

Save summary overview of read classifications in a txt file

Save classified and unclassified reads as fastq files

Specify the taxonomic read classifiers, choices are 'kaiju,kraken2'

Save the used databases

Skip determining the metagenomic diversity of the sample

Polishing16

Arguments for selecting reference

File containing identifiers to exclude from the scaffolding reference pool

Cluster algorithm used for contigs

Include BLAST-hit reference sequences in the contig clustering input

Identity threshold value used in clustering algorithms

Keep the contigs that could not be classified with the taxonomic databases (kaiju_db & kraken2_db)

Maximum allowed contig size

Define the maximum percentage of ambiguous bases in a contig

Minimum allowed contig size

(only with mash) Algorithm to partition the network.

Minimum cumulated sum of mapped read percentages of each member from a cluster group, set to 0 to disable

Specify the metagenomic classifiers to use for contig taxonomy classification: 'kraken2,kaiju'

Set of fasta sequences used as potential references for the contigs

Save intermediate polishing files

Skip the refinement/polishing of contigs through reference based scaffolding and read mapping

Skip the preclustering of assemblies to facilitate downstream processing of assemblies

Preprocessing options22

Fasta file of adapters

Arguments for Kraken2 tool for host removal

Reference files containing adapter and/or contaminant sequences for sequence kmer matching (used by bbduk)

Specify the decomplexifier to use, bbduk or prinseq

Kraken2 database used to remove host and contamination

Specify if reads coming from the same group or original sample should be merged for the downstream analyses

Input files with fewer than these reads will be filtered out of the "reads" output channel

Save reads after the final preprocessing step

Save reads after every preprocessing step

Specify true to save all merged reads to a file ending in *.merged.fastq.gz

Specify true to save files that failed to pass trimming thresholds ending in *.fail.fastq.gz

Skip filtering of low complexity regions in reads

Skip read quality statistics summary tool 'fastqc'

Skip the removal of host read sequences

Skip read preprocessing and use input reads for downstream analysis

Skip read trimming

With or without UMI extraction

The used trimming tool

Specify at what level UMI deduplication should occur.

Discard R1 / R2 if required 0, meaning not to discard

Prefer host-filtered reads for downstream mapping & polishing steps once host removal has completed successfully

With or without UMI detection

Variant Analysis13

Minimum allele frequency threshold for calling consensus

Arguments for SnpSift ExtractFields tool

Consensus tool used for calling new consensus in final iteration

Deduplicate the reads

Keep unmapped reads in the alignments used for contig coverage, polishing and consensus refinement

Define which mapping tool needs to be used when mapping reads to reference

Sequence(s) to use as a reference for mapping instead of the de novo contigs or scaffolds

Calculate summary statistics in final iteration

Define the minimum consensus depth

Define the minimum number of mapped reads in order to continue the variant and consensus calling

Skip the analysis of variants for the external reference or contigs

Skip the annotation of the VCF file

Define the variant caller to use: 'ivar' or 'bcftools'

Outputs

Results land in --outdir; the files and directory layout depend on the selected workflow, parameters and publication settings. Run metadata is normally placed in <outdir>/pipeline_info/ (execution report, software versions), when those outputs are enabled. The pinned tree includes MultiQC support; a report is produced only when its workflow step runs. nfclaw run also writes <outdir>/provenance/ with the exact params file and the run log, <outdir>/provenance/logs/run.log — the whole launch, whose last line states the outcome (Nextflow's own log is <outdir>/.nextflow.log); unless --no-provenance it adds a run manifest (pinned version, commit and exact command), input/output SHA-256 checksums, and a replayable commands.sh. The exact output files and directory layout for this release are documented upstream: github.com/nf-core/viralmetagenome/blob/1.2.0/docs/output.md Check a run — in the foreground or the background — with nfclaw status <outdir>: success, still running, how it ended (with the error), or stopped without an outcome; exit 0 success, 3 running, 1 otherwise.