Skip to content
Microbial & metagenomicslatest-release

bactmap

nf-core/bactmap

A mapping-based pipeline for creating a phylogeny from bacterial whole genome sequences

version1.0.0834642d8acJun 18, 2021 Upstream Usage docs

Key tools

bcftoolsBWAfastpFastQCFastTree2GubbinsIQ-TREE2MashMultiQCRapidNJRAxML-NGRasusasamtoolsSNP-sites

Run it

nfclaw
nfclaw run bactmap --input <input> --outdir results --reference <reference> -profile docker
raw nextflow
nextflow run pipelines/bactmap/upstream -profile docker --input <input> --outdir results --reference <reference>
demo · bundled test profile
nfclaw run bactmap --demo --outdir results # adds the upstream test profile (-profile test,docker)

Runtime corrections

For this exact commit, nfclaw run applies bactmap-demo-order-preview-v2 in a separate verified working copy. The test profile preserves module defaults and overrides only its intended leaves, with explicit IQ-TREE and RAxML seeds. Pseudogenomes are aligned in sample-name order. Preview skips the unbound MultiQC wait; real execution still waits for its report. The original pinned checkout stays unchanged. The direct Nextflow command omits this correction. The actual corrected bytes, recipe, source archive and executable modes are recorded for replay; resume refuses missing or changed source identity. Use NFCLAW_SOURCE_CACHE to select another writable user cache. Recorded source corrections explains the exact scope and validation.

Inputs

This release publishes no samplesheet schema for --input, so nfclaw does not pre-check its contents. The parameter reads: Path to a sample sheet describing paths to input fastq files. Configure the other inputs via parameters (see reference.md).

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 bactmap --input <input> --outdir results --reference <reference> -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 = '!>=21.04.0'.

That minimum predates Nextflow's Java 17 support (21.10.0): on the Java 17+ nf-claw requires it fails to compile the configuration (Unsupported class file major version 61), and nfclaw run refuses it. Run this release on a later engine — the one nf-claw's acceptance gate checks such releases on:

bash
nfclaw run bactmap ... --nxf-ver 24.10.5

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

Demo

bash
nfclaw run bactmap --demo --outdir results # adds the upstream test profile (-profile test,docker)

This pinned bundled test uses missing moving data URLs. For a bare demo, nfclaw stages the three original paired samples and matched NCTC13799 reference from immutable test-datasets commit 02195cfa96ca496173e9d63dd58e34bf02fcf55a. The generated sheet and data commit are recorded and rebased for replay. Explicit input or reference, custom profiles or --config disable the entire fixture. Other releases retain their defaults. Bare demos default to max_cpus=1: native two-CPU runs reordered identical reads and changed downstream alignments and pseudogenome masking; the single-CPU control matched. Explicit --max-cpus or params-file values win. Resource limits are ceilings and do not raise this default. Tree branch lengths and bootstrap support still need separate comparison. A source-bound working copy preserves module defaults, orders the pseudogenome alignment by sample name, seeds IQ-TREE and RAxML under the test profile, and skips the unbound MultiQC report wait only during preview; real runs still wait for the report.

<!-- Generated from nf-core/bactmap@834642d8ac150ca10d705833223e7bcf15efc210. Do not edit by hand. -->

Required parameters

--inputstring

Path to a sample sheet describing paths to input fastq files

--referencestring

Path to a fasta file of the reference sequence

Parameter explorer

39 parameters · 6 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.

19 parameters · 20 hidden

Compulsory Parameters1

Path to a fasta file of the reference sequence

Generic options3

enable conda rather than use containers

Show all params when using --help

Boolean whether to validate parameters against the schema at runtime

Input Output options3

Email address for completion summary.

Path to a sample sheet describing paths to input fastq files

The output directory where the results will be saved.

Optional Pipeline Steps12

path to file containing adapters in fasta format

Build a tree using the FastTree approximate ML algorithm

Specify genome size for subsampling rather than estimation using mash sketch

Build a tree using the IQ-TREE ML algorithm

Maximum non GATC bases (i.e - and N) to allow in pseudogenome sequences

Build a tree using the RapidNJ neighbour-joining algorithm

Build a tree using the RAxML-NG ML algorithm

Remove recombination using gubbins

Saved failed read files after trimminng

Desired coverage depth when subsampling

Turn off subsampling

Trim reads

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. 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/bactmap/blob/1.0.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.