Skip to main content

Mycorrhiza population assignment tools.

Project description


Combining phylogenetic networks and Random Forests for prediction of ancestry from multilocus genotype data.

Installing Mycorrhiza with pip

  1. Make sure you have the latest version of Python 3.x

    python --version
  2. Install pip

    python -m pip install --upgrade pip setuptools wheel
  3. Install Mycorrhiza

    pip install --upgrade mycorrhiza
  4. Install SplitsTree

    Installation executables for SplitsTree4 can be found here.

Running an analysis

  1. Import the necessary modules.

    from mycorrhiza.dataset import Myco
    from mycorrhiza.analysis import CrossValidate
    from mycorrhiza.plotting.plotting import mixture_plot
  2. (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'
  3. 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')
  4. 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)
  5. Plot the results.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mycorrhiza-0.0.3.tar.gz (7.0 kB view hashes)

Uploaded source

Built Distribution

mycorrhiza-0.0.3-py3-none-any.whl (12.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page