Skip to main content

ezclermont: phylotype your E. coli strains, in silico

Project description

Build StatusCoverage StatusLicense: MIT PyPI Version Docker Image Version (latest by date)

Icon

EzClermont: The E. coli Clermont PCR phylotyping tool

Description

This is a tool for using the Clermont 2013 PCR typing method for in silico analysis of E. coli whole genomes or assembled contigs.

Changelog

  • bump to version 1.0 in May 2026; modernize install, tests, imports
  • bump to version 0.7 in Nov 2021; add option for logfile instead of stderr messages for workflow compatibility
  • bump to version 0.4 in May 2018; improved handling of partial matches
  • made a webapp on April 19th, 2018 after requests from several to make the tool more user friendly.
  • updated on August 2, 2017 to add reactions that differentiate A/C, D/E/cryptic, and to add more robust tests.
  • released Dec. 2016

Usage

EzClermont can either read in a file or read from stdin.

Try:

ezclermont tests/refs/CP004009.1.fasta

or

cat tests/refs/CP004009.1.fasta | ezclermont - -e "APEC_O78"

or from docker:

docker run  -v $PWD:$PWD --entrypoint python nickp60/ezclermont  /usr/local/bin/ezclermont $PWD/tests/refs/AE005174.2.fasta
usage: ezclermont [-m MIN_LENGTH] [-e EXPERIMENT_NAME] [-n]
                  [--logfile LOGFILE] [-h] [--version]
                  contigs

run a 'PCR' to get Clermont 2013 phylotypes; version 1.0.0

positional arguments:
  contigs               FASTA formatted genome or set of contigs. If reading
                        from stdin, use '-'

optional arguments:
  -m MIN_LENGTH, --min_length MIN_LENGTH
                        minimum contig length to consider.default: 500
  -e EXPERIMENT_NAME, --experiment_name EXPERIMENT_NAME
                        name of experiment; defaults to file name without
                        extension. If reading from stdin, uses the first
                        contig's ID
  -n, --no_partial      If scanning contigs, breaks between contigs could
                        potentially contain your sequence of interest. if
                        --no_partial, these plausible partial matches will NOT
                        be reported; default behaviour is to consider partial
                        hits if the assembly has more than 4 sequnces(ie, no
                        partial matches for complete genomes, allowing for 1
                        chromasome and several plasmids)
  --logfile LOGFILE     send log messages to logfile instead stderr
  -h, --help            Displays this help message
  --version             show program's version number and exit

It prints out the presense or absence of the PCR product to stderr, and the resulting phylotype and experiment name to stdout. It checks the length, accepting fragments that are within 20bp of the expected size. When using --partial, if a single primer has a hit but the contig starts/ends within the length of the expected product size, we call it a hit.

A minimal filename.fasta ClermontType output table can be generated by piping to a results file using a bash loop:

for i in strain1 strain2 strain3;
	do
	  ezclermont ${i} >> results.txt
done

or, using GNU parallel, and saving a log file:

ls ./folder/with/assemblies/*.fa | parallel "ezclermont {} 1>> results.txt  2>> results.log"

Run the webapp

docker run -p 5000:5000 nickp60/ezclermont

Have fun!

Installation

From Pypi

conda create -n ezclermont_env ezclermont
conda activate ezclermont_env

development

conda create -n ez biopython
conda activate ezclermont
git clone https://github.com/nickp60/ezclermont && cd ezclermont
pip install --editable .

Testing

pytest

Requirements

commandline tool

Biopython

webapp

flask biopython

Acknowledgements

Thanks to Dave Gamache for Skeleton, the webapp CSS theme.

Name note

The name of this repo (and pypi package) was changed on April 21 from ClermontPCR to EzClermont.

Project details


Download files

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

Source Distribution

ezclermont-1.0.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

ezclermont-1.0.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file ezclermont-1.0.0.tar.gz.

File metadata

  • Download URL: ezclermont-1.0.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ezclermont-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e7497ef728dd2395ec3bb3f81413a047b54bbfd1fbd1f3347b7cf3dad4d703d6
MD5 9e0fa929b33a3f16a2729aaf74da7d9f
BLAKE2b-256 d633ed3692d0e2b8d727dd2499665a37cef4d6397e3349f4a54bbcee10983e02

See more details on using hashes here.

Provenance

The following attestation bundles were made for ezclermont-1.0.0.tar.gz:

Publisher: pypi_deploy.yml on nickp60/EzClermont

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

File details

Details for the file ezclermont-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ezclermont-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ezclermont-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5432c0d9527604f63f94f0a112f8553db47ebfba4f50fcfdf4adf551b10d8cf4
MD5 5a287f7790c6231db3a10df42e0628b9
BLAKE2b-256 cb5c05b87f10f6e2e8b1d829c705d15523ceec3548e56676ae913acbf1320423

See more details on using hashes here.

Provenance

The following attestation bundles were made for ezclermont-1.0.0-py3-none-any.whl:

Publisher: pypi_deploy.yml on nickp60/EzClermont

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page