flavotyper 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. flavotyper-0.3.0/LICENSE +201 -0
  2. flavotyper-0.3.0/PKG-INFO +316 -0
  3. flavotyper-0.3.0/README.md +283 -0
  4. flavotyper-0.3.0/pyproject.toml +71 -0
  5. flavotyper-0.3.0/setup.cfg +4 -0
  6. flavotyper-0.3.0/src/flavotyper/__init__.py +10 -0
  7. flavotyper-0.3.0/src/flavotyper/__main__.py +11 -0
  8. flavotyper-0.3.0/src/flavotyper/align.py +153 -0
  9. flavotyper-0.3.0/src/flavotyper/cli.py +220 -0
  10. flavotyper-0.3.0/src/flavotyper/config.py +216 -0
  11. flavotyper-0.3.0/src/flavotyper/data/Flavobacterium_psychrophilum_NCIMB_1947T.fna +45312 -0
  12. flavotyper-0.3.0/src/flavotyper/data/Flavotyper_markers.fasta +315 -0
  13. flavotyper-0.3.0/src/flavotyper/data/Flavotyper_reference_loci.fasta +3813 -0
  14. flavotyper-0.3.0/src/flavotyper/data/Flavotyper_rules.yaml +46 -0
  15. flavotyper-0.3.0/src/flavotyper/database.py +298 -0
  16. flavotyper-0.3.0/src/flavotyper/exceptions.py +17 -0
  17. flavotyper-0.3.0/src/flavotyper/io.py +63 -0
  18. flavotyper-0.3.0/src/flavotyper/locus.py +238 -0
  19. flavotyper-0.3.0/src/flavotyper/locus_align.py +313 -0
  20. flavotyper-0.3.0/src/flavotyper/locus_map.py +1028 -0
  21. flavotyper-0.3.0/src/flavotyper/marker_names.py +23 -0
  22. flavotyper-0.3.0/src/flavotyper/models.py +143 -0
  23. flavotyper-0.3.0/src/flavotyper/pipeline.py +334 -0
  24. flavotyper-0.3.0/src/flavotyper/provenance.py +48 -0
  25. flavotyper-0.3.0/src/flavotyper/py.typed +0 -0
  26. flavotyper-0.3.0/src/flavotyper/report.py +169 -0
  27. flavotyper-0.3.0/src/flavotyper/species.py +121 -0
  28. flavotyper-0.3.0/src/flavotyper/typing_rules.py +342 -0
  29. flavotyper-0.3.0/src/flavotyper.egg-info/PKG-INFO +316 -0
  30. flavotyper-0.3.0/src/flavotyper.egg-info/SOURCES.txt +36 -0
  31. flavotyper-0.3.0/src/flavotyper.egg-info/dependency_links.txt +1 -0
  32. flavotyper-0.3.0/src/flavotyper.egg-info/entry_points.txt +2 -0
  33. flavotyper-0.3.0/src/flavotyper.egg-info/requires.txt +9 -0
  34. flavotyper-0.3.0/src/flavotyper.egg-info/top_level.txt +1 -0
  35. flavotyper-0.3.0/tests/test_config.py +21 -0
  36. flavotyper-0.3.0/tests/test_locus_map.py +288 -0
  37. flavotyper-0.3.0/tests/test_pipeline.py +69 -0
  38. flavotyper-0.3.0/tests/test_typing_rules.py +258 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,316 @@
