All Projects → AlexSafatli → Pylogeny

AlexSafatli / Pylogeny

Licence: GPL-2.0 License
Python framework for phylogenetic tree landscapes

Programming Languages

python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Pylogeny

Ngraph.path
Path finding in a graph
Stars: ✭ 2,545 (+14870.59%)
Mutual labels:  heuristic
mcthings
A Python framework for creating 3D scenes in Minecraft and Minetest
Stars: ✭ 44 (+158.82%)
Mutual labels:  python-framework
telegram-bot-framework
Python Telegram bot API framework
Stars: ✭ 19 (+11.76%)
Mutual labels:  python-framework
landscape
🌄The Cloud Native Interactive Landscape filters and sorts hundreds of projects and products, and shows details including GitHub stars, funding or market cap, first and last commits, contributor counts, headquarters location, and recent tweets.
Stars: ✭ 8,067 (+47352.94%)
Mutual labels:  landscape
terragrunt
Auto-trigger docker build for terragrunt when new terraform version released
Stars: ✭ 23 (+35.29%)
Mutual labels:  landscape
pyotr
Python OpenAPI-to-REST (and back) framework
Stars: ✭ 54 (+217.65%)
Mutual labels:  python-framework
Pyrh
Python Framework to make trades with the unofficial Robinhood API
Stars: ✭ 1,702 (+9911.76%)
Mutual labels:  python-framework
LandscapeView
Animated landscape generator
Stars: ✭ 89 (+423.53%)
Mutual labels:  landscape
Unity3D-Coding-Examples
Various case-studies in Unity3D
Stars: ✭ 91 (+435.29%)
Mutual labels:  landscape
landscape
Procedural landscape
Stars: ✭ 17 (+0%)
Mutual labels:  landscape
Shan Shui Inf
Procedurally generated Chinese landscape painting.
Stars: ✭ 3,168 (+18535.29%)
Mutual labels:  landscape
osdp-python
A Python control panel implementation of the Open Supervised Device Protocol (OSDP)
Stars: ✭ 28 (+64.71%)
Mutual labels:  python-framework
TravelingSalesmanHeuristics.jl
Julia package for simple traveling salesman problem heuristics
Stars: ✭ 46 (+170.59%)
Mutual labels:  heuristic
ImageOrientationFix
PHP library to fix image orientation by exif data.
Stars: ✭ 15 (-11.76%)
Mutual labels:  landscape
belg
Boltzmann entropy of a landscape gradient
Stars: ✭ 14 (-17.65%)
Mutual labels:  landscape
Awesome Python
A curated list of awesome Python frameworks, libraries, software and resources
Stars: ✭ 110,263 (+648505.88%)
Mutual labels:  python-framework
bigflow
A Python framework for data processing on GCP.
Stars: ✭ 96 (+464.71%)
Mutual labels:  python-framework
arboles
Mapa de Arbolado Urbano
Stars: ✭ 13 (-23.53%)
Mutual labels:  landscape
pug4py
Use Pug.js within any python framework
Stars: ✭ 17 (+0%)
Mutual labels:  python-framework
detect-cloudflare-plus
True Sight Firefox extension.
Stars: ✭ 34 (+100%)
Mutual labels:  heuristic

Pylogeny

Build Status

A software library and code framework, written in the Python programming language for Python 2, for phylogenetic tree reconstruction, rearrangement, scoring, and for the manipulation, heuristic search, and analysis of the phylogenetic tree combinatorial space. Scoring of trees in this library is accomplished by bindings to the libpll phylogenetic C library. Functionality also exists in the framework to execute popular heuristic programs such as FastTree and RAxML to acquire approximate ML trees.

The following tasks are capable of being performed with this library:

  • Generate and maintain phylogenetic tree landscapes.
  • Construct and analyse heuristic methods to search these spaces.
  • Build and rearrange phylogenetic trees using preset operators (such as NNI, SPR, and TBR).
  • Score phylogenetic trees by Maximum Likelihood (calculated as log-likelihood) and Parsimony.
  • Build confidence sets of trees using the widely known CONSEL application.

Code Example

You can create a landscape for a given sequence alignment, add a tree to the landscape corresponding to the one acquired from FastTree, and then perform a hill-climbing search on that landscape on the basis of parsimony with the below code.

from pylogeny.alignment import alignment
from pylogeny.landscape import landscape
from pylogeny.heuristic import parsimonyGreedy

ali = alignment('yourAlignment.fasta')
ls  = landscape(ali,starting_tree=ali.getApproxMLTree())
heu = parsimonyGreedy(ls,ls.getRootNode())
heu.explore()     

This performs an exploration but the heuristic does not return anything. In order to acquire an idea of what this fitness landscape now looks like, you can start making queries to the landscape.

for tree in ls.iterTrees():
    print tree # Print all the Newick strings in the landscape.
globalMax = ls.getGlobalOptimum() # Get the name for tree with best score.
print ls.getTree(globalMax) # Print this tree (see its Newick string).

We can also see what neighboring trees have been explored from the first tree we started the heuristic at.

neighbors = ls.getNeighborsFor(ls.getRoot())
for neighbor in neighbors: # Neighbors are indices.
    print ls.getTree(neighbor) # Print the Newick string for that neighbor.

Installation

Installation requires access to a UNIX-like system or terminal. Furthermore, basic build tools, python development header include files, and MySQL library bindings are required to install this software. In Ubuntu, this is done with the command

 sudo apt-get install python-dev build-essential libmysqlclient-dev

If you do not use a Debian or Ubuntu-derived Linux distribution, search for instructions on acquiring these for your platform.

Before continuing, the non-Python library dependency libpll must be installed. Acquire the appropriate binary or build, from source, version 1.0.2 with SSE3 support. A convenient shell script is located in the root directory of this repository that will perform this installation. You can run this without any download by peforming the command:

wget https://raw.githubusercontent.com/AlexSafatli/Pylogeny/master/install-pll.sh -O - | sh

Once you have acquired and installed all of the necessary non-Python dependencies, you can install this software automatically using pip or easy_install with command

pip install pylogeny

or

easy_install pylogeny

respectively.

Documentation

Generated documentation is found here. Tutorials and additional code examples are present in the wiki on GitHub for this project.

Dependencies

Works With

Citing

To cite this library, refer to the paper Pylogeny: an open-source Python framework for phylogenetic tree reconstruction and search space heuristics that has been published to describe its purpose here at PeerJ.

Contributing

To contribute to this project, feel free to make a pull request and it will be reviewed by the code maintainers.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].