tanglegram
==========
Uses scipy and matplotlib to plot simple tanglegrams.
## Installation
I recommend using [Python Packaging Index (PIP)](https://pypi.python.org/pypi) to install the package.
First, get [PIP](https://pip.pypa.io/en/stable/installing/) and then run in terminal:
`pip install git+git://github.com/schlegelp/tanglegram@master`
This command should also work to update the package.
**Attention**: on Windows, the dependencies (i.e. Numpy, Pandas and SciPy) will likely fail to install automatically. Your best bet is to get a Python distribution that already includes them (e.g. [Anaconda](https://www.continuum.io/downloads)).
If your default distribution is Python 2, you have to explicitly tell [PIP](https://pip.pypa.io/en/stable/installing/) to install for Python 3:
`pip3 install git+git://github.com/schlegelp/pymaid@master`
#### External libraries used:
Installing via [PIP](https://pip.pypa.io/en/stable/installing/) should install all external dependencies. You may run into problems on Windows though. In that case, you need to install dependencies manually, here is a list of dependencies (check out `install_requires` in [setup.py](https://raw.githubusercontent.com/schlegelp/PyMaid/master/setup.py) for version info):
- [Pandas](http://pandas.pydata.org/)
- [SciPy](http://www.scipy.org)
- [Numpy](http://www.scipy.org)
- [Matplotlib](http://www.matplotlib.org)
## Quickstart:
```python
import pandas as pd
import tanglegram.plot as tplot
# Generate two distance matrices and just switch labels in one
labelsA= ['A','B','C','D']
labelsB= ['B','A','C','D']
data = [1,.1,0,0],[.1,1,.5,0],[0,.5,1,0],[0,0,0,1]]
mat = pd.DataFrame([ data = data,
columns=labelsA,
index=labelsA)
mat = pd.DataFrame([ data = data,
columns=labelsB,
index=labelsB)
# Plot tanglegram
fig = tplot(mat,mat2)
```
## License:
This code is under GNU GPL V3
==========
Uses scipy and matplotlib to plot simple tanglegrams.
## Installation
I recommend using [Python Packaging Index (PIP)](https://pypi.python.org/pypi) to install the package.
First, get [PIP](https://pip.pypa.io/en/stable/installing/) and then run in terminal:
`pip install git+git://github.com/schlegelp/tanglegram@master`
This command should also work to update the package.
**Attention**: on Windows, the dependencies (i.e. Numpy, Pandas and SciPy) will likely fail to install automatically. Your best bet is to get a Python distribution that already includes them (e.g. [Anaconda](https://www.continuum.io/downloads)).
If your default distribution is Python 2, you have to explicitly tell [PIP](https://pip.pypa.io/en/stable/installing/) to install for Python 3:
`pip3 install git+git://github.com/schlegelp/pymaid@master`
#### External libraries used:
Installing via [PIP](https://pip.pypa.io/en/stable/installing/) should install all external dependencies. You may run into problems on Windows though. In that case, you need to install dependencies manually, here is a list of dependencies (check out `install_requires` in [setup.py](https://raw.githubusercontent.com/schlegelp/PyMaid/master/setup.py) for version info):
- [Pandas](http://pandas.pydata.org/)
- [SciPy](http://www.scipy.org)
- [Numpy](http://www.scipy.org)
- [Matplotlib](http://www.matplotlib.org)
## Quickstart:
```python
import pandas as pd
import tanglegram.plot as tplot
# Generate two distance matrices and just switch labels in one
labelsA= ['A','B','C','D']
labelsB= ['B','A','C','D']
data = [1,.1,0,0],[.1,1,.5,0],[0,.5,1,0],[0,0,0,1]]
mat = pd.DataFrame([ data = data,
columns=labelsA,
index=labelsA)
mat = pd.DataFrame([ data = data,
columns=labelsB,
index=labelsB)
# Plot tanglegram
fig = tplot(mat,mat2)
```
## License:
This code is under GNU GPL V3
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tanglegram-0.0.1.tar.gz
(3.3 kB
view details)
File details
Details for the file tanglegram-0.0.1.tar.gz.
File metadata
- Download URL: tanglegram-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.0 CPython/3.5.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88bf9819a252ded484d6028341ea57551784eaf699dd9f680bbaf7e083a34155
|
|
| MD5 |
61adcf3d39f34df85691f6292221fc13
|
|
| BLAKE2b-256 |
a21c3bac97cec3694974d498a17bd9930a0833812058a332dd94391c8a66b5ef
|