1
+ Metadata-Version: 2.4
2
+ Name: flavotyper
3
+ Version: 0.3.0
4
+ Summary: Extensible in silico serotyping for Flavobacterium psychrophilum
5
+ Author: FlavoTyper contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://forge.inrae.fr/eric.duchaud/flavotyper
8
+ Project-URL: Repository, https://forge.inrae.fr/eric.duchaud/flavotyper
9
+ Project-URL: Documentation, https://forge.inrae.fr/eric.duchaud/flavotyper/-/blob/main/README.md
10
+ Keywords: bioinformatics,genomics,microbiology,serotyping,Flavobacterium psychrophilum
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: Pillow>=9.0
26
+ Requires-Dist: PyYAML>=6.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=9.0; extra == "dev"
29
+ Provides-Extra: release
30
+ Requires-Dist: build>=1.2; extra == "release"
31
+ Requires-Dist: twine>=5.0; extra == "release"
32
+ Dynamic: license-file
33
+
34
+ # FlavoTyper
35
+
36
+
37
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://forge.inrae.fr/eric.duchaud/flavotyper/-/blob/main/LICENSE)
38
+
39
+ FlavoTyper is a command-line bioinformatics tool that performs in silico serotyping of *Flavobacterium psychrophilum* genome assemblies.
40
+
41
+ ---
42
+
43
+ ## Introduction
44
+
45
+ Flavobacteriosis is a bacterial disease with significant impact on the global aquaculture industry, particularly affecting salmonid fish such as rainbow trout and Atlantic salmon. It causes substantial economic losses in fish farms worldwide, manifesting as coldwater disease, rainbow trout fry syndrome, and gill disease depending on the host and stage of life.
46
+
47
+ The causative agent is *Flavobacterium psychrophilum* (Smith 1964), a Gram-negative, rod-shaped psychrotrophic bacterium belonging to the family Flavobacteriaceae, phylum Bacteroidota.
48
+
49
+ Phenotypic characterisation of this pathogen (including serotyping based on the O-polysaccharide antigen) provides critical information for epidemiological surveillance, outbreak investigation, and the design of effective vaccines. FlavoTyper enables this characterisation directly from genome assemblies, making serotyping scalable, reproducible, and independent of wet-lab assays.
50
+
51
+ ---
52
+
53
+ ## Installation
54
+
55
+ ### Dependencies
56
+
57
+ FlavoTyper requires Python and two external bioinformatics tools that must be installed manually:
58
+
59
+ | Dependency | Minimum version | Purpose |
60
+ |---|---|---|
61
+ | BLAST+ (`blastn`, `makeblastdb`) | 2.12 | Marker alignment and locus comparison |
62
+ | fastANI | 1.3 | Species verification (ANI-based QC) |
63
+
64
+ Install external tools with conda:
65
+
66
+ ```bash
67
+ conda install -c bioconda blast fastani
68
+ ```
69
+
70
+ Verify they are available:
71
+
72
+ ```bash
73
+ blastn -version
74
+ fastANI --version
75
+ ```
76
+
77
+ ### Option 1 : From source
78
+
79
+ ```bash
80
+ git clone https://forge.inrae.fr/eric.duchaud/flavotyper.git
81
+ cd flavotyper
82
+ python3 -m venv .venv
83
+ source .venv/bin/activate
84
+ pip install .
85
+ ```
86
+
87
+ ### Option 2 : From PyPI
88
+
89
+ ```bash
90
+ pip install flavotyper
91
+ ```
92
+
93
+ ### Option 3 : From Bioconda
94
+
95
+ ```bash
96
+ conda install -c bioconda flavotyper
97
+ ```
98
+
99
+ ### Verify the installation
100
+
101
+ ```bash
102
+ flavotyper --version
103
+ flavotyper data-dir
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Quickstart
109
+
110
+ 1. Place the genome assembly FASTA file(s) you want to type in one directory.
111
+ 2. Run FlavoTyper:
112
+
113
+ ```bash
114
+ flavotyper type \
115
+ --genomes path/to/genomes/*.fasta \
116
+ --outdir results/
117
+ ```
118
+
119
+ 3. View results in the output directory — the main output is `results/typing_results.tsv`.
120
+
121
+ ---
122
+
123
+ ## Data input
124
+
125
+ FlavoTyper accepts genome assemblies for *F. psychrophilum* in FASTA format (`.fa`, `.fna`, `.fasta`, `.fas`, optionally gzip-compressed). Both single-genome and multi-genome runs are supported:
126
+
127
+ ```bash
128
+ # Single genome
129
+ flavotyper type --genomes genome.fasta --outdir results/
130
+
131
+ # Multiple genomes
132
+ flavotyper type --genomes genomes/*.fasta --outdir results/ --threads 4
133
+ ```
134
+
135
+ Sample identifiers are derived automatically from input filename stems.
136
+
137
+ ---
138
+
139
+ ## Data output
140
+
141
+ All output files are written to the directory specified with `--outdir`.
142
+
143
+ ### 1. Tabular format (TSV)
144
+
145
+ **`typing_results.tsv`** — the main output table, one row per sample.
146
+
147
+ Key columns include the assigned serotype, call state (Resolved / Partial / Ambiguous / NotTyped), detected markers, QC metrics, typing warnings, and a reference sentence for known serotypes. For the full column reference see [Results_Dictionary.md](https://forge.inrae.fr/eric.duchaud/flavotyper/-/blob/main/Results_Dictionary.md).
148
+
149
+ ### 2. JSON format
150
+
151
+ **`typing_results.jsonl`** — one complete JSON record per sample (same data as the TSV, machine-readable).
152
+
153
+ **`run_metadata.json`** — run-level provenance: tool version, database name and checksums, parameters, run ID, and timestamp.
154
+
155
+ **`input_manifest.json`** — per-input manifest: source path, file size, and SHA-256 checksum.
156
+
157
+
158
+ *Optionally, when a call is "Resolved" and locus analysis is enabled, the tool produces the following outputs:*
159
+
160
+ ### 3. FASTA format
161
+
162
+ **`<sample>_locus_sequence.fasta`** — the O-antigen biosynthesis locus sequence extracted from the input genome, generated when locus analysis is enabled and the call is Resolved.
163
+
164
+ ### 4. PNG format
165
+
166
+ **`<sample>_locus_map.png`** — a two-track locus map showing the reference locus alongside the aligned sample region, with annotated marker positions.
167
+
168
+ ### 5. Text format
169
+
170
+ **`<sample>_locus_alignment.txt`** — pairwise BLASTN alignment of the sample genome against the reference locus.
171
+
172
+ Locus analysis outputs are written to a per-sample subdirectory: `<outdir>/<sample>_locus_analysis/`.
173
+
174
+ Typically, the output directory layout is as follows:
175
+
176
+ ```text
177
+ results/
178
+ ├── typing_results.tsv
179
+ ├── typing_results.jsonl
180
+ ├── run_metadata.json
181
+ ├── input_manifest.json
182
+ ├── sample1_locus_analysis/ # only when --locus-analysis is enabled
183
+ │ ├── sample1_locus_map.png
184
+ │ ├── sample1_locus_alignment.txt
185
+ │ └── sample1_locus_sequence.fasta
186
+ └── sample2_locus_analysis/
187
+ ├── sample2_locus_map.png
188
+ ├── sample2_locus_alignment.txt
189
+ └── sample2_locus_sequence.fasta
190
+ ```
191
+
192
+ ---
193
+
194
+ ## **FlavoTyper Modules**
195
+
196
+ ### QC module
197
+
198
+ The purpose of this first module is to ensure that:
199
+ 1. The input genome corresponds to the species Flavobacterium psychrophilum.
200
+ 2. The genome assembly quality allows a relaible assignment of serotype.
201
+
202
+ Samples that fail QC are recorded as `NotTyped` in the output and skip the typing step.
203
+
204
+ 1. Species check *(enabled by default)*
205
+
206
+ An ANI-based species verification step using fastANI is run before typing. The input genome is compared against a bundled *F. psychrophilum* type-strain reference (NCIMB 1947T). Genomes below the ANI threshold (default: 95 %) are blocked from typing.
207
+
208
+ This step can be disabled with `--no-species-check` when species identity has been confirmed independently.
209
+
210
+ 2. Assembly quality check
211
+
212
+ Before typing, FlavoTyper evaluates assembly quality.
213
+
214
+ - **Genome size**: flagged if outside the expected interval [2,619,202 – 3,122,663 bp] derived from a curated reference set.
215
+ - **Contig count**: advisory warning issued above 300 contigs; high-severity warning above 500 contigs.
216
+ - **GC percent**: calculation of the GC content in the provided genome(s).
217
+
218
+ The assembly quality check is advisory only, and provides informative warnings to the user about metrics that might affect the reliability of serotype assignment.
219
+
220
+ ### Typing module
221
+
222
+ The core module detects serotype-associated marker genes with BLASTN against the bundled marker database, then applies a declarative rule engine to assign serotype components independently:
223
+
224
+ - **O-type** — assigned from the exclusive detection of one O-antigen marker (wzy gene).
225
+ - **R-type** — assigned from base-group marker presence (R1, R2, R3 and R4) and optional inter-marker distance rules for variant confirmation (R1V1, R1V2 and R1V3).
226
+ - **S-type** — assigned independently from the S1 marker; S0 when absent, S1 when the marker is present.
227
+
228
+ The combined serotype is reported as `O:X-Sy-Rz` (e.g. `O:1-S0-R1V1`).
229
+
230
+ ### Locus analysis module *(optional, `--locus-analysis`)*
231
+
232
+ When a call is Resolved and the user enabled this module, a second BLASTN is run to align the genome(s) against the full O-antigen biosynthesis locus. This produces:
233
+
234
+ - a pairwise alignment text file,
235
+ - the extracted locus FASTA sequence,
236
+ - a publication-ready two-track PNG locus map.
237
+
238
+ Enable with `--locus-analysis`. Novel serotypes (not yet in the reference locus database) are flagged with a warning in `Typing_warnings` but are not blocked from receiving a type call.
239
+
240
+ ---
241
+
242
+ ## **FlavoTyper Databases**
243
+
244
+ All reference data is bundled inside the FlavoTyper package. The bundled data directory can be retrieved with:
245
+
246
+ ```bash
247
+ flavotyper data-dir
248
+ ```
249
+
250
+ ### `Flavotyper_markers.fasta`
251
+
252
+ This file includes nucleotidic sequences for all marker genes used by the typing module. The BLAST database is built from this file at runtime.
253
+
254
+ A marker is considered present when its BLASTN hit meets both thresholds: percent identity ≥ 97 % and marker coverage ≥ 94 % (adjustable via `--min-identity` and `--min-coverage`).
255
+
256
+ Markers currently covered:
257
+
258
+ **O-type** — each type (O:0–O:7) is detected by a unique wzy gene (`wzy0`–`wzy7`).
259
+
260
+ **R-type** — R0 is the default assignment for O:0 when no R markers are detected. R1 variants share a common `r1_core` marker and are further distinguished by: `wfpF` (R1V1); `Rieske` + `wfpF_p` within a distance of −6 to +6 bp of each other (R1V2); `wfpF_pp` (R1V3). R2, R3, and R4 are each assigned from a single marker: `wfpH`, `wfpI`, and `r4_core` respectively.
261
+
262
+ **S-type** — S1 is assigned when `s1_core` is detected; S0 when it is absent.
263
+
264
+ ### `Flavotyper_reference_loci.fasta`
265
+
266
+ This file includes full nucleotide sequences of reference O-antigen biosynthesis loci for each known serotype, with embedded metadata (reference strain, genome coordinates, GenBank accession, PMID, and per-marker positions). Used by the locus analysis module.
267
+
268
+ ---
269
+
270
+ ## Command reference
271
+
272
+ Run `flavotyper type --help` for the full CLI reference.
273
+
274
+ | Option | Default | Description |
275
+ |---|---|---|
276
+ | `--genomes` | required | One or more input genome FASTA files |
277
+ | `--outdir` | required | Output directory |
278
+ | `--db` | bundled | Path to the serotyping rules YAML |
279
+ | `--species-refs` | bundled | Reference FASTA for fastANI species check |
280
+ | `--no-species-check` | off | Disable ANI-based species verification |
281
+ | `--ani-threshold` | 95.0 | Minimum ANI to pass the species gate |
282
+ | `--min-identity` | 97.0 | Minimum BLASTN percent identity for marker hits |
283
+ | `--min-coverage` | 94.0 | Minimum marker coverage (%) for marker hits |
284
+ | `--threads` | 1 | Threads passed to BLASTN and fastANI |
285
+ | `--locus-analysis` | off | Enable locus comparison and PNG map generation |
286
+ | `--locus-db` | bundled | Override the bundled reference-locus FASTA |
287
+ | `--allow-duplicate-sample-names` | off | Allow duplicate IDs from filename stems |
288
+
289
+ ---
290
+
291
+ ## Interpreting results
292
+
293
+ | `Call_state` | Meaning |
294
+ |---|---|
295
+ | `Resolved` | O-type and R-type were both uniquely assigned |
296
+ | `Partial` | One of O or R is `Undefined` — check `Typing_warnings` and assembly quality |
297
+ | `Ambiguous` | One of O or R matched multiple valid interpretations — check `Alternative_serotypes` |
298
+ | `NotTyped` | QC blocked typing — check `QC_warnings` and species fields |
299
+
300
+ ---
301
+
302
+ ## Troubleshooting
303
+
304
+ For common errors and questions — installation failures, QC warnings, partial or ambiguous calls, locus analysis not running — see [Troubleshooting.md](https://forge.inrae.fr/eric.duchaud/flavotyper/-/blob/main/Troubleshooting.md).
305
+
306
+ ---
307
+
308
+ ## Citation
309
+
310
+ If you use FlavoTyper in a publication or report, please cite the software metadata in [CITATION.cff](https://forge.inrae.fr/eric.duchaud/flavotyper/-/blob/main/CITATION.cff).
311
+
312
+ ---
313
+
314
+ ## License
315
+
316
+ Apache-2.0. See [LICENSE](https://forge.inrae.fr/eric.duchaud/flavotyper/-/blob/main/LICENSE).