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.)

Download files

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

Source Distribution

vectome-0.0.7.tar.gz (6.7 MB view details)

Uploaded Source

Built Distribution

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

vectome-0.0.7-py3-none-any.whl (7.0 MB view details)

Uploaded Python 3

File details

Details for the file vectome-0.0.7.tar.gz.

File metadata

  • Download URL: vectome-0.0.7.tar.gz
  • Upload date:
  • Size: 6.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vectome-0.0.7.tar.gz
Algorithm Hash digest
SHA256 1150a674c34a4cfd5c616244c0500ab02a33711130c25f3873a4ea51056163c3
MD5 2d46c24ee2a8c53c992a2eee60c0d3ae
BLAKE2b-256 39d772e4a83ed62ca9d5d6c7bc207c6142ace2d93bbabf04b6974504e094c04e

See more details on using hashes here.

File details

Details for the file vectome-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: vectome-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vectome-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 88dd5c25c812a927cc31317b5118deb8a02feebc936d7a3c6bea7bfed42ed9b7
MD5 30ab032fbf45e3fc002398a1160494cf
BLAKE2b-256 46661104731037c3d74b1c65d8fee61d763a4bc122435c76d142748085ae6e10

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.8

2 files

This release

0.0.7 This release

2 files

0.0.6

2 files

0.0.5.post1

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

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