Mycorrhiza population assignment tools.
Project description
Mycorrhiza
Combining phylogenetic networks and Random Forests for prediction of ancestry from multilocus genotype data.
Installing Mycorrhiza with pip
-
Make sure you have the latest version of Python 3.x
python --version
-
Install pip
python -m pip install --upgrade pip setuptools wheel
-
Install Mycorrhiza
pip install --upgrade mycorrhiza
-
Install SplitsTree
Installation executables for SplitsTree4 can be found here.
Running an analysis
-
Import the necessary modules.
from mycorrhiza.dataset import Myco from mycorrhiza.analysis import CrossValidate from mycorrhiza.plotting.plotting import mixture_plot
-
(Optional) By default Mycorrhiza will look for SplitStree in your PATH. I you wish to specify a different path for the SplitsTree executable you can do so in the settings module.
from mycorrhiza.settings import const const['__SPLITSTREE_PATH__'] = 'SplitsTree'
-
Load some data. Here data is loaded in the Mycorrhiza format from the Gipsy moth sample data file. Example data can be found here.
myco = Myco('examples/gipsy.myc') myco.load()
-
Run an analysis. Here a simple 5-fold cross-validation analysis is executed.
cv = CrossValidate(myco, 'examples/').run(n_partitions=1, n_loci=0, n_cores=4)
-
Plot the results.
mixture_plot(cv)
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mycorrhiza-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f148ad86401450b58867025f472ebc130b6539b0356607416f754a1031e05083 |
|
MD5 | f8d67b24363a37b71d791eb7215ae94f |
|
BLAKE2b-256 | cd1d3e531152c25edc3cee33831e62cb1ab93882d5a8c37b0e03c57dd838cceb |