- updated 5/6/2021
- Main Developers: Francis P. Grenn, Jonggeol J. Kim, Mary B. Makarious
- Design and Concept: Francis P. Grenn, Jonggeol J. Kim, Mary B. Makarious, Cornelis Blauwendraat, Andrew B. Singleton
- ui.R - code for user interface layout.
- server.R - code for server logic.
- global.R - library imports and code to call other R files. Make changes to this file if you are adding a new section to the browser.
- sidebar.R - code for the sidebar and header elements. Contains logic for the searchbar.
- tutorial.R - code for the tutorial mode.
- about.R - code for the about tab.
- [name]_section.R - code for a section in the browser.
- appManifest.txt - list of files and folders that will be deployed to the server for the public version of the app
- typically includes: all .R files, the www/ folder
- DataProcessing - contains all scripts used to filter and clean the data for the app
- www - contains all the data (tables and images) that will be displayed in the app
Some general steps to follow if you are adding new data to the browser.
Make a new R file (something like [name]_section.R).
Some simple examples are burden_section.R
,pheno_vars_section.R
,etc...
The R file will need the following for it to work in the browser:
-
- (ii)-(vii) must all be added to this list
newSection<-list()
-
- this will be used to identify the section when using the "jump to section" drop down.
- this will also be used to identify the correct help markdown file for the section.
newSection$id <- "newsection"
-
- this is the title that will be displayed for the section in the browser.
newSection$title <- "New Section Title"
-
- this function should contain code to read data and create dataframes. Variable, dataframes, etc, that will be displayed in the browser should be initilized using
<<-
(not<-
). - Input: None.
- Output: No return values needed.
newSection$loadData<- function(){ new_section_data <<- fread("www/newSectionDataFile.csv") }
- this function should contain code to read data and create dataframes. Variable, dataframes, etc, that will be displayed in the browser should be initilized using
-
- this function will create the user interface for the section, excluding the accordion and help button.
- Input: None.
- Output: Return all of the user interface code in a div, fluidRow, etc.
newSections$generateUI<- function(){ fluidRow( column(dataTableOutput("newSectionTable"), width = 12) ) }
-
- this function will contain all server logic code. This is where the outputs are rendered and changes to inputs are observed.
- Input: input, output and session objects from the server
- Output: None.
newSection$serverLogic <- function(input,output,session) { #code here to render outputs, observe inputs, etc... }
-
qtl_section.R
, for example, has extra functions added to its lists to allow it to communicate with theevidence_section.R
code.
- add code to reference the new R file
source("new_section.R",local=T)
- add the list from the R file to the
sections
list
sections <- list(locusZoom=locusZoom,newSection=newSection)
- must be named after the section's id
- the help markdowns go in
www/help_files/
- update the version number in
global.R
- update the version and document the changes in the file used in the about tab.
- add new R files to the
appManifest.txt
so they will be picked up when deploying the app.
- See the
DataProcessing
directory for steps on which scripts to run.