Skip to main content

No project description provided

Project description

fifteen

(DBA table_five)

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

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

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_five-0.0.2.tar.gz (28.0 kB view hashes)

Uploaded Source

Built Distributions

table_five-0.0.2-cp37-abi3-win_amd64.whl (238.9 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

table_five-0.0.2-cp37-abi3-win32.whl (230.2 kB view hashes)

Uploaded CPython 3.7+ Windows x86

table_five-0.0.2-cp37-abi3-musllinux_1_2_x86_64.whl (1.2 MB view hashes)

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

table_five-0.0.2-cp37-abi3-musllinux_1_2_i686.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

table_five-0.0.2-cp37-abi3-musllinux_1_2_armv7l.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARMv7l

table_five-0.0.2-cp37-abi3-musllinux_1_2_aarch64.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARM64

table_five-0.0.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

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

table_five-0.0.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.0 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

table_five-0.0.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.0 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

table_five-0.0.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB view hashes)

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

table_five-0.0.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

table_five-0.0.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (504.9 kB view hashes)

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

table_five-0.0.2-cp37-abi3-macosx_10_7_x86_64.whl (258.0 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