Skip to main content

Gitpod ready-to-code

sizemeup

sizemeup is a simple tool to retrieve the genome size for a given species name or tax ID. It utilizes known genome sizes available from NCBI's Assembly Reports in combination with user provided genome sizes that may not be available from NCBI.

Contributing

If you have a species of interest that is not available in the NCBI Assembly Reports, please consider submitting an issue so that we can get it added to sizemeup. Otherwise, if you have ideas to improve sizemeup please feel free to!

Installation

You can install sizemeup using conda:

conda create -n sizemeup -c conda-forge -c bioconda sizemeup
conda activate sizemeup
sizemeup --help

Available Commands

sizemeup

sizemeup is the main tool that outputs the known genome size for a given species name or tax ID.

Usage

sizemeup --help

 Usage: sizemeup [OPTIONS]

 sizemeup - A simple tool to determine the genome size of an organism

╭─ Required Options ────────────────────────────────────────────────────────────────────╮
│ *  --query    -q  TEXT  The species name or taxid to determine the size of [required] │
│ *  --sizes    -z  TEXT  The built in sizes file to use [required]                     │
╰───────────────────────────────────────────────────────────────────────────────────────╯
╭─ Additional Options ──────────────────────────────────────────────────────────────────╮
│ --outdir   -o  PATH  Directory to write output [default: ./]                          │
│ --prefix   -p  TEXT  Prefix to use for output files [default: sizemeup]               │
│ --silent             Only critical errors will be printed                             │
│ --verbose            Increase the verbosity of output                                 │
│ --version  -V        Show the version and exit.                                       │
│ --help               Show this message and exit.                                      │
╰───────────────────────────────────────────────────────────────────────────────────────╯

Example

sizemeup --query "Staphylococcus aureus" --silent
                                 Query Result                                 
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Name                  ┃ TaxID ┃ Category ┃ Size    ┃ Source ┃ Method       ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━┩
│ Staphylococcus aureus │ 1280  │ bacteria │ 2800000 │ ncbi   │ manually-set │
└───────────────────────┴───────┴──────────┴─────────┴────────┴──────────────┘
Writing the genome size to .//sizemeup-sizemeup.txt

sizemeup --query 1280 --silent
                                 Query Result                                 
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Name                  ┃ TaxID ┃ Category ┃ Size    ┃ Source ┃ Method       ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━┩
│ Staphylococcus aureus │ 1280  │ bacteria │ 2800000 │ ncbi   │ manually-set │
└───────────────────────┴───────┴──────────┴─────────┴────────┴──────────────┘
Writing the genome size to .//sizemeup-sizemeup.txt

If the --query value is found a table is printed to STDOUT as well as to a file named {PREFIX}-sizemeup.txt where {PREFIX} is the value of the --prefix option (default sizemeup).

Here is an example of the output file:

name	tax_id	category	size	source	method
Staphylococcus aureus	1280	bacteria	2800000	ncbi	manually-set

However is a species is not found, the you get the following output:

sizemeup --query "escherichia colis" --silent
2024-09-29 20:24:17 ERROR    2024-09-29 20:24:17:root:ERROR - Could not find 'escherichia colis' in the sizes file,      sizemeup.py:138
                             please consider creating an issue at https://github.com/rpetit3/sizemeup/issues to report
                             this
                                         Query Result
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Name            ┃ TaxID         ┃ Category         ┃ Size ┃ Source         ┃ Method         ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ UNKNOWN_SPECIES │ UNKNOWN_TAXID │ UNKNOWN_CATEGORY │ 0    │ UNKNOWN_SOURCE │ UNKNOWN_METHOD │
└─────────────────┴───────────────┴──────────────────┴──────┴────────────────┴────────────────┘
Writing the genome size to .//sizemeup-sizemeup.txt

sizemeup-build

sizemup-build is a helper tool used to build the genome size database for sizemeup. Do do this it:

  1. Downloads the latest NCBI Assembly Reports
  2. Determines species names based on tax id using NCBI Datasets API
  3. Merges any user provided genome sizes not available from NCBI
  4. Add assembly sizes from ATB with sufficient representation
  5. Writes the genome sizes to a TSV file

Note: This tool isn't necessary for most users, just a simple way to update the database on your own or at new releases of sizemeup.

In the end, it produces a TSV file with the following columns:

  • name - the species name
  • tax_id - the NCBI tax id
  • category - the category of the species (e.g. bacteria, virus)
  • size - the genome size in base pairs
  • source - the source of the genome size (e.g. ncbi, user)
  • method - the method used to determine the genome size (e.g. automatic, manual)

Citing sizemeup

If you make use of sizemeup in your analysis, please cite the following:

_ AllTheBacteria
Hunt M., Lima L., Shen W., Lees J., Iqbal Z. AllTheBacteria - all bacterial genomes assembled, available and searchable bioRxiv 2024.03.08.584059

Motivation and Naming

Talking with Taylor, we have a workflow in Bactopia called teton for human read scrubbing and taxonomic classification. After running teton, the idea was to run Bactopia to analyze the samples. However, Bactopia requires a genome size for each sample in order to calculate coverage and a few other metrics. Sure, we could manually look up the genome size for each sample, that would be tedious and time consuming. We decided to develop sizemeup to handle the looking up genome sizes for us. In addition this paves the way for users of Bactopia to use teton + sizemeup to easily mix species within their runs. In other words, sizemeup was built to support the Bactopia workflow (but you can use it for whatever!).

As for the name, I wanted something fun and catchy. It's a simple tool to retrieve the genome size of a given species name, so, I thought "sizemeup" would work!

Funding

Support for this project came (in part) from the Wyoming Public Health Division.

Wyoming Public Health Division

Metadata

Release files for sizemeup 1.3.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 sizemeup 1.3.0
File Size Uploaded Provenance
sizemeup-1.3.0.tar.gz 13.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 27.2 kB

Release files / sizemeup-1.3.0.tar.gz

Download URL sizemeup-1.3.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b9dbff01c9f565174dbd00e83c179623bea4fa5ffd9ef890f53bf9bfd3535793
BLAKE2b-256 checksum
How to use checksums
61a488b7c53b0be7f64308ba4dc709563bfd1df49423e3c27b86c4511b75c9b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / sizemeup-1.3.0-py3-none-any.whl

Download URL sizemeup-1.3.0-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0867e3ec8923e553b1c052eb057e920152c242a7e2cc2ec3607a8a79e005f299
BLAKE2b-256 checksum
How to use checksums
572b4329b73d9cb8e1635dec4ad41a94f6af4a5eca5642c6205a359b8ac95edb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for sizemeup 1.3.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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