Commit 1f233b58 authored by Kunst, Jonathan's avatar Kunst, Jonathan
Browse files

Changed SNP dosage input to read.csv(file, row.names = 1) because we expect a...

Changed SNP dosage input to read.csv(file, row.names = 1) because we expect a matrix as input here with rownames. load_file function doesn't work properly here yet
parent ee0ca3a6
......@@ -11,7 +11,6 @@ library(shiny)
library(shinybusy)
library(polyqtlR)
# UI ----
# Define page layout, fluidPage automatically adjusts to user border dimensions
# navbarPage allows for multiple sheets for several pages
......@@ -157,7 +156,9 @@ server <- function(input, output, session) {
# SNP Dosage data
dosage <- reactive({
req(input$i_dosage)
load_file(name = input$i_dosage$name, path = input$i_dosage$datapath)
# estimate IBD will need a matrix of snp dosages, expecting matrix input
read.csv(input$i_dosage$datapath, row.names = 1)
})
# Data tables ----
......@@ -184,7 +185,7 @@ server <- function(input, output, session) {
# Heuristic IBD estimation
heu_IBD <- eventReactive(input$heu_estimate, {
estimate_IBD(phased_maplist = link_map(),
genotypes = dosage(),
genotypes = as.matrix(dosage()),
ploidy = input$ploidy,
ncores = 2)
})
......@@ -192,7 +193,6 @@ server <- function(input, output, session) {
# Modal window to prevent interaction
observeEvent(input$heu_estimate, {
show_modal_spinner(text = 'Estimating IBDs, please wait')
Sys.sleep(5)
remove_modal_spinner()
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment