Skip to main content

No project description provided

Project description

fifteen

shields.io shields.io

(DBA table_fifth)

This is a research fork of the original library

Experimental library for quick quintet tallying, useful when you have a lot of quintets that somehow you don't want to count yourself.

Usage

Binary wheels are provided on PyPI for Python starting from 3.7, but note that PyPy is not supported (yet).

python3 -m pip install table-five

API

TreeSet

A treeset is an efficient (i.e., fast parsing) list of tree topologies. The construction is $O(k n \lg n)$ where $k$ is the number of trees and $n$ the number of taxa. The log factor is due to the LCA data structure initialization.

from table_five import TreeSet
trees = TreeSet("path_to_newline_delimited_newicks.tre")

Quintet Counting

The major API is tally_single_quintet returning a list of length 15 containing the empirical counts of the 15 ADR unrooted quintet topology among the tree-set in $O(k)$ time:

# get counts of the ADR unrooted quintet topologies on taxa '1','2','3','4','5'. Taxa order matters.
treeset.tally_single_quintet(('1','2','3','4','5'))
# obviously you might want to convert it to numpy arrays

# normalize by the number of genes in the tree-set
new_tree_dist = np.asarray(treeset.tally_single_quintet(q_taxa)) / len(treeset)

Development and Building

After installing the Rust toolchain and Maturin, see the following commands:

# build the library
maturin build
# installing it locally
maturin develop

See the Maturin documentation for more details.

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

table_fifth-0.0.4.tar.gz (44.7 kB view hashes)

Uploaded Source

Built Distributions

table_fifth-0.0.4-cp37-abi3-win_amd64.whl (281.1 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

table_fifth-0.0.4-cp37-abi3-win32.whl (274.1 kB view hashes)

Uploaded CPython 3.7+ Windows x86

table_fifth-0.0.4-cp37-abi3-musllinux_1_2_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ x86-64

table_fifth-0.0.4-cp37-abi3-musllinux_1_2_i686.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

table_fifth-0.0.4-cp37-abi3-musllinux_1_2_armv7l.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARMv7l

table_fifth-0.0.4-cp37-abi3-musllinux_1_2_aarch64.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARM64

table_fifth-0.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

table_fifth-0.0.4-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

table_fifth-0.0.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

table_fifth-0.0.4-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

table_fifth-0.0.4-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (628.1 kB view hashes)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

table_fifth-0.0.4-cp37-abi3-macosx_10_7_x86_64.whl (320.4 kB view hashes)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

Supported by

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