Code Monkey home page Code Monkey logo

shiny_popgen's Introduction

Shiny apps for pop gen courses.

Created by Silas Tittes and Scott Taylor, for the undergraduate Population Genetics course taught at University of Colorado at Boulder.

This repository consists of multiple sub-directories organized by topic. Each directory has at least one shiny app. Some have multiple.

Dependencies

R and RStudio

Additionally, make sure tidyverse, shiny, and wesanderson packages are installed.

#get package names
pckgs <- c("tidyverse", "shiny", "wesanderson")

#determine if packages are installed already
miss <- pckgs[!pckgs %in% installed.packages()]

#install missing packages
if(length(miss)) install.packages(miss, dependencies = TRUE)

How to run apps

To run an app, simply open in RStudio and click the "Run App" button. We prefer to use the "Run External" option (see image), which will open the app in your system's default web browser.

shiny_pic

Details

  • Drift

    • drift_app.R
      • Two-allele drift-only model. Shows fluctuations in allele frequency over discrete generations. Includes option of imposing a bottleneck (without population size recovery).
  • Coalescence

    • discrete_time_app.R
      • Discrete-time forward simulation of sampling alleles. Provides option to show trace of ancestry (useful to see if alleles coalesce in time of simulation).
    • continuous_coalescence_app.R
      • Create random genealogies and drop mutations along branches (number of mutations recorded in the small box along branches). Option to hide or show the sequence alignment and genealogy (note columns are individuals).
  • FST

    • fst_app.R
      • Two deme visualization. Randomly samples alleles according to frequencies specified by user. Prints HS, HT, and FST.
  • Selection

    • haploid_selection_app.R
      • Shows change in allele frequency over time due to relative fitness of alleles.
    • diploid_selection_app.R
      • Produces three plot types, average fitness versus allele frequency, change in allele frequency versus allele frequency, and allele frequency over discrete generations.
  • STRUCTURE

    • structure.R
      • Not a shiny app, Make plots from STUCTURE output.
  • Quant-Gen

    • additive_alleles_app.R
      • A really simple demonstration on how additive alleles contribute to quantitative traits, and rapidly approximate a normal distribution.

Contribute

I would love to expand and improve these. Please submit pull requests and issues, or email me with suggestions. silas(dot)tittes(at)gmail(dot)com

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.