Skip to content

Commit

Permalink
file-text to file-alt
Browse files Browse the repository at this point in the history
  • Loading branch information
YTLogos committed Oct 31, 2021
1 parent b320e50 commit 6637bab
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 44 deletions.
110 changes: 110 additions & 0 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.14")
devtools::install_github("tidyverse/tidyverse")
library(shiny)
library(shinydisconnect)
library(ggplot2)
library(stringr)
library(dplyr)
library(tidyr)
library(forcats)
library(patchwork)
library(glue)
library(ggpubr)
library(writexl)
library(snpStats)
BiocManager::install("snpStats")
library(writexl)
library(snpStats)
library(IRanges)
BiocManager::install(c("IRanges","ape","LDheatmap","pegas","ggtree"))
options(warn = -1")
BiocManager::install("shiny")
BiocManager::install("shinydisconnect")
library(IRanges)
library(LDheatmap)
library(ape)
library(pegas)
library(gridExtra)
library(grid)
library(ggtree)
library(shinycssloaders)
library(shinysky)
devtools::install_github("AnalytixWare/ShinySky")
library(shinydashboard)
library(shinyWidgets)
library(gggenes)
library(DT)
library(shinythemes)
library(NAM)
library(adegenet)
library(rmarkdown)
library(rvg)
library(officer)
source("script/mod_ldheatmap.R")
source("script/mod_snpdistribution.R")
source("script/mod_phylogenetics.R")
source("script/mod_diversity.R")
source("script/mod_extraction.R")
source("script/mod_documentation.R")
source("script/mod_about.R")
source("script/extractsnp.R")
source("script/extractallele.R")
source("script/ldheatmap.R")
source("script/genestru.viz.R")
source("script/chooser.R")
source("script/readNewData.R")
#' @param rightLabel
#' @param leftChoices
#' @param rightChoices
#' @param size
#' @param multiple
#'
#' @return
#' @export
#'
#' @examples
chooserInput <- function(inputId, leftLabel, rightLabel, leftChoices, rightChoices,
size = 2, multiple = FALSE) {
leftChoices <- lapply(leftChoices, tags$option)
rightChoices <- lapply(rightChoices, tags$option)
if (multiple) {
multiple <- "multiple"
} else {
multiple <- NULL
}
tagList(
singleton(tags$head(
tags$script(src = "css/chooser-binding.js"),
tags$style(
type = "text/css",
HTML(".chooser-container { display: inline-block; }")
)
)),
div(
id = inputId, class = "chooser",
div(
class = "chooser-container chooser-left-container",
tags$select(class = "left", size = size, multiple = multiple, leftChoices, style = "width:100px;background:gray50")
),
div(
class = "chooser-container chooser-center-container",
icon("arrow-alt-circle-right", "right-arrow fa-2x"),
tags$br(),
icon("arrow-alt-circle-left", "left-arrow fa-2x")
),
div(
class = "chooser-container chooser-right-container",
tags$select(class = "right", size = size, multiple = multiple, rightChoices, style = "width:100px;background:gray50")
)
)
)
}
source("script/snp_distribution.R")
shiny::runApp()
BiocManager::install("markdown")
runApp()
runApp()
rm(list=ls())
runApp()
88 changes: 44 additions & 44 deletions app.R
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
source("global.R")
ui <- fluidPage(
tags$script(src="css/addhash.js"),
div(img(src = "img/bnasnpdb_logo.png")),
includeCSS("www/css/custom.css"),
includeCSS("www/css/footer.css"),
disconnectMessage(
text = "Your session timed out, reload the application!",
refresh = "Reload now",
background = "#f89f43",
colour = "white",
overlayColour = "grey",
overlayOpacity = 0.75,
top = 250,
refreshColour = "brown"
),
navbarPage(
title = "",
windowTitle = "Welcome to BnaSNPDB",
theme = shinytheme("flatly"),
tabPanel("Home", homepage, icon = icon("home")),
tabPanel("LDheatmap", mod_ldheatmap_ui("ld")),
tabPanel("SNPdistribution", mod_snpdistribution_ui("dis")),
tabPanel("Phylogenetics", mod_phylogenetics_ui("tree")),
tabPanel("Diversity", mod_diversity_ui("diversity")),
tabPanel("Extraction", mod_extraction_ui("extract"), icon = icon("search")),
tabPanel("Documentation", mod_doc_ui("doc"), icon = icon("file-text")),
tabPanel("About", mod_about_ui("about"), icon = icon("info-circle")),
footer = footerTagList
)
)

server <- function(input, output, session) {
callModule(mod_ldheatmap_server, "ld")
callModule(mod_snpdistribution_server, "dis")
callModule(mod_phylogenetics_server, "tree")
callModule(mod_diversity_server, "diversity")
callModule(mod_extraction_server, "extract")
observeEvent(input$disconnect, {
session$close()
})
}

shinyApp(ui, server)
source("global.R")
ui <- fluidPage(
tags$script(src="css/addhash.js"),
div(img(src = "img/bnasnpdb_logo.png")),
includeCSS("www/css/custom.css"),
includeCSS("www/css/footer.css"),
disconnectMessage(
text = "Your session timed out, reload the application!",
refresh = "Reload now",
background = "#f89f43",
colour = "white",
overlayColour = "grey",
overlayOpacity = 0.75,
top = 250,
refreshColour = "brown"
),
navbarPage(
title = "",
windowTitle = "Welcome to BnaSNPDB",
theme = shinytheme("flatly"),
tabPanel("Home", homepage, icon = icon("home")),
tabPanel("LDheatmap", mod_ldheatmap_ui("ld")),
tabPanel("SNPdistribution", mod_snpdistribution_ui("dis")),
tabPanel("Phylogenetics", mod_phylogenetics_ui("tree")),
tabPanel("Diversity", mod_diversity_ui("diversity")),
tabPanel("Extraction", mod_extraction_ui("extract"), icon = icon("search")),
tabPanel("Documentation", mod_doc_ui("doc"), icon = icon("file-alt")),
tabPanel("About", mod_about_ui("about"), icon = icon("info-circle")),
footer = footerTagList
)
)

server <- function(input, output, session) {
callModule(mod_ldheatmap_server, "ld")
callModule(mod_snpdistribution_server, "dis")
callModule(mod_phylogenetics_server, "tree")
callModule(mod_diversity_server, "diversity")
callModule(mod_extraction_server, "extract")
observeEvent(input$disconnect, {
session$close()
})
}

shinyApp(ui, server)
Binary file modified data/Other_data/Ref.gene.anno.RData
Binary file not shown.

0 comments on commit 6637bab

Please sign in to comment.