Coder Social home page Coder Social logo

tree's Introduction

TREE

Topological REcombination Estimator

Authors: Devon P. Humphreys, Melissa R. McGuirl, Michael Miyagi, Andrew J. Blumberg

For questions/comments please contact Melissa R. McGuirl at [email protected].

Description

This software takes as input either (1) a collection of genomes in FASTA format or (2) a distance matrix and predicts the underlying recombination rate from topological summary statistics of the data. The supported distance matrix formats are those formats that are currently supported by Ripser:

  • comma-separated values lower triangular distance matrix (preferred)
  • comma-separated values upper triangular distance matrix (MATLAB output from the function pdist)
  • comma-separated values full distance matrix

The user has the option getting recombination rate estimates over a sliding window analysis and can specify a normalization factor (default = 1/1000).

This software is based upon the work presented in Humphreys, D.P., McGuirl, M.R., Miyagi, M., and Blumberg, A.J. Fast Estimation of Recombination Rates Using Topological Data Analysis (2018). Preprint: https://www.biorxiv.org/content/early/2018/08/20/395210

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Programs

Python libraries

  • ripser
  • matplotlib
  • numpy

Install the ripser program as follows:

      cd 
      git clone --branch v1.0.1 https://github.com/Ripser/ripser.git
      cd ripser 
      make
      mv ./ripser ~/bin/ripser

TREE Source

      cd 
      git clone https://github.com/MelissaMcguirl/TREE
      cd TREE
      pip install -r requirements.txt

Usage:

      python TREE.py -i INPUT_FILE [-t INPUT_TYPE] [-s SLIDING_WINDOW_FLAG] [-w WINDOW_SIZE] [-o OUTPUT_DIRECTORY] [-N NORMALIZATION_FACTOR] [-n FILENAME_IDENTIFIER] [-b BASE_FLAG] [-f OFFSET_VALUE] [-g PLOT_NAME]

Note, the default input type is a FASTA file and the default normalization factor is 1/1000.

Examples:

      cd src
      1) python TREE.py -i ../examples/seq_example.fasta (input = FASTA file)   
      2) python TREE.py -i ../examples/hamming_example -t DIST (input = distance matrix)
      3) python TREE.py -i ../examples/seq_example.fasta -s -w 20 -o ../examples/outputs -n test -g ../examples/outputs/outputPlt (sliding window analysis)

Outputs:

  Sample expected output for the sliding window analysis is provided in examples/outputs/

Pipeline:

  0) Compute Hamming distance matrix
  1) Feed Hamming distance matrix into Ripser to compute dimension 0 and dimension 1 persistent homology barcodes
  2) Extract topological summary statistics (psi, b1, phi)
  3) Predict recombination rate using TREE
  4) Plot results (for sliding windows)

Help:

  python TREE.py -h

Notes

This software has been tested with python 2.7 and 3.6.1

tree's People

Contributors

devonhum avatar edguy3 avatar

Watchers

James Cloos avatar  avatar

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.