Skip to main content

Serovar detector

Actinobacillus pleuropneumoniae causes severe respiratory illness in production pigs and piglets. One major task in the prohobition of spread as well as treatment, is to identify the composition of capsule genes. These capsule genes can in combination be used too provide servariant typing of A. pleuropneumoniae.

This repository provides a pipeline for detecting capsule genes and dessiminate serovar from combination of present genes.

Quick start

# Install once only
micromamba create -n serovar_detector bioconda::serovar_detector --yes

# Execution
micromamba run -n serovar_detector serovar_detector -r /path/to/input/reads -a /path/to/input/assemblies -o /path/to/output

Setup

Requirements

While there are several other tools being used, standard usage assumes that Snakemake automatically should handle installation of downstream software. Here's the requirement for Serovar detector:

  • snakemake >= 8.+
  • conda >= 24.7.1
  • pandas
  • peppy

Micromamba/Conda

Serovar detector is hosted on bioconda, so requirements can be automatically fixed by using micromamba/conda.

micromamba create -n serovar_detector bioconda::serovar_detector

Pip installation

Installation through pip can be a bit more tricky, it assumes you have conda preinstalled on your system (or in a virtual environment). Since Serovar detector is hosted on PyPi, it can be installed by simply running:

pip install serovar_detector

Alternative to Conda

IF you don't wish to involve conda at all, due to e.g. server restrictions or hosting on third party platforms (such as Galaxy), you could look through the serovar_detector/workflow/envs files and try to replicate an environment containing these tools as well as the tools listed in Requirements section (except conda). In theory if these tool can exist within the same environment, you can skip conda handling entirely by adding the -c flag (e.g. serovar_detector ... -c), it's untested and unsupported though.

Usage

serovar_detector -r /path/to/input/reads -a /path/to/input/assemblies -o /path/to/output -t 3

Input

Serovar detector assumes use of either Illumina Paired end sequencing data or preassembled genomes. The top level of the reads_dir/ and assemblies_dir/ folders are screened for .fastq.gz and .fasta files respectively and sample name are derived automatically by ignoring the file extensions (and read mates).

Output

Serovar detector uses KMerAligner (KMA) to map raw reads against the capsule gene database of Serovar detector, and it uses Blastn to map the capsule gene database against the assembled genomes. Please note that it is possible to include both raww reads and assemblies of the same sample, this would lead to both mapping results being reported separately.

A summary of detected capsule genes and their derived serovars are provided for each individual sample and mapper, in a single tab-separated file: /path/to/output/serovars.tsv.

Options

serovar_detector -h
usage: serovar_detector [-h] [-r --reads_dir] [-a --assembly_dir] [-D --database] -o --outdir [-T --theshold] [-t --threads] [-k] [-F] [-c] [-n] [-d]

Screen read files and assemblies for Serovar biomarker genes, in order to preovide suggestions for isolate serovar. Currently only supporting Actinobacillus Pleuropneumoniae.

options:
  -h, --help         show this help message and exit
  -r --reads_dir     Input path to reads directory
  -a --assembly_dir  Input path to assembly directory
  -D --database      Path and prefix to kmer-aligner database. (Default: /home/cucumbergebt/micromamba/envs/serovar_detector/lib/python3.14/site-
                     packages/serovar_detector/db/Actinobacillus_pleuropneumoniae)
  -o --outdir        Output path to Results and Temporary files directory
  -T --theshold      Cutoff threshold of match coverage and identity. Ignore threshold by setting to 0 or False. (Default: 98)
  -t --threads       Number of threads to allocate for the pipeline. (Default: 3)
  -k                 Preserve temporary files such as KMA result files. (Default: False)
  -F                 Force rerun of all tasks in pipeline. (Default: False)
  -c                 Don't let snakemake handle conda execution in rules. Enable this option if the pipeline should run in the current loaded environment. (Default: False)
  -n                 Perform a dry run with Snakemake to see jobs but without executing them. (Default: False)
  -d                 Enable debug mode, prints more messages and stores snakemake object for inspection in R. (Default: False)

Issues or questions

If you encounter any issues or have any questions, you are more than welcome to post these in the issues section of this repository (Requires a GitHub account).

Citation

If you are using our tool in your analysis, please consider to cite us.

Angen Ø, Karstensen KT, Vilaró A, et al. Serotyping of Actinobacillus pleuropneumoniae based on whole genome sequencing: validation of a bioinformatic tool. Microb Genom. 2025;11(7):001434. doi:10.1099/mgen.0.001434

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

serovar_detector-1.1.0.tar.gz (773.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

serovar_detector-1.1.0-py3-none-any.whl (784.9 kB view details)

Uploaded Python 3

File details

Details for the file serovar_detector-1.1.0.tar.gz.

File metadata

  • Download URL: serovar_detector-1.1.0.tar.gz
  • Upload date:
  • Size: 773.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for serovar_detector-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5ee157d6e05834774dc8486761c15100782fb7b7faa2a32dd186151bc7a36db0
MD5 a0f7cf40c728c8fcc1e80860905fd3dc
BLAKE2b-256 b04149ee74d41d04341cd7639c02d84785260c84d7f828cfdadd40a18c8f19ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for serovar_detector-1.1.0.tar.gz:

Publisher: publish.yml on KasperThystrup/serovar_detector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file serovar_detector-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for serovar_detector-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 951a80c39d97c1d50d3a552dc51455fdd32ae1571275ba9ababf0bdad2283d43
MD5 d45fdec212e09d81d66df4da9828f5f9
BLAKE2b-256 7b7b0a385a0c2fb5a09a819ff7bafbe122f800a41a2b1fe23fe13ac9a0c97c43

See more details on using hashes here.

Provenance

The following attestation bundles were made for serovar_detector-1.1.0-py3-none-any.whl:

Publisher: publish.yml on KasperThystrup/serovar_detector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.1.2

2 files

1.1.1

2 files

This release

1.1.0 This release

2 files

1.0.0

2 files

0.9.9

2 files

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