Enabling the mobilome module¶
Set mobilome.run: true in the configuration used for the run. The core module
reuses the configured Bakta database and downloads CONJscan models as needed, so
it requires no additional database path. Optional layers have separate sources.
Everything else in the mobilome: block is either a threshold with a sensible default
or one of the four optional layers, each of which stays off until you give it a source
of its own (Optional layers).
Terms used on this page
| AMR | antimicrobial resistance |
| IS | insertion sequence — the smallest mobile element, carrying only the genes it needs to move itself |
| ICE | integrative and conjugative element — sits in the chromosome and carries its own conjugation machinery |
| IME | integrative mobilisable element — sits in the chromosome but needs a helper element to move |
| att site | the short direct repeat left at each end of an element where it integrated |
| HMM | hidden Markov model — a statistical profile of a gene or protein family |
What run: true adds¶
Ten rules on the default configuration, of which three are per-sample tool runs at up to 8 threads.
| Added | What it does |
|---|---|
| AMRFinderPlus | the AMR calls the module reasons about, with coordinates, a Method column and a partial-at-contig-end flag |
| ISEScan 1.7.3 | insertion sequences on the delivered genome |
| MacSyFinder 2.1.6 running the CONJscan models | relaxase, coupling protein and mating-pair apparatus — the machinery behind an ICE, an IME or a conjugative plasmid |
| four helper steps | replicon calls from Platon, contig lengths, the ICE/IME caller with its att-site search, and the co-localisation that writes the deliverable |
Two of those are new conda environments, both from bioconda. AMRFinderPlus is not new:
it is already installed by Bakta, and reads its database from
{bakta_db}/amrfinderplus-db/latest — so that AMRFinderPlus data do not need a separate
download. CONJscan models are obtained separately on first use.
Stage 08 consumes earlier stages rather than repeating them. It reads the delivered
genome, the Bakta proteins, GFF3 and annotation table, the GTDB-Tk species call, and
Platon's replicon calls from 06.plasmids. Nothing in it re-detects a plasmid or a prophage.
The first run needs network access
The CONJscan model package is downloaded at run time: rule conjscan_models
fetches the archive of the pinned release, CONJScan 2.1.0, from github.com and
installs it with MacSyFinder's msf_data install. Its PROVENANCE.txt records the
version, the address it came from and the date, and the rule writes the models'
licence notice to the top of its own log.
What runs in which mode¶
The ICE/IME caller, the composite-transposon test and the att-site search run in
all four modes, illumina included. The constraint on them is assembly contiguity,
not the sequencer — and every call carries the flags that say how contiguous the
assembly under it was (Draft assemblies).
The one mode-restricted analysis is the optional ISOSDB copy-number layer, which maps
reads and therefore needs them: illumina and hybrid only.
--organism, and why the taxonomy stage matters here¶
AMRFinderPlus checks curated point mutations when a supported organism is selected. This supplements gene-presence screening, which does not resolve the specific substitutions from a presence call alone. A mutation result does not itself establish intrinsic resistance or lack of transfer potential; see The mobility ladder.
So the module maps the GTDB-Tk call onto an AMRFinderPlus organism name and passes
--organism when a confident mapping exists. There is no official convention for that
translation — GTDB's own FAQ states there is no direct mapping to NCBI taxa — so BacFlux
uses project-local, release-specific mapping tables and curated refusal rules.
The mapping is documented and audited; it is not an authoritative reconciliation
of the two taxonomies:
- every decision, including every refusal, is written to
{sample}_amrfinder_organism_audit.tsvwith its reason; - a genome with no confident mapping gets no
--organismrather than a guess; - without
--organism,{sample}_amrfinderplus_mutations.tsvholds a single line stating that point-mutation screening was not available: not assessed, never none found.
Re-check the table when you change the GTDB release.
The other AMR analyses are untouched
ABRicate and the CARD read screen keep running exactly as before. The three analyses are complementary: the CARD read screen detects genes the assembly collapsed or broke, ABRicate screens four databases, and AMRFinderPlus supplies the structured gene and mutation output this module uses. See Antimicrobial resistance.
What it costs¶
Time. Three extra tool runs per sample, each capped at 8 threads, plus a one-off model download. On a typical bacterial isolate none of them is close to eggNOG or GTDB-Tk in cost.
Disk. The model package and the per-sample isescan/ and conjscan/ trees, kept as
raw evidence.
A licence decision. Turning the module on fetches the CONJscan models, which Institut
Pasteur / CNRS license under CC BY-NC-SA 4.0. BacFlux never ships them — you download
them, under your own agreement with the licensor, exactly as with
bakta_db. Selecting the module prints the notice at parse time. Licence types for
everything the module can fetch are on Licensing.
The rest of the block¶
mobilome:
run: false
max_composite_span_bp: 20000 # two IS copies further apart are not one composite
coverage_profile: 0.5 # how much of an HMM profile a hit must cover
contig_boundary_bp: 100 # how close to a contig end counts as "at the edge"
require_trna_boundary_for_high: false
icescan: { run: false, ... } # ─┐ the four optional layers, all off by
tncentral: { url: "", ... } # │ default: ICEscan by its own run flag,
iceberg: { urls: [], ... } # │ the other three because they have
isosdb: { fasta_url: "", ... } # ─┘ nowhere yet to fetch from
ICEscan is the only one of the four that ships a working URL, because it has a single
canonical source — the bundle EBI publishes for ICEfinder2 — so run: true is all it
needs. For the other three you paste a URL in yourself, and the commented # e.g. line
beside each key is the address that was used to validate this module. Each of the
four also takes a local dir instead, and iceberg.dir accepts the iceberg_db
folder an earlier BacFlux run built.
Two of them need explaining before a first run.
coverage_profile(default 0.5, MacSyFinder's own default) is the fraction of a profile HMM an alignment must cover before the hit is kept. It is not identity and not an E-value: a hit can be statistically beyond doubt and still be dropped by this rule alone. Every validated result in these docs was measured at 0.5. What lowering it buys and costs, over all three benchmark sets, is on Tuning.require_trna_boundary_for_high(default false) demands a tRNA-anchored att site before any element may be called high confidence. Sensible on closed long-read assemblies, where an unresolved boundary is a warning sign; on a draft it is the norm, which is why it is off by default.
Every key, in the file's own order, is in Configuration.
Confirming it is on¶
The parse-time header names the module before any job starts, alongside the mode and the phage caller. If it is not in the header, it is not running — check that you edited the config you passed on the command line.
Output lands in 08.mobilome/: one directory per sample, plus the shared model and
database directories at the top of the stage. See
Reading the output.