semvec/pypi-packages huggingface dataset:
gpvolve 0.2.0
A python package for extracting tevolutionary trajectories from genotype-phenotype-maps
License: MIT
Requires Python: >=3.6.0

# gpvolve

*A python package for extracting tevolutionary trajectories from genotype-phenotype-maps*

[![](https://img.shields.io/pypi/v/gpvolve.svg)](https://pypi.python.org/pypi/gpvolve)
[![](https://readthedocs.org/projects/gpvolve/badge/?version=latest)](https://gpvolve.readthedocs.io/en/latest/?badge=latest)


A Python API for the simulation and analysis of evolution in genotype-phenotype space.
You can use this library to:

   1. Build a markov state model from a genotype-phenotype-map.
   2. Find clusters of genotypes that represent metastable states of the system, using PCCA+.
   3. Compute fluxes and pathways between pairs of genotypes and/or clusters of interest, using Transition Path Theory.
   4. Visualize the outputs of all of the above.

## Basic Example

Build a Markov model from a genotype-phenotype map.
```python

# Import base class, Transition Path Theory class and functions for building Markov Model.
from gpvolve import GenotypePhenotypeMSM, TransitionPathTheory, linear_skew, mccandlish, find_max

# Import visualization tool.
from gpvolve.visualization import plot_network

# Import GenotypePhenotypeMap class for handling genotype-phenotype data.
from gpmap import GenotypePhenotypeMap

# Helper functions.
from scipy.sparse import dok_matrix

# Genotype-phenotype map data.
wildtype = "AAA"
genotypes = ["AAA", "AAT", "ATA", "TAA", "ATT", "TAT", "TTA", "TTT"]
phenotypes = [0.8, 0.81, 0.88, 0.89, 0.82, 0.82, 0.95, 1.0]

# Instantiate Markov model class.
gpm = GenotypePhenotypeMap(wildtype=wildtype,
                           genotypes=genotypes,
                           phenotypes=phenotypes)


# Instantiate a evolutionary Markov State Model from the genotype-phenotype map.
gpmsm = GenotypePhenotypeMSM(gpm)
```
Apply an evolutionary model to describe transitions between genotypes.
```python
# Map fitnesses to phenotypes.
gpmsm.apply_selection(fitness_function=linear_skew, selection_gradient=1)

# Build Markov State Model based on 'mccandlish' fixation probability function.
gpmsm.build_transition_matrix(fixation_model=mccandlish, population_size=100)

# Find global fitness peak.
fitness_peak = find_max(gpmsm=gpmsm, attribute='fitness')
```

Calculate and plot the trajectory flux between the wildtype and triple mutant.
```python

# Compute fluxes from wildtype to fitness peak.
fluxes = TransitionPathTheory(gpmsm, source=[0], target=[fitness_peak])

# Normalize flux.
norm_fluxes = fluxes.net_flux/fluxes.total_flux

# Plot the network and the fluxes
fig, ax = plot_network(gpmsm,
                       flux=dok_matrix(norm_fluxes),
                       edge_labels=True,
                       colorbar=True)

```
<img src="docs/img/basic_example.png" width="700">


## Install

To install from PyPI:
```
pip install gpvolve
```

To install a development version:
```
git clone https://github.com/harmslab/gpvolve
cd gpvolve
pip install  -e .
```
gpgraph 0.2.0
NetworkX for genotype-phenotype maps.
License: MIT

# GPGraph

**Genotype-phenotype maps in NetworkX**

Port a `GenotypePhenotypeMap` to a [NetworkX Digraph](https://networkx.github.io/).

## Basic Example

GPGraph follows NetworkX syntax. Initialize a graph, add the
genotype-phenotype map object, and draw the graph. This library even
comes with a draw method, `draw_gpgraph`, suited for genotype-phenotype graphs.

```python
from gpmap.simulate import MountFujiSimulation
from gpgraph import GenotypePhenotypeGraph
from gpgraph.pyplot import draw_gpgraph, draw_edges

# Simulate a genotype-phenotype map
sim = MountFujiSimulation.from_length(4, roughness_width=1)

# Turn the genotype-phenotype map into a networkx object
G = GenotypePhenotypeGraph(sim)

# Draw the graph
figure = draw_gpgraph(G,
                      edge_colors = 'gray', 
                      node_size=400)
```
<img src="docs/_img/readme-fig.png" width="350">


## Install

Clone this repo and install with `pip`:

```
pip install -e .
```

## To develop

Clone this repo and run `setup.py` as follows

```
python setup.py develop --user
```

This way, if only python scripts are being changed nothing has
to be reinstalled.
awesome-streamlit 20200728.1
This package supports the Awesome Streamlit Project and provides highly experimental features!
License: MIT
Requires Python: >= 3.7

# Awesome Streamlit Package.

This package supports the [Awesome Streamlit Project](https://github.com/MarcSkovMadsen/awesome-streamlit) and provides features that are not yet and maybe never will be provided by the [Streamlit package](https://pypi.org/project/streamlit/).

This package is currently **highly experimental** and

- The **api might change** dramatically and often!
  - If the Streamlit package starts providing the functionality, then it should be removed from this package.
- If you find a version that works for you, then please **pin the version number**!
  - An example of pinning the version number is `awesome-streamlit==20191014.2`.

You can install it using

```bash
pip install awesome-streamlit
```

You can use it using

```python
import awesome_streamlit as ast

ast.experiments.write_hello_world()
```

or alternatively if you just need the experimental features

```python
from awesome_streamlit import experiments as ste

ste.write_hello_world()
```

and the result should look like **Awesome Streamlit Gallery ![Awesome Streamlit Gallery](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)**.

For more information please visit the [Awesome Streamlit Project](https://github.com/MarcSkovMadsen/awesome-streamlit) on GitHub.