Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/yeolab/bonvoyage

:triangular_ruler: Transform percentage-based units into a 2d space to evaluate changes in distribution with both magnitude and direction.
https://github.com/yeolab/bonvoyage

Last synced: 24 days ago
JSON representation

:triangular_ruler: Transform percentage-based units into a 2d space to evaluate changes in distribution with both magnitude and direction.

Lists

README

        

![Bonvoyage logo: A bottle of champagne as the y=-x + 1 line on a Cartesian plane](https://raw.githubusercontent.com/YeoLab/bonvoyage/master/logo/v2/logo-128.png)

[![Build Status](https://travis-ci.org/YeoLab/bonvoyage.svg?branch=master)](https://travis-ci.org/YeoLab/bonvoyage)[![](https://img.shields.io/pypi/v/bonvoyage.svg)](https://pypi.python.org/pypi/bonvoyage)

## What is `bonvoyage`?

Transform percentage-based units into a 2d space to evaluate changes in distribution with both magnitude and direction.

* Free software: BSD license
* Documentation: https://yeolab.github.io/bonvoyage

## Installation

To install `anchor`, we recommend using the
[Anaconda Python Distribution](http://anaconda.org/) and creating an
environment, so the `anchor` code and dependencies don't interfere with
anything else. Here is the command to create an environment:

```
conda create -n anchor-env pandas numpy matplotlib seaborn scikit-learn
```

### Stable (recommended)

To install this code from the Python Package Index, you can install on the
command line via `pip`:

```
pip install bonvoyage
```

### Bleeding-edge (for the brave)

To install this code, clone this github repository and use `pip` to install

git clone [email protected]:yeolab/bonvoyage
cd bonvoyage
pip install . # The "." means "install *this*, the folder where I am now"

## Usage

To use `bonvoyage` to get waypoints, you want your `data` to be a `pandas`
DataFrame of shape (n_samples, n_features)

```python
import bonvoyage

wp = bonvoyage.Waypoints()
waypoints = wp.fit_transform(data)
```

`bonvoyage` is modeled after `scikit-learn` in is method of creating a
transforming object and then running `fit_transform()` to perform the computation.

To plot the waypoints, use a `waypointplot`, which can do either `"scatter"` or
`"hex"` plot types. By default, `hexbin` plots are used:

```python
import bonvoyage

bonvoyage.waypointplot(waypoints)
```

![Hexbin waypoints](figures/iPSC_hexbin.png)

You can also specify to use `scatter`:

```python
import bonvoyage

bonvoyage.waypointplot(waypoints, kind='scatter')
```

![Scatter waypoints](figures/iPSC_scatter.png)

To add color, give a series or other `groupby`-able object:

```python
import bonvoyage

bonvoyage.waypointplot(waypoints, kind='scatter', features_groupby=modalities)
```

![Scatter, colored by modality waypoints](figures/iPSC_scatter_modality.png)

## History

### 1.0.0 (2017-06-28)

* Added tests and examples

### 0.1.0 (2015-09-15)

* First release on PyPI.