Git Product home page Git Product logo

3dtrees's Introduction

3DPhyloTrees

Welcome!

Overview

The purpose of this Python package is to create 3D phylogenetic trees with two axes of variation given suitable data in the common AnnData format. The differentiating factor between this package and functions like scipy.cluster.hierarchy.dendrogram() and sklearn.cluster.AgglomerativeClustering is that the dendrogram produced tracks the splitting/merging patterns of groups of taxa and individual taxa. Specifically, as used in the BioRxiv paper Cerebellar nuclei evolved by repeatedly duplicating a conserved cell type set, the phylogenetic tree created by this package tracks the merging of different subnuclei of the cerebellar nuclei while also tracking the merging of individual cell types within those nuclei.

An example of such a dendrogram is Image

A flattened version can be found in Fig. S22C and Fig. S23H of the linked paper above.

This package is composed of three main parts:

  • agglomerate
  • data
  • metrics

The agglomerate package exposes methods to perform the agglomeration of a single phylogenetic tree given suitable data and hyperparameters, and a method to perform batch agglomeration over a range of hyperparameters and select the best tree according to any of the following metrics:

  • Balanced Minimum Evolution (preferred)
  • Minimum Evolution
  • Maximum Parsimony

The data package exposes a data_loader that the user can define to import their data accordingly (possibly from multiple folders or online repositories) and into an AnnData object. The data_types are used internally by the agglomeration algorithm.

Finally, the metrics currently only provides the Spearman correlation coefficient to measure the distance between two data points, however any distance metric in the same form as the example provided may be added and used in the agglomeration program.

Installation

This package requires Python version 3.7 or greater, and the requirements provided in Pipfile and Pipfile.lock. Using pip, installation is as easy as running:

pip install 3dtrees-nbingo

Questions

If you have any questions for how to use this code or for how it was used in Cerebellar nuclei evolved by repeatedly duplicating a conserved cell type set, then please feel free to email me at [email protected]. Examples usage of this package can be found in the cn_evolution repository, which is the analysis code used to produce the figures in the linked paper.

3dtrees's People

Contributors

dependabot[bot] avatar nbingo avatar upradeep1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

benjamins81

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.