Skip to content
Microbial & metagenomicslatest-release

bacmodel

nf-core/bacmodel

Systems-based bacterial functional modeling pipeline

version1.0.18a9ad093d0Oct 30, 2026 Upstream Usage docs

Key tools

ProkkaBaktaMacSyFinderTRAITARCarveMegapseqMEMOTE

Run it

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

Inputs

columntyperequiredallowed valuesconstraints
samplestringyesmatches ^\S+$
fastastring (file path)yesmatches ^\S+\.(f(ast)?a|fna)(\.gz)?$
medium_gapseqstringno, ALLmed, FT, LBmed, LBmed_glucose_suppl, M9_serine_galacturonate, M9_vit_aa, MM_anaerobic_Acetate, MM_anaerobic_Acetate_H2, MM_anaerobic_CO2_H2, MM_glu-thm, MM_glu, TSBmed, autotrophic, dsmz_1611_YCFA, gut, meerwasser
medium_gapseq_csvstringnomatches ^(\S+\.csv)?$
medium_carvemestringnomatches ^[^\s/]*$
medium_carveme_tsvstringnomatches ^(\S+\.tsv)?$

--input must match ^\S+\.(csv|tsv)$.

For tabular CSV/TSV input, use 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,fasta

Any of the optional columns above may be appended to the header when your data needs them: medium_gapseq, medium_gapseq_csv, medium_carveme, medium_carveme_tsv.

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; fasta, medium_gapseq_csv, medium_carveme_tsv from files matching their patterns, by sample name. 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 bacmodel --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 bacmodel ... --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 bacmodel --demo --outdir results # adds the upstream test profile (-profile test,docker)
<!-- Generated from nf-core/bacmodel@8a9ad093d0431b4f69fa829513248c7863f37d7f. 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,fasta
ColumnTypeRequiredAllowed / constraints
samplestringrequiredmatches ^\S+$
fastastring (file path)requiredmatches ^\S+\.(f(ast)?a|fna)(\.gz)?$
medium_gapseqstringoptionalALLmedFTLBmedLBmed_glucose_supplM9_serine_galacturonateM9_vit_aaMM_anaerobic_AcetateMM_anaerobic_Acetate_H2MM_anaerobic_CO2_H2MM_glu-thmMM_gluTSBmedautotrophicdsmz_1611_YCFAgutmeerwasser
medium_gapseq_csvstringoptionalmatches ^(\S+\.csv)?$
medium_carvemestringoptionalmatches ^[^\s/]*$
medium_carveme_tsvstringoptionalmatches ^(\S+\.tsv)?$

Required parameters

--inputstring (file path)

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

Constraint · matches ^\S+\.(csv|tsv)$

--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

46 parameters · 7 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.

27 parameters · 19 hidden

Analysis options16

Path to CarveMe media database TSV file (columns: medium, description, compound, name). If not provided, uses CarveMe's default media database. See example file.

Directory containing a pre-downloaded gapseq reference sequence database (a Bacteria subdirectory, as produced by gapseq update-sequences -D <dir>). If present, the live Zenodo download is skipped - set this to a pre-downloaded copy if your compute nodes lack outbound internet access to Zenodo. If unset, defaults to <outdir>/databases/gapseq.

Custom arguments for the simplified gapseq doall search step. Only used in the default doall workflow - ignored if any of the gapseq_find_args, gapseq_findtransport_args, gapseq_draft_args, gapseq_medium_args, or gapseq_fill_args below are set, since that switches to the custom/stepwise workflow instead.

Custom arguments for gapseq draft - draft model construction (default: none)

Custom arguments for gapseq fill - gap-filling (default: none)

Custom arguments for gapseq find - pathway prediction (default: -b 200 -A diamond)

Custom arguments for gapseq find-transport - transporter prediction (default: -b 200)

Custom arguments for gapseq medium - add/remove specific compounds on top of the predicted medium, e.g. -c "cpd00007:0" to remove oxygen (default: none; ignored for samples with their own medium_gapseq_csv file)

Directory containing pre-downloaded MacSyFinder models, or ones published by a previous run of this pipeline (one subdirectory per macsyfinder_models value). If unset, models are downloaded automatically into <outdir>/databases/macsyfinder on first use and reused from there by later runs that point --macsyfinder_db at the same <outdir>/databases/macsyfinder.

MacSyFinder --db-type: unordered for MAGs/draft assemblies with unreliable gene order (default, most permissive), ordered_replicon for a single complete/nearly-complete genome (enables synteny-aware detection), or gembase for multiple complete replicons in one gembase-formatted database

MacSyFinder models to use (TXSS for Type III/IV/VI secretion systems)

Skip CarveMe genome-scale metabolic reconstruction

Skip Gapseq pathway analysis and metabolic modeling

Skip MacSyFinder macromolecular systems detection

Skip MEMOTE metabolic model quality evaluation (only runs when skip_gapseq=false or skip_carveme=false)

Skip TRAITAR phenotype prediction

Annotation options4

Tool to use for genome annotation

Directory containing a pre-downloaded Bakta database, or one published by a previous run of this pipeline (only used when annotation_tool=bakta). If unset, the database is downloaded automatically into <outdir>/databases/bakta on first use and reused from there by later runs that point --bakta_db at the same <outdir>/databases/bakta.

Bakta database type to download

Minimum contig length for annotation and analysis

Database options1

Directory containing a pre-downloaded Pfam database, or one published by a previous run of this pipeline (only used when skip_traitar=false). If unset, the database is downloaded automatically into <outdir>/databases/pfam on first use and reused from there by later runs that point --pfam_db at the same <outdir>/databases/pfam.

Generic options3

Display the help message.

Display the full detailed help message.

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

Input Output options3

Email address for completion summary.

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

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

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/bacmodel/blob/1.0.1/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.