magmap
nf-core/magmap
nf-core/magmap is a bioinformatics best-practice analysis pipeline for mapping reads to (large) collections of genomes.
Key tools
Run it
nfclaw run magmap --input samplesheet.csv --outdir results -profile dockernextflow run pipelines/magmap/upstream -profile docker --input samplesheet.csv --outdir resultsnfclaw run magmap --demo --outdir results # adds the upstream test profile (-profile test,docker)Inputs
| column | type | required | allowed values | constraints |
|---|---|---|---|---|
sample | string | yes | matches ^\S+$ | |
fastq_1 | string (file path) | yes | matches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$ | |
fastq_2 | string (file path) | no | matches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$ |
--input must match ^\S+\.(csv|tsv|yaml|yml|json)$.
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):
sample,fastq_1Any 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:
nfclaw run magmap --input samplesheet.csv --outdir results -profile docker \ --limit-cpus 4 --limit-memory 15.GBnfclaw 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 = '!>=26.04.0'.
To pin this release's declared minimum engine — useful when a newer Nextflow has incompatible config parsing:
nfclaw run magmap ... --nxf-ver 26.04.0--nxf-ver is recorded in <outdir>/provenance/, so the replay uses the same engine. See known-issues.
Demo
nfclaw run magmap --demo --outdir results # adds the upstream test profile (-profile test,docker)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.
sample,fastq_1| Column | Type | Required | Allowed / constraints |
|---|---|---|---|
sample | string | required | matches ^\S+$ |
fastq_1 | string (file path) | required | matches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$ |
fastq_2 | string (file path) | optional | matches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$ |
Required parameters
--inputstring (file path)Path to a file containing information about the samples in the experiment.
Constraint · matches ^\S+\.(csv|tsv|yaml|yml|json)$
--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
59 parameters · 8 groupsEvery 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.
42 parameters · 17 hidden
Featurecounts Option2
Allow featureCounts to handle multiple-mapping
Specify which features to count
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).
Input Output options16
Which tool to annotate genomes lacking a GFF with: 'prokka', 'bakta_supported_only' (Bacteria to Bakta, everything else -- Archaea and unclassified genomes -- to Prokka) or 'bakta_all' (everything to Bakta, including domains Bakta wasn't designed for).
Path to a directory holding the Bakta database, used only when --annotator is bakta_supported_only or bakta_all.
Path to a directory where Bakta annotation output is stored.
Comma-separated list of path to tab-separated files containing the output from CheckM. For column description, see usage docs.
Email address for completion summary.
Path to a directory where downloaded genome files is stored.
Path to a file containing information about the genomes to map to, see usage docs.
Comma-separated list of paths to tab-separated files containing information from GTDB. For column description, see usage docs.
Comma-separated list of paths to tab-separated files containing a .tsv file which has the same columns as the output from GTDB-Tk, see usage docs.
Comma-separated list of paths to Sourmash .sbt/.sbt.zip files.
Path to a file containing information about the samples in the experiment.
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.
Path to a directory where prokka output is stored.
Comma-separated list of paths to tsv files with information about genomes in NCBI 'assembly_summary' format. The default are GenBank and RefSeq summary files.
Also write the summary tables in Parquet format, alongside the default gzipped TSV.
Mapping options6
Select how BBmap should treat ambiguous mapping
Minimal identity for BBmap
Save bam output file
Save ref folder containing the reference index
Save genomes concatenated file
Instructs BBduk to use a fasta file to filter away sequences before running further analysis.
Quality Control options2
Skip FastQC.
Skip all QC steps except for MultiQC.
Sourmash options5
Perform mapping on all genomes for all samples ('joint') or sample-specific selections of genomes ('sample').
Skip Sourmash filtering for user-provided genomes
K-mer size used by Sourmash
Save Sourmash output
Select genomes from the same species: 'all', 'local' (prefer local genomes), 'completeness' (prefer the most complete) or 'gtdb' (use GTDB's criterion of completeness and contamination)
Trimming options7
Instructs Trim Galore to remove bp from the 5' end of read 1 (or single-end reads).
Instructs Trim Galore to remove bp from the 5' end of read 2 (or single-end reads).
Save the trimmed FastQ files in the results directory.
Skip the adapter trimming step.
Instructs Trim Galore to remove bp from the 3' end of read 1 AFTER adapter/quality trimming has been performed.
Instructs Trim Galore to remove bp from the 3' end of read 2 AFTER adapter/quality trimming has been performed.
Instructs Trim Galore to apply the --nextseq=X option, to trim based on quality after removing poly-G tails.
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/magmap/blob/1.3.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.