Skip to main content

Find unique haplotypes, fields for recombination and subset sharing

Project description

Haplostats

PyPI - Version PyPI - Python Version GitHub - Tests

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itaxotools-haplostats-0.2.1.tar.gz (23.0 kB view hashes)

Uploaded Source

Built Distribution

itaxotools_haplostats-0.2.1-py3-none-any.whl (18.0 kB view hashes)

Uploaded Python 3

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