Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.
/ poppr_msn_shiny Public archive

A shiny interface to the poppr function plot_poppr_msn.

Notifications You must be signed in to change notification settings

zkamvar/poppr_msn_shiny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shiny App for minimum spanning networks in poppr

UPDATE: moved to poppr!

This has been moved to poppr 2.0 and is available by using:

install.packages("poppr")
poppr::imsn()

For the example below:

# Set up data
library("poppr")
library("magrittr")
data(monpop)
splitStrata(monpop) <- ~Tree/Year/Symptom
summary(monpop)
t26 <- monpop %>% setPop(~Tree) %>% popsub("26") %>% setPop(~Year/Symptom)
t26
imsn()

Old README

This repository contains a shiny application that will create and display minimum spanning networks via the poppr R package. This provides a simple way of exploring visualization of these networks with your own data.

It is recommended to use poppr version 2.0 for this. It is still in development. You can install it via github:

devtools::install_github("thibautjombart/adegenet") # requires adegenet 2.0
devtools::install_github("grunwaldlab/poppr@2.0-rc")

For an example, you can use the example from the minimum spanning network section of our primer to prepare data for exploratory visualization.

To run this application you should have installed shiny and poppr. After that you can use the following line to run the instance and a window will open in your browser.

shiny::runGitHub("zkamvar/poppr_msn_shiny")

Screencapture

To reproduce the screencapture above:

# Set up data
library("poppr")
library("magrittr")
data(monpop)
splitStrata(monpop) <- ~Tree/Year/Symptom
summary(monpop)
t26 <- monpop %>% setPop(~Tree) %>% popsub("26") %>% setPop(~Year/Symptom)
t26
shiny::runGitHub("zkamvar/poppr_msn_shiny")

Choose the t26 data set at the bottom and then copy and paste this into the "SSR repeat lengths" input box after selecting "Bruvo" as the distance calculation:

c(CHMFc4 = 7, CHMFc5 = 2, CHMFc12 = 4, SEA = 4, SED = 4, SEE = 2, SEG = 6, SEI = 3, SEL = 4, SEN = 2, SEP = 4, SEQ = 2, SER = 4)

UPDATE!

igraph has updated versions to 1.0 and changed the way graphs are plotted. This means that the layout you get with a given seed value will not be the same as in previous version of igraph.

If your igraph version is < 1.0.0:

  • Distance calculation: Bruvo
  • Populations: 9_BB, 9_FR
  • Node scale: 1.25
  • Color Palette: cm.colors
  • Labels: none
  • Random Seed: 9001

If your igraph version is >= 1.0.0:

  • Distance calculation: Bruvo
  • Populations: 9_BB, 9_FR
  • Node scale: 1.45
  • Color Palette: cm.colors
  • Labels: none
  • Random Seed: 99

About

A shiny interface to the poppr function plot_poppr_msn.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages