Skip to main content

Deterministic vectorization of genomes.

Project description

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

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

vectome-0.0.1.tar.gz (17.2 kB 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.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vectome-0.0.1.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vectome-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ff1fc2c0282db78a4fd4cd8eea41112a8ad8eed2507f2c184b3e9f09c777a88e
MD5 eacfd9bb45f52bae0cc6569c35b26e7c
BLAKE2b-256 bb67b50c3c66bc6d47707b6d8fe39f6284a9d2cd35ad56e76cc9f4b72e5db015

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vectome-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vectome-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa96bc9a72a625101cda3fcd03064455e93398bad28da75aec2478d296cb7f26
MD5 457aeedc6202094a65f3485bd7207a60
BLAKE2b-256 1182d94c6177c358b865bf70173ec6edcf52e1f6feb7680e3838e4dfb3f6afa8

See more details on using hashes here.

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