AIMs profile analysis


author: r params$set_author date: r format(Sys.time(), "%a %b %d %X %Y")


File: r params$set_file

knitr::opts_chunk$set(echo = FALSE, comment = NA, message = FALSE, warning = FALSE, fig.width = 11, fig.asp = 0.8, error = TRUE, fig.align = 'center')
library(knitr)
## library(kableExtra)
library(readr)
library(dplyr)
library(ggplot2)
library(tidyr)
library(tibble)
library(purrr)
library(forcats)
theme_set(theme_bw(base_size = 14))
res <- result()

This is an autogenerated report from genogeographer version r packageVersion("genogeographer").

The report contains outputs from meta and specific populations. The analysed genotype is in the appendix.

Meta populations

Plots

error_bar_plot(res$meta)
res_ <- res$meta
if(is.null(input[[paste0("lr_", input$meta)]])) res_ <- res_ %>% mutate(LR_listing = "No")
if(!is.null(input[[paste0("lr_", input$meta)]])) 
  res_ <- res_ %>% mutate(LR_listing = ifelse(.[[1]] %in% input[[paste0("lr_",input$meta)]], "Yes", "No"))
res_ <- filter(res_, !(is.na(lat) | is.na(lon))) ## Discard pops with no location
map_plot(res_)

Tables

result_table(res$meta, flat = (params$set_output != "HTML"))

Likelihood ratios

accepted_ <- if(is.null(input$LR_accept)) FALSE else (input$tilt == "allow")
LR_list(result = res$meta, lr_pops = input$lr_meta, CI = input$CI/100, accepted = accepted_, flat = (params$set_output != "HTML"))

Populations

Plots

error_bar_plot(res$pop)
res_ <- res$pop
if(is.null(input[[paste0("lr_", input$meta)]])) res_ <- res_ %>% mutate(LR_listing = "No")
if(!is.null(input[[paste0("lr_", input$meta)]])) 
  res_ <- res_ %>% mutate(LR_listing = ifelse(.[[1]] %in% input[[paste0("lr_",input$meta)]], "Yes", "No"))
res_ <- filter(res_, !(is.na(lat) | is.na(lon))) ## Discard pops with no location
map_plot(res_)

Tables

result_table(res$pop, flat = (params$set_output != "HTML"))

Likelihood ratios

LR_list(result = res$pop, lr_pops = input$lr_pop, CI = input$CI/100, accepted = accepted_, flat = (params$set_output != "HTML"))

Appendix

Uploaded profile

profile <- Profile() %>% mutate(genotype = paste0(A1, A2)) %>% 
  select(locus, genotype)
if(params$set_output == "HTML") profile %>% DT::datatable()
if(params$set_output != "HTML") profile %>% kable()


Try the genogeographer package in your browser

Any scripts or data that you put into this service are public.

genogeographer documentation built on Sept. 27, 2019, 5:03 p.m.