Commit b34ebe2d authored by Kunst, Jonathan's avatar Kunst, Jonathan
Browse files

Add qtlpoly import options

parent bfc81966
......@@ -13,6 +13,7 @@ importFrom(ggplot2,geom_line)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,theme)
importFrom(ggplot2,ylab)
importFrom(golem,activate_js)
importFrom(golem,add_resource_path)
importFrom(golem,bundle_resources)
......
......@@ -14,39 +14,62 @@ mod_import_panel_ui <- function(id){
sidebarPanel(
h3('Input'),
# Phenotype input
mod_import_ui(ns('phenotype'),
label = 'Phenotype'),
hr(),
# Link map input
mod_import_ui(ns('linkmap'),
label = 'Phase linkage map',
multiple = TRUE),
hr(),
# SNP dosage input
mod_import_ui(ns('snp'),
label = 'SNP Dosage matrix')
),
mainPanel(
# sets of DF to show upload being successful
tabsetPanel(
tabPanel('Phenotype',
mod_table_ui(ns('phenotype'))),
tabPanel('Linkage map',
selectInput(inputId = ns('choice_map'),
label = 'Select linkage group',
choices = 'Input map first'),
mod_table_ui(ns('linkmap'))),
tabPanel('SNP Dosage',
mod_table_ui(ns('snp')))
tabPanel('polyqtlR',
# Phenotype input
mod_import_ui(ns('phenotype'),
label = 'Phenotype'),
hr(),
# Linkage map input
mod_import_ui(ns('linkmap'),
label = 'Phased linkage map (polymapR)',
multiple = TRUE),
hr(),
# SNP dosage input
mod_import_ui(ns('snp'),
label = 'SNP Dosage matrix')
),
tabPanel('QTLpoly',
# Phenotype input
mod_import_ui(ns('qtlpoly_pheno'),
label = 'Phenotype'),
hr(),
# Linkage map input
mod_import_ui(ns('qtlpoly_linkmap'),
label = 'Phased linkage map (MAPpoly)')
)
)
),
mainPanel(
# sets of DF to show upload being successful
tabsetPanel(
tabPanel('Phenotype',
mod_table_ui(ns('phenotype')),
mod_table_ui(ns('qtlpoly_pheno'))),
tabPanel('Linkage map',
selectInput(inputId = ns('choice_map'),
label = 'Select linkage group',
choices = 'Input map first'),
mod_table_ui(ns('linkmap')),
verbatimTextOutput(ns('qtlpoly_linkmap'))),
tabPanel('SNP Dosage',
mod_table_ui(ns('snp')))
)
)
)
)
)
)
}
#' import_panel Server Functions
......@@ -56,11 +79,12 @@ mod_import_panel_server <- function(id, rv){
moduleServer( id, function(input, output, session){
ns <- session$ns
# phenotype ----
# polyqtlR ----
# phenotype
mod_import_server('phenotype', rv = rv, rvlab = 'phenotype')
mod_table_server('phenotype', rv = rv, rvlab = 'phenotype')
# linkage map ----
# linkage map
mod_import_server('linkmap', rv = rv, rvlab = 'linkmap')
# selection modifier
......@@ -73,9 +97,21 @@ mod_import_panel_server <- function(id, rv){
mod_table_server('linkmap', rv = rv, rvlab = 'linkmap')
# # SNP dosage ----
# # SNP dosage
mod_import_server('snp', rv = rv, rvlab = 'snp')
mod_table_server('snp', rv = rv, rvlab = 'snp')
# QTLpoly ----
# phenotype
mod_import_server('qtlpoly_pheno', rv = rv, rvlab = 'qtlpoly_pheno')
mod_table_server('qtlpoly_pheno', rv = rv, rvlab = 'qtlpoly_pheno')
# linkage map
mod_import_server('qtlpoly_linkmap', rv = rv, rvlab = 'qtlpoly_linkmap')
output$qtlpoly_linkmap <- renderPrint({req(rv$qtlpoly_linkmap)
str(rv$qtlpoly_linkmap, max.level = 3)})
})
}
......
......@@ -9,7 +9,7 @@
#' @importFrom shiny NS tagList
#' @importFrom shinycssloaders withSpinner
#' @importFrom plotly ggplotly renderPlotly plotlyOutput highlight layout event_data
#' @importFrom ggplot2 ggplot aes geom_point geom_line facet_wrap theme element_blank
#' @importFrom ggplot2 ggplot aes geom_point geom_line facet_wrap theme element_blank ylab
#' @importFrom dplyr bind_rows filter
#' @importFrom magrittr %>%
mod_qtl_plotly_panel_ui <- function(id){
......@@ -117,6 +117,7 @@ mod_qtl_plotly_panel_server <- function(id, rv){
))) +
geom_line() +
facet_wrap(~chromosome) +
ylab('LOD/LOP/-DIC') +
theme(
panel.grid = element_blank(),
panel.background = element_blank(),
......
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