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.
Release files for itaxotools-haplostats 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| itaxotools-haplostats-0.2.1.tar.gz | 23.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| itaxotools_haplostats-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.0 kB
Release files / itaxotools-haplostats-0.2.1.tar.gz
| Download URL | itaxotools-haplostats-0.2.1.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fefb6a35e80ef4c8539f60a16193d6cb0619a5c755bf4bbacb3ff66e6210cce
|
|
BLAKE2b-256 checksum How to use checksums |
29d361e343259760cebd0592e284f9df45318b59e1e147e57d453428b8e612c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / itaxotools_haplostats-0.2.1-py3-none-any.whl
| Download URL | itaxotools_haplostats-0.2.1-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68f2d9ea2710df0059997a4365ab330d43cf27ce2208c162667a166f69c6d413
|
|
BLAKE2b-256 checksum How to use checksums |
022b6db1925e2fd012b4ee618b0aea7a11cd9d29c3227afa66cba68535ba0f74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|