{ "info": { "author": "Leander D. Goldbach", "author_email": "l.d.goldbach@students.uu.nl", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# gpvolve\n\n*A python package for extracting tevolutionary trajectories from genotype-phenotype-maps*\n\nA Python API for the simulation and analysis of evolution in genotype-phenotype space.\nYou can use this library to:\n\n 1. Build a markov state model from a genotype-phenotype-map.\n 2. Find clusters of genotypes that represent metastable states of the system, using PCCA+.\n 3. Compute fluxes and pathways between pairs of genotypes and/or clusters of interest, using Transition Path Theory.\n 4. Visualize the outputs of all of the above.\n\n## Basic Example\n\nBuild a Markov model from a genotype-phenotype map.\n```python\n\n# Import base class, Transition Path Theory class and functions for building Markov Model.\nfrom gpvolve import GenotypePhenotypeMSM, TransitionPathTheory, linear_skew, mccandlish, find_max\n\n# Import visualization tool.\nfrom gpvolve.visualization import plot_network\n\n# Import GenotypePhenotypeMap class for handling genotype-phenotype data.\nfrom gpmap import GenotypePhenotypeMap\n\n# Helper functions.\nfrom scipy.sparse import dok_matrix\n\n# Genotype-phenotype map data.\nwildtype = \"AAA\"\ngenotypes = [\"AAA\", \"AAT\", \"ATA\", \"TAA\", \"ATT\", \"TAT\", \"TTA\", \"TTT\"]\nphenotypes = [0.8, 0.81, 0.88, 0.89, 0.82, 0.82, 0.95, 1.0]\n\n# Instantiate Markov model class.\ngpm = GenotypePhenotypeMap(wildtype=wildtype,\n genotypes=genotypes,\n phenotypes=phenotypes)\n\n\n# Instantiate a evolutionary Markov State Model from the genotype-phenotype map.\ngpmsm = GenotypePhenotypeMSM(gpm)\n```\nApply an evolutionary model to describe transitions between genotypes.\n```python\n# Map fitnesses to phenotypes.\ngpmsm.apply_selection(fitness_function=linear_skew, selection_gradient=1)\n\n# Build Markov State Model based on 'mccandlish' fixation probability function.\ngpmsm.build_transition_matrix(fixation_model=mccandlish, population_size=100)\n\n# Find global fitness peak.\nfitness_peak = find_max(gpmsm=gpmsm, attribute='fitness')\n```\n\nCalculate and plot the fluxes between wildtype and triple mutant.\n```python\n\n# Compute fluxes from wildtype to fitness peak.\nfluxes = TransitionPathTheory(gpmsm, source=[0], target=[fitness_peak])\n\n# Normalize flux.\nnorm_fluxes = fluxes.net_flux/fluxes.total_flux\n\n# Plot the network and the fluxes\nfig, ax = plot_network(gpmsm,\n flux=dok_matrix(norm_fluxes),\n edge_labels=True,\n colorbar=True)\n\n```\n\n![](img/basic_example.png)\n\n\n## Install\n\nTo install from PyPI:\n```\npip install gpvolve\n```\n\nTo install a development version:\n```\ngit clone https://github.com/harmslab/gpvolve\ncd gpvolve\npip install -e .\n```\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/harmslab/gpvolve", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gpvolve", "package_url": "https://pypi.org/project/gpvolve/", "platform": "", "project_url": "https://pypi.org/project/gpvolve/", "project_urls": { "Homepage": "https://github.com/harmslab/gpvolve" }, "release_url": "https://pypi.org/project/gpvolve/0.0.1/", "requires_dist": [ "numpy", "cython", "networkx", "msmtools", "gpmap", "gpgraph", "matplotlib" ], "requires_python": ">=3.6.0", "summary": "A python package for extracting tevolutionary trajectories from genotype-phenotype-maps", "version": "0.0.1" }, "last_serial": 4543917, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3075fd078e2a6efcf1ad02b6765795d4", "sha256": "ca33d6bdc3d159c76353e14695cc1486e8cbb189b143835409a1bcfbf0bce82d" }, "downloads": -1, "filename": "gpvolve-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3075fd078e2a6efcf1ad02b6765795d4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 24281, "upload_time": "2018-11-29T18:12:43", "url": "https://files.pythonhosted.org/packages/6e/8c/830e057532f43e11f416282a685e95dbbc73c2ca2d8900798a511353759c/gpvolve-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "53a48bc4c6df3623d77f4bee5d1cd967", "sha256": "ce8e0f24579f9ae3d7e358d7fb6febc26423790e5ab07b273e4a9e73a7076d96" }, "downloads": -1, "filename": "gpvolve-0.0.1.tar.gz", "has_sig": false, "md5_digest": "53a48bc4c6df3623d77f4bee5d1cd967", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 1428447, "upload_time": "2018-11-29T18:12:45", "url": "https://files.pythonhosted.org/packages/b8/c6/2d821fa7c2738dde7a47b5fff4c51cf50e02b1da4b4197679215be42ad80/gpvolve-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3075fd078e2a6efcf1ad02b6765795d4", "sha256": "ca33d6bdc3d159c76353e14695cc1486e8cbb189b143835409a1bcfbf0bce82d" }, "downloads": -1, "filename": "gpvolve-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3075fd078e2a6efcf1ad02b6765795d4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 24281, "upload_time": "2018-11-29T18:12:43", "url": "https://files.pythonhosted.org/packages/6e/8c/830e057532f43e11f416282a685e95dbbc73c2ca2d8900798a511353759c/gpvolve-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "53a48bc4c6df3623d77f4bee5d1cd967", "sha256": "ce8e0f24579f9ae3d7e358d7fb6febc26423790e5ab07b273e4a9e73a7076d96" }, "downloads": -1, "filename": "gpvolve-0.0.1.tar.gz", "has_sig": false, "md5_digest": "53a48bc4c6df3623d77f4bee5d1cd967", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 1428447, "upload_time": "2018-11-29T18:12:45", "url": "https://files.pythonhosted.org/packages/b8/c6/2d821fa7c2738dde7a47b5fff4c51cf50e02b1da4b4197679215be42ad80/gpvolve-0.0.1.tar.gz" } ] }