Giter VIP home page Giter VIP logo

gene-flow-inference's Introduction

gene-flow-inference

description a work in progress

This project is for estimating the reverse time gene flow (g) and coalescence rates (gamma) from pairwise mean divergence and sample locations. Currently, a grid resolution must be specified.

Scripts:

test.R -A simple test script to demonstrate using the "run.mcmc" function to use the coalescence and commute time based methods to recover an example problem. User inputs the grid size (length and width). Gene flows rates currently are symmetric and randomly generated, but can be specified.

many.coalvcom.sym.R -Script to run many symmetric 3x2 example problems under different situations. Currently tests 25 different problems at 4 different noise levels (for error in the input H). Currently very messy

Functions:

mult_small

  • a function to help parallelize the "run.mcmc" function

run.mcmc

  • a function to call either the coalescence or commute time based MCMC functions three times, once for "pre-burn-in" where the likelihood function is not as strict (to help avoid local optima), once for normal burn-in, then once for sampling.

findG.MH

  • a function that runs the Metropolis Hastings algorithm using the coalescence time method to estimate the posterior distributions of g and gamma

findG.MH.com

  • a function that runs the Metropolis Hastings algorithm using the commute time approximation of coalescence time to estimate the posterior distributions of g and q (the within location diversity rates).

findG.nnls

  • a function that uses the nnls (Non-Negative Least Squares) package to solve for g and gamma

mcmc.fns

  • auxiliary functions required for the other functions, like calculating the pairwise divergence and log likelihood from the current values of g and gamma. Also contains some HMC functions

findG.HMC

  • a Hamiltonian Monte Carlo (HMC) method based on the coalescence time. May be out of date.

gene-flow-inference's People

Contributors

elundgre avatar petrelharp avatar

Stargazers

 avatar Javier F. Tabima avatar peterdfields avatar  avatar

Watchers

 avatar  avatar

Forkers

petrelharp

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.