Skip to main content

🧬 vectome

GitHub Workflow Status (with branch) PyPI - Python Version PyPI

vectome is a python package for deterministic vectorization of genomes.

Installation

The easy way

You can install the precompiled version directly using pip.

$ pip install vectome

From source

Clone the repository, then cd into it. Then run:

$ pip install -e .

Command-line interface

vectome has a command-line interface.

$ vectome --help

You can generate vector embeddings by species / strain name or taxon ID.

$ vectome embed <(printf "Mycobacterium tuberculosis\n83333\nEscherichia coli CFT073")

The resulting vectors are based on MinHash sketches from sourmash, then folded into a 4096-vector using the CountSketch method. You can make a shorter vector using e.g. -n 1024.

You can also deterministically project into a dense vector.

$ vectome embed <(printf "Mycobacterium tuberculosis H37Rv") --projection 16

Change the seed with e.g. --seed 0.

If you need a more interpretable vector, you can generate one based on Jaccard distances to landmark species.

$ vectome embed <(printf "Mycobacterium tuberculosis H37Rv") --method landmark

Several landmark groups are available. You can set the group with --group 0, and get information about each one with vectome info.

$ vectome info
vectome version 0.0.1:
        group-0: {'landmarks': 113, 'manifest file': '.../vectome/vectome/data/landmarks/group-0/manifest.json', 'built': True}
        group-1: {'landmarks': 4, 'manifest file': '.../vectome/vectome/data/landmarks/group-1/manifest.json', 'built': True}
        group-2: {'landmarks': 1, 'manifest file': '.../vectome/vectome/data/landmarks/group-2/manifest.json', 'built': False}
        meta: {'cache location': '.../vectome/vectome/data/landmarks', 'cache exists': True}

Issues, problems, suggestions

Add to the issue tracker.

Documentation

(To come at ReadTheDocs.)

Metadata

Release files for vectome 0.0.8

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

Source distribution (sdist)

Source distribution for vectome 0.0.8
File Size Uploaded Provenance Actions
vectome-0.0.8.tar.gz 2.2 MB Without provenance Details for vectome-0.0.8.tar.gz

Built distribution (wheel)

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

Total release size: 4.8 MB

Release files / vectome-0.0.8.tar.gz

Download URL vectome-0.0.8.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e2d08d6f41641b4760e155be50960987c7d1f252d291f89c082c2f2685444205
BLAKE2b-256 checksum
How to use checksums
e9718851a862b99949a72da7f9d7606acac13c0b084c8ad616fb7a5cddb92975
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vectome-0.0.8-py3-none-any.whl

Download URL vectome-0.0.8-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c8764c1acf3cea72728a0119f1cb720158e520889d09025d2ef965f1cc6d1824
BLAKE2b-256 checksum
How to use checksums
d6cdcdbc1d39dcc678d208b0f2a1bc7673bb594e72872832dc35b7c5db55b4a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for vectome 0.0.8

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