Skip to main content

BrucellaID: Brucella species identification and MLST from reads

Tests Coverage Release PyPI Python 3.10–3.14 License Documentation

Identify the Brucella species of a fastq sample by its MASH distance to 16 reference genomes, and type it with the nine-locus Whatmore MLST scheme, whose alleles are called from the reads with Seal from BBTools. Point it at a sample, or a folder of samples.

$ brucellaid -r1 sample_R1.fastq.gz -r2 sample_R2.fastq.gz -o results/
Sample  Species           Biovar  ClosestReference           MashDistance  SharedHashes  SequenceType  AlleleProfile
sample  Brucella abortus  1       NC_006932-NC_006933.fasta  0.000024      999/1000      1             2-1-1-2-1-3-1-1-1

Both the reference sketch and the MLST database come with the package: nothing to download, index or configure.

Features

  • Two independent answers: the species, from the closest of 16 Brucella reference genomes, and the sequence type, from the nine MLST alleles. Neither call corrects the other, and both come with the numbers they rest on.
  • Nothing is hidden: the distance to every reference, the reads behind every allele call and the runner-up that call had to beat, a note when a second reference was nearly as close, and a tie reported as a tie rather than broken by a coin toss.
  • Batch mode: point it at a folder; fastq files are found recursively, R1/R2 paired, and several samples run at a time. A sample that fails leaves the others readable.
  • Current reference data: the MLST database is PubMLST's, 309 alleles and 122 sequence types, rebuilt by a script in the repository. The sketch is vSNP's 16 Brucella genomes, with the species, biovar, strain and accession of each.
  • Backwards compatible where it counts: the species identification is vSNP's, down to the threshold of 150 shared hashes, and --xlsx still writes the stat_alignment_summary_<date>.xlsx of the first version.
  • Nothing to configure: only the Python standard library, plus MASH and BBTools.
  • Tested: 194 tests, 100% coverage, end to end on a synthetic genome and on reads tiled over the real MLST alleles.
  • Validated on 16 genomes with a known answer: every species, biovar and closest reference right, and all 14 sequence types the one the genome carries — read off the assembly by exact match, which shares no code with the read-based caller. The nearest neighbouring species shares 4 of 1000 hashes and comes back as not identified (Validation).

Installation

conda create -n brucellaid -c conda-forge -c bioconda brucellaid
conda activate brucellaid

MASH and BBTools (which provides seal.sh) are not on PyPI, so they come from bioconda; BrucellaID itself needs nothing else. See Installation for pip and for running it from a clone.

Quick start

brucellaid -r1 sample_R1.fastq.gz -r2 sample_R2.fastq.gz -o results/  # Paired-end reads
brucellaid -r1 sample.fastq.gz -o results/                            # Single-end reads
brucellaid -i reads/ -o results/ -p 4                                 # A folder, 4 samples at a time
brucellaid -i reads/ -o results/ --no-mlst                            # Species only

The results are printed and saved in results/: one row per sample, one row per locus, every MASH distance, and a JSON report. To see it work on data with a known answer, run bash examples/run_example.sh, which builds its own reads from the alleles of a sequence type.

What the two answers mean: the species is the species of the closest reference genome, and the biovar is that reference's biovar, which is not the same as a biovar call — the Brucella biovar references differ by very little. The sequence type is new when the nine alleles are called but the combination is not in the table, and ND when a locus could not be called. See How it works.

Documentation

The wiki covers installation, a tutorial on public read sets, usage and options, output files, how it works, validation, troubleshooting and the FAQ.

Citing

If you use BrucellaID, please cite it together with the tools and the data it rests on:

Duceppe M-O. BrucellaID: Brucella species identification and MLST from sequencing reads. https://github.com/duceppemo/BrucellaID

Ondov BD, Treangen TJ, Melsted P, et al. Mash: fast genome and metagenome distance estimation using MinHash. Genome Biology 2016;17:132. https://doi.org/10.1186/s13059-016-0997-x

Bushnell B. BBTools. https://sourceforge.net/projects/bbmap/

Whatmore AM, Perrett LL, MacMillan AP. Characterisation of the genetic diversity of Brucella by multilocus sequencing. BMC Microbiology 2007;7:34. https://doi.org/10.1186/1471-2180-7-34

Jolley KA, Bray JE, Maiden MCJ. Open-access bacterial population genomics: BIGSdb software, the PubMLST.org website and their applications. Wellcome Open Research 2018;3:124. https://doi.org/10.12688/wellcomeopenres.14826.1

GitHub's "Cite this repository" button gives the citation in APA and BibTeX formats, from CITATION.cff.

  • brucetyper — in silico Bruce-ladder, Suis-ladder, AMOS and RB51 junction PCR for Brucella, from assemblies. Where BrucellaID gives the species from a distance and the sequence type from the alleles, brucetyper reads the assays a laboratory would run on a gel.
  • seqcounter — count the occurrences of any reference sequences in reads or assemblies.
  • spoligotyper — in silico spoligotyping of the M. tuberculosis complex.

Contributing

Bug reports, questions and pull requests are welcome: see CONTRIBUTING.md.

Author

Marc-Olivier Duceppe, Canadian Food Inspection Agency (CFIA): marc-olivier.duceppe@inspection.gc.ca

License

MIT

Metadata

Release files for brucellaid 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brucellaid 1.0.0
File Size Uploaded Provenance Actions
brucellaid-1.0.0.tar.gz 73.3 kB With provenance Details for brucellaid-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brucellaid 1.0.0
File Interpreter ABI Platform Actions
brucellaid-1.0.0-py3-none-any.whl Python 3 none any Details for brucellaid-1.0.0-py3-none-any.whl

Total release size: 129.2 kB

Release files / brucellaid-1.0.0.tar.gz

Download URL brucellaid-1.0.0.tar.gz
Size 73.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aabb6ec6b4e8e07c35fc874fd90b2ed70223ad3d688e677e4d0f9fc1e47d0a61
BLAKE2b-256 checksum
How to use checksums
87639e8bf964c3b835fcccb751a1d599508c68b217caa7529ff3c709367480db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / brucellaid-1.0.0-py3-none-any.whl

Download URL brucellaid-1.0.0-py3-none-any.whl
Size 55.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10be237c99a5f1daee0d3e0084311e2a6a721b899dbdc64812381bb11772a96e
BLAKE2b-256 checksum
How to use checksums
afe232a3b26a460a9fe93f489f18ab88c79eee0d4baf28cb6097ae14771d769e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for brucellaid 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for brucellaid-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page