Find unique haplotypes, fields for recombination and subset sharing
Project description
Haplostats
Find unique haplotypes, fields for recombination and subset sharing.
Installation
Haplostats is available on PyPI. You can install it through pip
:
pip install itaxotools-haplostats
Usage
In Python, import and instantiate HaploStats
:
from itaxotools.haplostats import HaploStats
stats = HaploStats()
Add your data one entry at a time. Each entry is represented by its subset tag, plus a list of associated sequences. These are usually different alleles of the same specimen:
# Two specimens of different species, with two alleles each.
# There are three haplotypes in total. There is a single field
# for recombination (FFR), as the specimens are connected through
# a common sequence: 'ACT'.
stats.add('mysteriosa', ['ACT', 'ACC'])
stats.add('enigmatica', ['ACT', 'ATT'])
After adding all entries, you are ready to analyze the dataset:
haplotypes = stats.get_haplotypes()
fors = stats.get_fields_for_recombination()
common_haplotypes = stats.get_haplotypes_shared_between_subsets()
common_fors = stats.get_fields_for_recombination_shared_between_subsets()
For a more detailed look at the available methods, please have a look at the example script.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file itaxotools-haplostats-0.2.1.tar.gz
.
File metadata
- Download URL: itaxotools-haplostats-0.2.1.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fefb6a35e80ef4c8539f60a16193d6cb0619a5c755bf4bbacb3ff66e6210cce |
|
MD5 | 7bcac668f676bd505e46cc32beb3aa50 |
|
BLAKE2b-256 | 29d361e343259760cebd0592e284f9df45318b59e1e147e57d453428b8e612c9 |
File details
Details for the file itaxotools_haplostats-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: itaxotools_haplostats-0.2.1-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68f2d9ea2710df0059997a4365ab330d43cf27ce2208c162667a166f69c6d413 |
|
MD5 | 1b5516e854132334629ffa1f22866683 |
|
BLAKE2b-256 | 022b6db1925e2fd012b4ee618b0aea7a11cd9d29c3227afa66cba68535ba0f74 |