Skip to content
/ SplitP Public

Python package that implements split- and rank-based tools for inferring phylogenies, such as flattenings and subflattenings.

License

Notifications You must be signed in to change notification settings

js51/SplitP

Repository files navigation

SplitP

Coverage Status DOI

Python package which implements split- and rank-based tools for inferring phylogenies, such as flattenings and subflattenings.

Installation

The latest version of SplitP can be installed via the command pip install splitp

Example

The following computes 100 split scores from a 10000bp sequence generated from a balanced 10-taxon tree under the Jukes Cantor model.

# Imports
import splitp

# Set parameters
sequence_length = 10_000
num_taxa = 10
branch_length = 0.05
number_of_splits = 100

# Define model
model = splitp.model.GTR.JukesCantor(1/2)

# Generate tree, splits and alignment
tree = splitp.trees.balanced_newick_tree(num_taxa, branch_length)
splits = splitp.all_splits(tree)
alignment = splitp.generate_alignment(tree, model, sequence_length)

# Compute scores
for s in range(number_of_splits):
    split = next(splits)
    flattening = splitp.flattening(split, alignment, splitp.FlatFormat.reduced)
    score = splitp.split_score(flattening)
    print(split, score)

For more functionality please see the documentation at splitp.joshuastevenson.me.

Please see CONTRIBUTING.md for information on contributing to this project.

About

Python package that implements split- and rank-based tools for inferring phylogenies, such as flattenings and subflattenings.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages