Output files¶
Everything a run writes goes under directories.output_dir. BacFlux resolves it to an
absolute path before any job starts: a relative value is read against the directory
Snakemake was launched from, not the configuration file, and the workflow never changes
its working directory.
Inside it the numbered directories group the analysis stages. The numbers are an
organisation scheme rather than an execution trace; independent jobs can overlap. The
numbering is identical in all four modes. Everything technology-specific is grouped
under 01.reads and 02.assembly, and every shared stage below that gets the same
number whichever front end produced the genome. A stage a mode cannot produce is simply
absent — it is never renumbered.
The stage numbers changed in 2.0.0
They differed per workflow before the four front ends were merged. The old-to-new map is on Coming from v1; this page describes only the current output layout.
Terms used on this page
| QC | quality control — the read, assembly and completeness checks |
| AMR | antimicrobial resistance |
| GTDB | Genome Taxonomy Database, the reference GTDB-Tk places each genome in |
| ANI | average nucleotide identity, a genome-to-genome similarity measure |
| EFSA | European Food Safety Authority, whose reporting thresholds the ABRicate analysis applies |
| ICE | integrative and conjugative element — sits in the chromosome and can move itself to another cell |
| IME | integrative mobilisable element — the same, but needs a helper element to move |
| COG, GO, KEGG, EC | the ortholog, gene-ontology, pathway and enzyme classifications eggNOG assigns to a protein |
The files to read first¶
A full run leaves several thousand files. These are the ones that carry the result.
| File | Answers | Modes |
|---|---|---|
02.assembly/{sample}/contigs_final.fasta |
The final assembly used by shared stages, alongside their required reads and metadata. | all |
02.assembly/{sample}/contaminants/contig_taxonomy_decisions.tsv |
Which contigs were kept, which were dropped, and the reason for each. | all |
02.assembly/{sample}/eval/checkm/{sample}_checkm_stats.tsv |
Completeness and contamination of that genome. | all |
03.taxonomy/{sample}/classify/gtdbtk.*.summary.tsv |
GTDB-Tk classification, reference matches and warnings. | all |
04.annotation/bakta/{sample}/{sample}.tsv |
The gene calls, with products. | all |
04.annotation/traits/{sample}/{sample}_trait_profile.tsv |
Which plant-growth, biocontrol, stress and degradation traits the genome's genes support, with the genes behind each call. | all, opt-in |
05.amr/abricate/{sample}/AMR_summary.txt |
AMR and virulence hits on the assembly, across four databases. | all |
05.amr/mapping/{sample}/{sample}_CARD_report.tsv |
AMR determinants found in the reads, classified by what kind of CARD entry each is. | [illumina, hybrid] |
06.plasmids/{sample}/platon/verified_plasmids.txt |
Contigs predicted as plasmids, with supplementary BLAST annotations. | all |
07.phages/checkv/{sample}/quality_summary.tsv |
Predicted prophages and how complete each one is. | all |
08.mobilome/{sample}/{sample}_amr_mobility.tsv |
For each AMR gene: the mobile-element context and a mobility tier. | all, opt-in |
09.report/multiqc_report.html |
Read QC, assembly QC, completeness and taxonomy for the whole batch on one page, and the trait calls when the trait profile is on. | all |
10.workbooks/{sample}_amr.xlsx |
The strain's resistance genes from CARD, NCBI and ResFinder and its virulence genes from VFDB, one row per gene, each with its plasmid, ICE/IME and phage context. | all |
10.workbooks/{sample}_traits.xlsx |
The strain's trait calls with their genes, caveats, suggested assays and references. | all, opt-in |
One output directory, one batch
A sample name is the only thing separating two runs that share an output_dir:
reuse a name and the second run overwrites the first sample's results throughout.
09.report/multiqc_report.html is overwritten unconditionally — the rule passes
MultiQC --force, because without it MultiQC writes multiqc_report_1.html
instead and the rule then fails on a missing output.
The reference databases kept in the output directory are not per sample and
are reused: the PhiX genome and its Bowtie2 index in 01.reads/phix/ and CARD
in 05.amr/card_db/ (illumina and hybrid only), and those under 04, 07
and 08. One output directory per project is therefore cheaper than one per run.
Layout¶
Bracketed tags follow config/config.yaml: [illumina, hybrid] means only those
modes write the line. Untagged lines are written in all four.
output_dir/
|-- 01.reads/ [illumina, nanopore, hybrid]
| |-- {sample}/
| | |-- illumina/ [illumina, hybrid]
| | `-- ont/ [nanopore, hybrid]
| | `-- adapters/ adapter scan and trimming, unless ont_adapter: off
| `-- phix/ [illumina, hybrid] genome + index
|-- 02.assembly/
| |-- adapter_lists/ UniVec's Illumina adapters, for the adapter screen
| `-- {sample}/
| |-- contigs_final.fasta <- the delivered genome
| |-- contigs_filt.fasta [illumina, hybrid, contigs]
| |-- spades/ [illumina, hybrid]
| |-- flye/ fix_start/ medaka/ [nanopore, hybrid]
| |-- polypolish/ snps/ [hybrid]
| |-- {sample}_replicons.tsv + _audit [nanopore, hybrid]
| |-- {sample}_medaka_model.txt [nanopore, hybrid]
| |-- contaminants/ BLAST + BlobTools + the audit
| `-- eval/ QUAST, CheckM, Qualimap, adapter screen
|-- 03.taxonomy/{sample}/ GTDB-Tk
|-- 04.annotation/
| |-- bakta/{sample}/ eggnog/{sample}/
| |-- antismash/{sample}/ + antismash/databases/
| |-- dbcan/{sample}/ + dbcan/<db version>/
| |-- baktfold/{sample}/ only when baktfold.run: true
| |-- baktfold/databases/ when baktfold.run or traits.run is true
| `-- traits/{sample}/ + traits/databases/ only when traits.run: true
|-- 05.amr/
| |-- abricate/{sample}/ four databases + a summary
| `-- mapping/{sample}/ + card_db/ [illumina, hybrid]
|-- 06.plasmids/{sample}/platon/
|-- 07.phages/
| |-- virsorter/{sample}/ + vs2_db/ unless phage.caller: genomad
| |-- genomad/{sample}/ + genomad_db/ only when phage.caller: genomad
| `-- checkv/{sample}/ + checkv_db/
|-- 08.mobilome/ only when mobilome.run: true
|-- 09.report/ multiqc_report.html
|-- 10.workbooks/ {sample}_amr.xlsx; {sample}_traits.xlsx with traits.run: true
`-- logs/ one file per rule per sample
|-- benchmarks/ time and peak memory of each tool step
`-- run_outcome.tsv how each run ended
01.reads — read QC and filtering¶
Absent entirely in contigs mode, which has no reads to QC.
| Path | Written by | Contents |
|---|---|---|
{sample}/illumina/{sample}_fastp.html |
trim_adapters |
fastp's adapter- and quality-trimming report, for a human. |
{sample}/illumina/{sample}_fastp.json |
trim_adapters |
The same numbers for MultiQC. |
{sample}/illumina/{sample}_sel_R{1,2}.fastq |
map_sel_contigs |
[hybrid] The Illumina pairs that mapped as proper pairs to the decontaminated Illumina assembly. Polypolish uses these reads for correction. Filtlong also uses them when parameters.hybrid.short_read_guidance: true; that guidance is disabled by default. Kept, not temporary — deleting them would force the whole short-read half to re-run. |
{sample}/ont/{sample}_filt.fastq |
filter_long_reads |
The Oxford Nanopore reads Filtlong kept — what Flye assembled and what Medaka polished with. |
{sample}/ont/raw_qc/, {sample}/ont/filt_qc/ |
raw_long_read_qc, filtered_long_read_qc |
NanoPlot read-length and quality profiles, before and after filtering: {sample}_NanoPlot-report.html, one interactive HTML file per plot, and {sample}_NanoStats.txt. Read side by side: the difference is what the filter did. The plots are HTML only, with no PNG copies, because NanoPlot needs a Chrome browser on the machine to draw static images. |
{sample}/ont/adapters/{sample}_adapter_scan.tsv, _adapter_choice.tsv, _fastplong_options.txt, _adapter_sequence.fasta |
find_ont_adapter |
What the Oxford Nanopore reads still carry and what is trimmed: reads with the adapter, with a barcode block and no adapter core, and with the Mu end, per 10,000 reads; the decision with the barcodes found and the second barcode; the options and sequences fastplong is given. Absent with ont_adapter: off. See ONT adapter trimming. |
{sample}/ont/adapters/{sample}_fastplong.json, .html |
trim_ont_adapters |
fastplong's own report: reads and bases in and out, reads trimmed, chimeric reads split. Not read by MultiQC, whose fastp module would take it for a fastp run. |
{sample}/ont/adapters/{sample}_adapter_check.tsv |
check_ont_trimming |
Among the reads Filtlong kept, how many still start with the adapter, or with the end of the trimmed sequence. |
The trimmed Illumina pairs ({sample}_trim_R{1,2}.fastq) and the trimmed Oxford
Nanopore reads ({sample}/ont/{sample}_trimmed.fastq.gz) are temporary and are gone
when the run finishes. 01.reads/phix/ is kept: the PhiX genome, phix.fna.gz,
fetched once, and the six Bowtie2 index files built from it, phix.*.bt2, about
8 MB, built once. The index is kept so that a sample added to the output folder later
runs on its own: built again, it would make every finished sample redo its PhiX
screen and everything after it, the assembly included
(What survives between runs).
See Illumina mode and Nanopore mode.
02.assembly — the genome and everything used to judge it¶
The delivered genome¶
02.assembly/{sample}/contigs_final.fasta is the one hand-off between the front end
and everything after it. Every rule in stages 03 to 08 works from this file or
from something built out of it, so nothing downstream has to know which assembler
ran. The one deliberate exception is hybrid, where QUAST, CheckM and GTDB-Tk are
also handed the Illumina assembly as a comparator — see eval/ below.
What it is differs by mode:
| Mode | contigs_final.fasta is |
Also kept |
|---|---|---|
illumina |
the decontaminated SPAdes assembly — decontamination is the last assembly step | contigs_filt.fasta, the pre-decontamination draft |
contigs |
the decontaminated input assembly | contigs_filt.fasta |
nanopore |
the Medaka consensus of the decontaminated, reoriented Flye assembly | contaminants/assembly_decontam.fasta |
hybrid |
the Oxford Nanopore assembly after Medaka and Polypolish | contaminants/contigs_sel.fasta, the decontaminated Illumina assembly, kept as the QC comparator and as Snippy's reference |
Set parameters.{nanopore,hybrid}.medaka_model: false and the consensus step drops out
of the last two rows: nanopore then delivers the decontaminated reoriented assembly as
it stands, hybrid delivers the reoriented Flye assembly after Polypolish alone; its
final decontamination screen remains advisory.
In contigs mode, what contigs_filt.fasta holds depends on the headers you fed in.
The length and coverage filter reads both numbers out of the header itself, so it can
only run on SPAdes-style headers: those keep their names and lose any contig under
500 bp or 2× coverage. Any other header style has no numbers to read, so nothing is
filtered and the headers are trimmed to their first token instead. Which branch ran
is the first line of logs/filter_contigs_{sample}.log.
In hybrid the contamination screen runs on the Illumina draft while the delivered
genome comes from the Oxford Nanopore analysis, so those two FASTAs have entirely different
contig names. That is not a bug and it is why the plasmid step gets its own BLAST
table (below).
contaminants/¶
The contamination screen and its audit trail, all under
02.assembly/{sample}/contaminants/.
| File | Contents |
|---|---|
{sample}_blastout |
The megablast table over the draft assembly: 15 tab-separated columns with the subject title last. |
{sample}_final_blastout |
[nanopore, hybrid] A second megablast, over contigs_final.fasta. It exists because the plasmid step looks contigs up by ID, and in the long-read modes the screened contigs and the delivered contigs do not share names. |
bestscore.blob.blobDB.table.txt |
The BlobTools per-contig table — taxonomy and coverage. The evidence behind every keep/drop decision, so it is kept. |
contig_taxonomy_decisions.tsv |
The audit file. Every contig, its assigned genus, and the reason it was kept or dropped. |
contigs.list |
The kept contig IDs, one per line. |
{sample}_composition.txt |
One line per genus with its share of the DNA (bp) and of the contig count (contigs), over every contig in the BlobTools table — kept or dropped. A report to read; no later step reads it. |
{sample}_kept_genus.txt |
One line: the genus of the kept contigs, by default the kept genus holding the most DNA. The annotation step gives it to Bakta as the organism's genus. Empty when no kept contig has a genus. |
{sample}_final_contig_taxonomy_decisions.tsv, {sample}_final_composition.tsv, bestscore_final.blob_final.blobDB.table.txt |
[hybrid] The second screen, of the delivered genome: a verdict per contig under parameters.decontamination.long_read_mode, its composition report, and its BlobTools table. A check only; contigs_final.fasta is not changed by it. |
blob.blobDB.json, the coverage file beside it, and the alignment BAM are all
temporary. Full reasoning, and the two routes by which this step can delete a real
plasmid, on Decontamination.
eval/¶
| Path | Contents |
|---|---|
{sample}_qc_genomes.tsv |
Which genome is which: bin id, role (primary or comparator), technology, source path. In hybrid this is the file that says which of the two rows is the delivered genome. |
quast/ |
QUAST assembly metrics — contig count, N50, largest contig, total length, GC. |
checkm/{sample}_checkm_stats.tsv |
CheckM completeness and contamination. lineage.ms beside it is CheckM's own marker-set file. |
qualimap/ |
Coverage depth and evenness of the reads on the assembly. Absent in contigs mode, where the only alignment is the contigs against themselves and a report on it would say nothing. |
adapter_screen/{sample}_adapter_loci.tsv |
The adapter screen of the delivered genome: one row per locus of adapter or barcode sequence, with its contig, topology, position, the adapters that matched (best hit first) and counted and reason columns. A header line alone when nothing was found. |
adapter_screen/{sample}_adapter_screen_mqc.tsv |
The sample's row of the Adapters table of the MultiQC report. |
adapter_screen/{sample}_adapter_blast.tsv, _adapter_query.fasta |
Every BLAST hit, also those that do not pass the screen's rules, and every adapter searched for. |
In hybrid, QUAST, CheckM and GTDB-Tk each run over two genomes per sample —
{sample}_illumina and {sample}_ont — so one report holds both and the comparison
is the point. The staging directory eval/genomes/ that carries them there is
temporary. The adapter screen searches the delivered genome only. Its Illumina adapter
list, the Illumina records of NCBI UniVec, sits once per output folder in
02.assembly/adapter_lists/univec_illumina.fasta, with PROVENANCE.txt beside it. See
Assembly QC.
Front-end working directories¶
Kept as the assembler left them, for when you need to see what happened.
| Directory | Modes | Contents |
|---|---|---|
spades/ |
[illumina, hybrid] |
SPAdes' own output, including contigs.fasta before the length and coverage filter. |
flye/ |
[nanopore, hybrid] |
assembly.fasta, Flye's assembly_info.txt (which carries the circularity call), and ignore_list.txt — the contigs Flye did not close, which dnaapler must not rotate. |
fix_start/ |
[nanopore, hybrid] |
dnaapler's reoriented assembly, the header-trimmed copy, and the reorientation summary. |
medaka/ |
[nanopore, hybrid] |
consensus.fasta and Medaka's working files. Absent when Medaka is switched off. |
polypolish/ |
[hybrid] |
Empty at the end — every file in it is temporary. |
snps/ |
[hybrid] |
One numbered sub-directory per Snippy run — 01.flye_snps_dir through 04.polypolish_snps_dir — each comparing one Oxford Nanopore stage against the Illumina assembly, plus SNPs_summary.txt. With Medaka off, 03 holds a skipped.txt instead of a comparison. |
{sample}_replicons.tsv |
[nanopore, hybrid] |
The five-column table handed to Bakta as --replicons: topology from Flye, replicon type from dnaapler. {sample}_replicons_audit.tsv beside it carries the raw numbers and a reason per contig. |
{sample}_medaka_model.txt |
[nanopore, hybrid] |
The Medaka model that was confirmed or inferred, written early so a bad model fails in seconds rather than after the assembler has run. Absent when Medaka is switched off, along with the rule that writes it. |
03.taxonomy — GTDB-Tk¶
One directory per sample, named by GTDB-Tk itself. The file to read is
classify/gtdbtk.bac120.summary.tsv (gtdbtk.ar53.summary.tsv for archaea): the
placement, the closest reference and the ANI to it.
MultiQC reads that summary, and — when the mobilome module is on — so does the step
that maps the species to an AMRFinderPlus --organism, which is what unlocks
point-mutation detection. See Taxonomy.
04.annotation¶
| Path | Contents |
|---|---|
bakta/{sample}/ |
The full Bakta annotation set — {sample}.gff3, .tsv, .faa, .fna, .gbff and more. Three later stages reach into this directory: eggNOG takes the .faa, antiSMASH the .gbff, dbCAN both the .faa and the .gff3. With the optional layers on, Baktfold takes the .json, the trait profile the .faa and .tsv, and the mobilome module the .faa, .gff3 and .tsv. |
eggnog/{sample}/ |
{sample}.emapper.* — orthologous group per protein, with COG category, GO, KEGG KO and pathway, EC. Terminal: nothing else reads it. |
antismash/{sample}/ |
Secondary-metabolite clusters, with antiSMASH's own HTML report. Terminal, unless the trait profile is on: it reads the region types as supporting evidence. |
antismash/databases/ |
The shared antiSMASH reference database: downloaded here, or a symlink view of a copy you already hold. |
dbcan/{sample}/ |
CAZyme calls, gene clusters and substrate predictions. Terminal. |
dbcan/<db version>/ |
The shared dbCAN database, likewise. The folder is named from the download URL, so the version is visible on disk. The empty .verified.sha256 beside it is the marker written once the checksum matched, and its presence is what stops the download repeating. |
baktfold/{sample}/ |
Only with baktfold.run: true. Bakta's file set again, with names found by predicted structure for the proteins Bakta called hypothetical, plus {sample}.inference.tsv (the database hit behind each name) and one baktfold_<database>_tophit.tsv per database. Every other stage reads Bakta's annotation; only the trait profile, when on, also counts these names. |
baktfold/databases/ |
Baktfold's database and the ProstT5 model: downloaded here, or a symlink view of a copy you already hold. Also set up when traits.run: true, which uses the ProstT5 model. |
traits/{sample}/ |
Only with traits.run: true. {sample}_trait_profile.tsv (one row per trait: called, partial or not called, with the genes behind it), {sample}_trait_profile_audit.tsv (the reason for each decision), {sample}_trait_genes.tsv (each protein that matched a gene, with its evidence and whether it counted), and {sample}_trait_provenance.json (the fingerprints of the catalogue and of these three tables, with the calling parameters, checked before the catalogue is quoted beside the calls). structure/ holds the proteins searched ({sample}_searched.faa), their 3Di sequences (prostt5/) and the Foldseek query database (querydb/), kept so the slow 3Di step runs once (the archive clean-up removes them). Read by 09.report/traits_summary.tsv and 10.workbooks/{sample}_traits.xlsx. See Trait profile. |
traits/databases/ |
EcoFoldDB v2.0: downloaded here and checked against links.ecofolddb_md5, or a symlink view of a copy you already hold. |
eggNOG is the slow tail of a BacFlux run. See Annotation.
05.amr¶
The assembly-based ABRicate screen runs in every mode. Illumina and hybrid modes also map reads against CARD. These analyses use different inputs and detection criteria, so disagreement should be investigated rather than treated as an error.
abricate/{sample}/¶
One TSV per database — card, ncbi and resfinder for resistance genes, vfdb for
virulence genes — plus AMR_summary.txt, which collates a sample's four tables.
This analysis carries the EFSA thresholds: a hit needs ≥80% identity and ≥70% gene-length
coverage. Beside the per-sample folders, abricate/abricate_databases.tsv gives ABRicate's
version and, for each database, the number of sequences and the date ABRicate lists for its
copy, once per run.
mapping/{sample}/ — [illumina, hybrid]¶
Trimmed reads mapped onto CARD's protein homolog model. Read mapping can detect sequence not recovered in the assembly, but coverage, related references and ambiguous mapping affect the result.
| File | Contents |
|---|---|
{sample}_CARD_report.tsv |
The one to read. One row per CARD sequence that cleared the coverage gate, with CARD's own classification joined on: aro_accession, aro_name, covered_percent, category, resistance_mechanism, amr_gene_family, drug_class, reference_organism, note. category is what stops an efflux-pump subunit being counted as an acquired resistance gene. |
{sample}_covstats.tsv |
BBMap's raw coverage table, sorted by descending covered percent. The evidence behind the report. |
{sample}_AMR_legend.tsv |
Every feature covered ≥70%, with its row from CARD's aro_index.tsv. |
What this analysis is actually screened at
BBMap is passed minid=0.76, its own default (CARD_MIN_IDENTITY in
workflow/rules/shared/00_common.smk). Read this as a sensitive screen: its
specificity comes from requiring reads to cover at least 70% of the reference
gene's length (CARD_MIN_COVERED, same file), not from per-read identity.
05.amr/card_db/ holds the CARD database this run used — downloaded there, or a
symlink view of the copy at directories.card_db. Either way it is kept, so CARD is
fetched once per output folder. See
Antimicrobial resistance.
06.plasmids¶
| Path | Contents |
|---|---|
{sample}/platon/verified_plasmids.txt |
The terminal plasmid product on the default path: the contigs Platon called plasmid, each annotated with whether its best nucleotide hit also says "plasmid". That check is supplementary and never a filter — a mobile element on a genuinely chromosomal contig can push both signals the same wrong way. |
{sample}/platon/contigs_final.tsv |
Platon's per-contig table with its replicon-distribution score. Platon names every file after the input basename, hence contigs_final.*. |
{sample}/platon/contigs_final.chromosome.fasta |
The contigs Platon called chromosome. |
{sample}/{sample}_plasmid_concordance.tsv |
Optional. Written only when phage.caller: genomad. One row per contig joining Platon's call and geNomad's, with a confidence column: both callers agree → high, one only → medium, a real clash → low. Nothing is dropped; a disagreement is flagged and kept. |
See Plasmids.
07.phages¶
Which caller runs is set by phage.caller, and the choice changes what stage 06
holds as well as this one.
| Path | Contents |
|---|---|
virsorter/{sample}/ |
Default. VirSorter2's calls at a deliberately loose score cutoff of 0.5; the file CheckV grades is final-viral-combined.fa. |
genomad/{sample}/ |
Only when opted in. One geNomad run produces both the virus calls (contigs_final_summary/contigs_final_virus.fna) and the plasmid calls (contigs_final_summary/contigs_final_plasmid_summary.tsv) that stage 06's concordance table needs. |
checkv/{sample}/quality_summary.tsv |
The phage deliverable. Completeness, contamination and a quality tier per predicted viral sequence. A genome with no viral calls gets a header-only file rather than a failed run. |
vs2_db/, genomad_db/, checkv_db/ |
The caller's and CheckV's databases. Each is either downloaded here or built as a symlink view of a copy you already hold — BacFlux only ever reads your copy. |
See Prophages.
08.mobilome — opt-in¶
Written only when mobilome.run: true. That adds ten rules on the default path; the
module's other twelve belong to four optional layers, each of which stays off until
you configure a source for it. See Enabling the module.
Databases and model sets sit at the top of the stage, fetched once and shared by every
sample: conjscan_models/, and — each only when its layer is configured —
icescan_models/, tncentral_db/, iceberg_db/, isosdb_db/.
Per sample, 08.mobilome/{sample}/ holds:
| File | Contents |
|---|---|
{sample}_amr_mobility.tsv |
The deliverable. One row per AMR gene: its mobile-element context, the element's identity where one is known, the contig-edge flags, a mobility tier from 1 to 6 and a confidence. |
{sample}_amr_mobility_audit.tsv |
Why every gene that got no context got none. |
{sample}_is_summary.tsv |
The contig-boundary summary: how many insertion-sequence calls sit within mobilome.contig_boundary_bp of a contig end, and what fraction of the total that is. Read this before the table above. |
{sample}_is_elements.tsv, {sample}_is_discarded.tsv |
One row per insertion-sequence prediction, and the dropped rows with a reason — among them overlaps_dnaA, a call lying over the essential gene dnaA, and overlaps_helicase_loader, a partial IS21 lying over the chromosome's own helicase loader (dnaC or dnaI with its chromosomal partner beside it and no IS21 transposase near it). ISEScan reports both because its IS21 profiles also match DnaA and the loader, ATPases of the same family as the IS21 helper protein IstB. Neither call is an insertion: both genes are essential. |
{sample}_ice_candidates.tsv, {sample}_ice_discarded.tsv |
ICE/IME candidates with their anchors, boundaries and class; and the discard trail. |
{sample}_amrfinderplus.tsv, _amrfinderplus_mutations.tsv |
The AMR calls with coordinates and a method column; point mutations separately. |
{sample}_amrfinder_organism.txt, _amrfinder_organism_audit.tsv |
Which AMRFinderPlus --organism the GTDB-Tk placement mapped to, or none, and why. |
{sample}_replicon_calls.tsv |
Chromosome or plasmid, per contig, with the evidence for the call. |
{sample}_contig_lengths.tsv |
The yardstick every contig-edge flag is measured against. |
isescan/, conjscan/ |
The tools' own output trees, kept as raw evidence. icescan/ joins them when that optional second model set is switched on. |
{sample}_named_elements.tsv, {sample}_named_elements_discarded.tsv, {sample}_tncentral_blast.tsv |
Optional. Curated transposons and integrons — the layer that makes tier 4 reachable. |
{sample}_ice_candidates_named.tsv, {sample}_ice_naming.tsv, {sample}_iceberg_blast.tsv |
Optional. Curated names put on the ICE/IME candidates. Labels only: this layer cannot change any gene's tier. |
{sample}_is_copy_number.tsv, {sample}_is_copy_number_audit.tsv, {sample}_isosdb_covstats.tsv, {sample}_assembly_covstats.tsv |
Optional, [illumina, hybrid]. IS copy numbers estimated from read depth and compared with the located calls; the difference estimates the copies the assembly collapsed rather than counting them. |
conjscan_output_missing means the search did not run
An ICE/IME search that ran and found no conjugation machinery above the reporting thresholds, and a search that did not run, both leave the results table without calls.
They are distinguished in {sample}_ice_discarded.tsv. If it carries the reason
conjscan_output_missing, the expected search output was unavailable: read the
absence of ICE and IME calls as unknown, not as absence. This is the same
distinction the mobility ladder makes between not_assessable and tier 1.
Every column of the mobility table, with real rows, is on Reading the output. What fragmentation does to a call, and what not to conclude from one, is on Draft assemblies.
09.report¶
| File | Contents |
|---|---|
multiqc_report.html |
General Statistics, then fastp, NanoStat (NanoPlot's statistics), QUAST, QualiMap, CheckM, GTDB-Tk and Bakta, with traits.run: true the Trait profile, then References and Software Versions. A section appears only when the mode has its tool. |
multiqc_config.yaml |
The generated config: the order of the sections and the sample renaming, kept so both can be inspected. |
multiqc_report_data/ |
MultiQC's parsed numbers behind the report. |
bacflux_references_mqc.html |
The References section: the paper of each tool the report shows, written into the report so it can be read offline. |
multiqc_versions.yaml |
The versions shown under Software Versions. |
traits_summary.tsv |
Only with traits.run: true. Every sample's trait calls side by side: one row per sample, one column per trait, each cell called, partial or not called. Made again whenever a sample is added. |
traits_summary_mqc/ |
Only with traits.run: true. The plot files of the report's Trait profile section: the call counts per strain, one heatmap per application label, and each trait's references and suggested assay. |
Left alone, MultiQC names a sample after every directory component of the file it came
from. The generated config rewrites those into <what it is> | <sample> — so a panel
row reads assembly QC | S1, and a hybrid sample's two genomes appear separately as
completeness Illumina | S1 and completeness ONT | S1.
Software Versions gives each tool's version as the tool wrote it into its own output
for these samples. A tool that writes none, such as CheckM, gets the version pinned in
its environment file, marked (workflow pin): the version this copy of BacFlux
installs, which is not proof of the version that made a result computed earlier.
The report directory itself is deliberately not a declared Snakemake output, so anything
you drop in it survives a re-run. traits_summary_mqc/ is the exception: it is emptied
and written again whenever the trait summary is made again, so keep your own files
outside it.
10.workbooks¶
| File | Contents |
|---|---|
{sample}_amr.xlsx |
Every run. The resistance genes ABRicate found in CARD, NCBI and ResFinder, and the virulence genes it found in VFDB, one row per gene, each answering yes, no, uncertain or not_assessed to three questions: on a plasmid, inside an ICE or IME, inside a phage region? Further sheets keep every database hit, the mobile elements and virus regions the answers rest on, the mobilome module's tables when it ran, the inputs and a data dictionary. |
{sample}_traits.xlsx |
Only with traits.run: true. Every trait of the catalogue with its call, genes, caveat, suggested assay and references, and the plasmid and phage context of every gene behind the calls. |
Without the mobilome module, the ICE/IME and mobility-tier columns read not_assessed,
not no. Each workbook is made again whenever one of its inputs changes; the folder is
not a declared Snakemake output, so making one strain's workbook again never removes
another's. Keep notes in a copy elsewhere. The sheets and the rule behind each answer
are explained under Per-strain workbooks.
logs¶
One file per rule invocation, flat, with the sample appended where the rule runs per
sample — logs/annotation_S1.log, logs/multiqc.log. The stem is usually the rule's
own name, but not always: every mobilome rule logs under a mobilome_ prefix, so rule
isescan writes logs/mobilome_isescan_S1.log, and a handful elsewhere are shortened
— map_amr_db writes logs/map_amr_S1.log. The log is the first place to look when a
rule fails, and the only place some warnings go: the decontamination selector's
"N contigs from the BlobTools table were not found in the FASTA", for instance, is
written there rather than to the console.
logs/benchmarks/¶
How much time and memory each tool step needed, measured by Snakemake while the job
ran: one small table per step and sample, logs/benchmarks/<rule>_<sample>.tsv, named
after the rule (so logs/benchmarks/isescan_S1.tsv, although that rule's log is
logs/mobilome_isescan_S1.log). Snakemake writes the file once the job has worked; a
job that fails writes none. Nothing in the workflow reads these files: they are there
to size a computer, or the memory and time a cluster job asks for
(Running BacFlux).
Each file has a header line and one line of figures:
| Column | What it is |
|---|---|
s, h:m:s |
wall-clock time, in seconds and as hours:minutes:seconds |
max_rss |
peak resident memory, in MB (1 MB = 1024 × 1024 bytes) |
max_vms |
peak virtual memory, in MB: memory the programs reserved, most of it never used |
max_uss, max_pss |
peak memory of the programs' own pages (uss), and with shared pages divided among the programs that share them (pss), in MB |
io_in, io_out |
MB read from and written to disk |
mean_load |
the average CPU use, in percent of one CPU (400 means four CPUs busy) |
cpu_time |
CPU time, in seconds, summed over every program the job started |
Snakemake adds up every program the job starts, but it looks only every 30 seconds
(every half second during the first 15 seconds), so a peak shorter than that can be
missed, and a job that ends within a fraction of a second shows NA. The BLAST rules show a peak about
as large as the BLAST database, around 225 GiB for core_nt, although BLAST's own
memory is about 2 GB; Running BacFlux explains why.
These are the rules that write one: every rule that runs a tool once per sample with
several threads, and filter_long_reads, whose Filtlong runs on one thread but holds a
score for every read in memory (and, with short-read guidance, the k-mers of the
Illumina reads). The once-per-run database downloads and set-ups write none, and
neither do the other single-thread steps: BacFlux's own scripts, the BlobTools tables
(blob_json, blob_table and their _final versions), the index builds
(index_contigs, index_selected_contigs), ABRicate (amr_contigs), the adapter
search (blast_adapters) and the Medaka model check (check_medaka_model).
| Rule | Tool | When it runs |
|---|---|---|
map_phix |
Bowtie2: the reads against PhiX | [illumina, hybrid] |
trim_adapters |
fastp | [illumina, hybrid] |
raw_long_read_qc, filtered_long_read_qc |
NanoPlot | [nanopore, hybrid] |
trim_ont_adapters |
fastplong | [nanopore, hybrid], unless ont_adapter: off |
filter_long_reads |
Filtlong | [nanopore, hybrid] |
illumina_assembly |
SPAdes | [illumina, hybrid] |
map_sel_contigs |
Bowtie2: the Illumina reads against the kept contigs | [hybrid] |
ont_assembly |
Flye | [nanopore, hybrid] |
fix_start |
dnaapler | [nanopore, hybrid] |
long_read_consensus |
Medaka | [nanopore, hybrid], unless medaka_model: false |
short_read_correction |
BWA and Polypolish | [hybrid] |
compare_hybrid_assemblies |
Snippy: the differences between the assembly stages | [hybrid] |
map_contigs |
Bowtie2 with short reads, minimap2 with long reads, minimap2 of the contigs against themselves in contigs mode | all modes |
blast_contigs |
BLAST against blast_db |
all modes |
blast_final_contigs |
BLAST of the finished genome | [nanopore, hybrid] |
map_final_contigs |
minimap2: the long reads against the delivered genome | [hybrid] |
genome_assembly_evaluation |
QUAST | all modes |
completeness_and_contamination |
CheckM | all modes |
map_evaluation |
Qualimap | [illumina, nanopore, hybrid] |
taxonomic_assignment |
GTDB-Tk | all modes |
annotation |
Bakta | all modes |
functional_annotation |
eggNOG-mapper | all modes |
secondary_metabolites_analysis |
antiSMASH | all modes |
cazyme_gene_cluster |
dbCAN | all modes |
structure_annotation |
Baktfold | baktfold.run: true |
trait_structure_query, trait_structure_search |
ProstT5, then Foldseek against EcoFoldDB | traits.run: true |
map_amr_db |
BBMap against CARD | [illumina, hybrid] |
plasmid_search |
Platon | all modes |
viral_identification_virsorter2 |
VirSorter2 | phage.caller: virsorter2, the default |
genomad_end_to_end |
geNomad | phage.caller: genomad |
viral_quality |
CheckV | all modes |
amrfinderplus, isescan, conjscan |
AMRFinderPlus, ISEScan, MacSyFinder with CONJScan | mobilome.run: true |
icescan |
MacSyFinder with ICEscan | the icescan layer |
tncentral_blast, iceberg_blast |
BLAST | the tncentral and iceberg layers |
assembly_depth, isosdb_map |
BBMap | the isosdb layer, [illumina, hybrid] |
An output folder made with an earlier release gets these files only for the steps that run again; Snakemake does not run a finished step again just to measure it.
logs/run_outcome.tsv¶
How each run ended: one row per start of Snakemake that ran jobs, the latest last.
When a run ends, BacFlux adds the row and prints one line about it near the end of the
console output, followed only by Snakemake's last few lines (the path of its log, the
time the run took and, after a failure, WorkflowError: …):
[BacFlux] RUN SUCCEEDED: every requested file is complete (outcome written to /data/out/logs/run_outcome.tsv).
[BacFlux] ERROR run: 1 job(s) failed, so the run is incomplete: annotation (sample=S1). Their logs: /data/out/logs/annotation_S1.log. Fix the cause and start the same command again; the jobs that finished are not repeated (outcome written to /data/out/logs/run_outcome.tsv).
| Column | What it holds |
|---|---|
finished |
when the run ended, local date and time to the second (2026-11-27T14:05:09) |
outcome |
success or failure |
failed_jobs |
the jobs that failed, each as rule (wildcards), separated by ;; - when none failed |
job_logs |
the logs of those jobs, separated by ;; - when none failed |
snakemake_log |
Snakemake's own log of that start, in .snakemake/log/ of the launch folder |
The failed jobs come from Snakemake's own log. A run stopped with Ctrl-C in the
terminal, or by a batch system at its time limit, is a failure too: the signal stops
the running jobs as well, so the row names them, and the line says that the run was
stopped and which jobs did not finish, instead of asking for a cause to fix:
[BacFlux] ERROR run: the run was stopped (Ctrl-C, or a kill signal such as a batch system's time limit), and 2 job(s) did not finish: annotation (sample=S1), annotation (sample=S2). Their logs: … Start the same command again; the jobs that finished are not repeated (outcome written to …).
When the log names no job that did not finish (a stop signal sent to Snakemake alone,
which lets the running jobs finish first, or Snakemake started with --quiet), the row
has - in both job columns. Neither the row nor the line comes from a dry run, from a
start that finds nothing to do, from a start stopped by a check before any job ran, or
from a Snakemake killed outright (kill -9, a power cut).
Temporary files, and directories a re-run wipes¶
Some outputs are declared temporary: Snakemake deletes them as soon as every rule that needed them has finished. They are absent from a completed run, which is normal and not a failure.
| Gone by the end | Why it existed |
|---|---|
01.reads/{sample}/illumina/{sample}.{1,2}.fastq and {sample}_trim_R{1,2}.fastq |
The PhiX-free pairs and then the fastp-trimmed pairs. The trimmed ones survive until the last rule that reads them is done: the assembler, the coverage alignment, the CARD analysis, and in hybrid the mapping that picks the Illumina pairs to keep. |
01.reads/{sample}/ont/{sample}_trimmed.fastq.gz |
The Oxford Nanopore reads after fastplong; Filtlong reads them and keeps the selection in {sample}_filt.fastq. |
02.assembly/{sample}/eval/adapter_screen/{sample}_search_contigs.fasta |
The delivered genome with each circular contig extended by its first 200 bp, for the adapter screen's BLAST search. |
02.assembly/{sample}/contaminants/{sample}_map.bam, the BlobTools JSON and coverage file |
Intermediates of the screen; the BlobTools table is kept. |
02.assembly/{sample}/eval/genomes/ |
Staging copies of the assemblies under their bin ids, for QUAST, CheckM and GTDB-Tk. |
02.assembly/{sample}/polypolish/ contents |
Alignments and the pre-correction draft. |
04.annotation/eggnog/{sample}_tmp/ |
emapper's scratch space. |
04.annotation/traits/{sample}/{sample}_ecofolddb_hits.tsv |
The trait profile's Foldseek hit table, about 170 MB per genome, read only by the trait calls. Making the calls again later repeats the 2-minute search from the kept structure/ folder. |
04.annotation/traits/{sample}/search_tmp/ |
Foldseek's scratch space for that search. |
05.amr/card.tar.bz2, on the download path |
The downloaded CARD archive, removed once it is unpacked into 05.amr/card_db/, which is kept. |
08.mobilome/{sample}/assembly_depth_ref/, isosdb_ref/ |
BBMap indexes for the copy-number analysis. |
09.report/multiqc_inputs/ |
Relabelled CheckM and GTDB-Tk copies staged for MultiQC. |
Nearly every tool directory on this page is a declared Snakemake directory output:
the per-sample trees written by Bakta, eggNOG, antiSMASH, dbCAN, Baktfold, QUAST,
CheckM, Qualimap, GTDB-Tk, Platon, the phage caller, CheckV, ISEScan and CONJscan, the
trait profile's structure/ folder, and every database directory the workflow
fetches. Snakemake deletes a directory output before re-running the rule that makes
it, so anything you put inside one will not survive that rule re-running. Keep your
own files beside them, not in them. 09.report/ is the deliberate exception, although
keeping your own analysis files outside generated outputs is easier to manage.
See also¶
- Configuration — every key referred to above, and its default.
- Running BacFlux — dry runs,
--cores, and what a re-run rebuilds. - Reference databases — which databases you supply and which the workflow fetches into the output directory.
- Troubleshooting — an empty or missing output, and what it usually means.