Skip to content

Commit 7629597

Browse files
author
SoniaRuiz
committed
documentation added
1 parent 128505c commit 7629597

File tree

2 files changed

+183
-442
lines changed

2 files changed

+183
-442
lines changed

introverse/app.R

Lines changed: 13 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,16 @@ ui <- navbarPage(
4545
useShinyjs(),
4646
tags$head(includeHTML(path = "www/html/google-analytics.html")),
4747

48-
#tags$head(tags$link(rel="shortcut icon", href = "introverse-icon.png")),
48+
4949
header = list(shiny::includeCSS(path = "www/css/style.css"),
5050
shiny::includeScript(path = "www/js/api.js")
5151
),
52-
#shinyFeedback::useShinyFeedback(),
5352

5453
title = "IntroVerse",
5554
id = "introverse",
5655
selected = "landing",
5756

5857

59-
6058
theme = bslib::bs_theme(bootswatch = "cosmo",
6159
version = 4),
6260

@@ -104,21 +102,6 @@ ui <- navbarPage(
104102
div(
105103
id = "geneInputPanel_tab1",
106104

107-
# ## Option 1
108-
# hr(),
109-
# span(strong("Search:")),
110-
# shiny::radioButtons(inputId = "radiobutton_introntype_tab1",
111-
# label = "",
112-
# choiceNames = c("Introns",
113-
# "Novel Junctions"),
114-
# choiceValues = c("introns",
115-
# "novel"),
116-
# selected = "introns"),
117-
118-
#strong(span("Using Ensembl Release 105 (Dec 2021)")),
119-
120-
#hr(),
121-
122105
## Option 1
123106
span(strong("Search by:"),
124107
a(`data-toggle`="collapse",
@@ -189,8 +172,6 @@ ui <- navbarPage(
189172

190173
hr(),
191174

192-
193-
194175
## Option 4
195176

196177
p(strong("Sample selection"),
@@ -232,8 +213,7 @@ ui <- navbarPage(
232213

233214
hr(),
234215

235-
236-
## Option 6
216+
## Option 5
237217
p(strong("Support for novel annotation"),
238218
a(`data-toggle`="collapse",
239219
href="#collapseNovelAnnotation",
@@ -258,10 +238,7 @@ ui <- navbarPage(
258238
),
259239
hr(),
260240

261-
262-
263-
264-
## Option 5
241+
## Option 6
265242

266243
span(strong("Additional filters"),
267244
a(`data-toggle`="collapse",
@@ -280,9 +257,6 @@ ui <- navbarPage(
280257
value = F)
281258
),
282259

283-
284-
285-
286260
## BUTTON
287261
hr(),
288262
actionButton(inputId = "geneButton_tab1", label = "Accept"),
@@ -408,7 +382,6 @@ ui <- navbarPage(
408382

409383

410384

411-
412385
br(),
413386

414387
uiOutput("use_case3"),
@@ -541,15 +514,16 @@ ui <- navbarPage(
541514

542515
h3("introverse.sqlite"),
543516
p("To download this resource, please click the button below:"),
544-
downloadButton(outputId = 'downloadSQLite', label = 'Download', class = 'disabled' ),br(),
517+
downloadButton(outputId = 'downloadSQLite', label = 'Download' ),br(),
545518
p(tags$small("The download may take a few seconds to start.", style="font-size: smaller")),
546519

547520
p("This resource contains:"),
548521
tags$ul(
549522
tags$li("The full IntroVerse database in SQLite format ", em("('introverse.sqlite')"), "."),
550523
tags$li("The SQLite schema, to provide information of how the different child and master tables are related between them ", em("('introverse_schema_complete.html')"), "."),
551524
tags$li("Two .csv files containing the column description of the intron and novel junction tables ", em("('intron_columns.csv' and 'novel_columns.csv')"), "."),
552-
tags$li("A .txt file with some useful SQL queries ", em("('sql_queries.txt')"), ".")
525+
tags$li("A .txt file with some useful SQL queries ", em("('sql_queries.txt')"), "."),
526+
tags$li("A .txt file containing the complete SQL schema ", em("('introverse_sql_schema.txt')"), ".")
553527
)))),
554528
tabPanel(
555529
title = "SQLite Schema",
@@ -657,14 +631,8 @@ server <- function(input, output, session) {
657631
shinyjs::hideElement(id = "chr_strand_tab1")
658632
shinyjs::hideElement(id = "start_end_tab1")
659633
shinyjs::hideElement(id = "div_gene_file")
660-
#shinyjs::hideElement(id = "gene_tab1")
661-
# shinyjs::disable(id = "geneButton")
662-
663-
664-
#shinyjs::hideElement(id = "geneInputPanel_tab1")
665-
#shinyjs::hideElement(id = "genePanel_tab1")
634+
666635
shinyjs::disable(id = "threshold_tab1")
667-
#shinyjs::disable(id = "radiobutton_searchtype_tab1")
668636

669637

670638
##############################################################################
@@ -694,7 +662,6 @@ server <- function(input, output, session) {
694662
shinyjs::hideElement(id = "start_end_tab1")
695663

696664

697-
# shiny::updateSliderInput(session = session, inputId = "threshold_tab1", value = 1)
698665
if (!input$all_tissues_tab1) {
699666
shinyjs::enable(id = "data_bases_tab1")
700667
}
@@ -709,7 +676,6 @@ server <- function(input, output, session) {
709676
shinyjs::showElement(id = "start_end_tab1")
710677

711678

712-
#shiny::updateSliderInput(session = session, inputId = "threshold_tab1", value = 1)
713679
if (!input$all_tissues_tab1) {
714680
shinyjs::enable(id = "data_bases_tab1")
715681
}
@@ -907,8 +873,9 @@ server <- function(input, output, session) {
907873
#print(URLdecode(URL = input$cluster_tab1))
908874

909875
novel_junctions_from_intron <- get_novel_data_from_intron(intron_id = URLdecode(URL =input$intronID_tab1),
910-
db = URLdecode(URL =input$db_tab1),
911-
sample_group = URLdecode(URL =input$cluster_tab1)) %>% dplyr::mutate(More = "")
876+
clust = URLdecode(URL =input$cluster_tab1),
877+
db = URLdecode(URL =input$db_tab1)) %>%
878+
dplyr::mutate(More = "")
912879
novel_tooltips <- read.delim(file = "./dependencies/novel_tooltips.csv", header = T, sep = ",") %>%
913880
as_tibble()
914881

@@ -978,15 +945,6 @@ server <- function(input, output, session) {
978945
## MODAL POP-UPS
979946
##############################################################################
980947

981-
# output$modalVisualiseTranscript_tab1 <- renderPlot({
982-
#
983-
# visualise_transcript(intron_id = str_replace_all(string = input$intronID_tab1, pattern = "%20", replacement = " "),
984-
# db = str_replace_all(string = input$db_tab1, pattern = "%20", replacement = " "),
985-
# clust = str_replace_all(string = input$cluster_tab1, pattern = "%20", replacement = " ") )
986-
#
987-
#
988-
# }, width = "auto", height = "auto")
989-
990948
visualiseTranscriptPlot <- function() {
991949
visualise_transcript(novel_id = str_replace_all(string = input$novelID_tab1, pattern = "%20", replacement = " "),
992950
db = str_replace_all(string = input$db_tab1, pattern = "%20", replacement = " "),
@@ -1261,7 +1219,7 @@ server <- function(input, output, session) {
12611219

12621220
tagList(
12631221
h1(em(input$gene_tab1)),
1264-
h2("Mis-splicing activity in the MANE transcript"),
1222+
h2("Mis-splicing activity in the MANE transcript of ", em(input$gene_tab1)),
12651223
br(),
12661224
p("The Mis-Splicing Ratio (MSR) measure represents the frequency whereby any annotated intron within the Matched Annotation from NCBI and EMBL-EBI (MANE) transcript of a gene of interest is mis-spliced at its donor (in blue - MSR_Donor) and acceptor (in red - MSR_Acceptor) splice sites across all samples of a given human tissue."),
12671225
p("Since the MSR formula produces a normalised figure ranging between 0 and 1, the higher the vertical bar shown, the higher the proportion of novel junction reads paired to the annotated intron displayed.",
@@ -1293,20 +1251,7 @@ server <- function(input, output, session) {
12931251
}, width = "auto", height = "auto")
12941252

12951253
}
1296-
1297-
1298-
1299-
1300-
1301-
# downloadHandler(
1302-
# filename = paste0("missplicing_",i,".png"),
1303-
# content = function(file) {
1304-
# ggsave(file, plot = plot_graph, device = "png")
1305-
# }, contentType = 'image/png')
1306-
1307-
1308-
1309-
#outputtt$`25`
1254+
13101255
}),
13111256
shinyjs::enable(id = "geneButton_tab1"),
13121257
shinyjs::removeClass(class = "disabled-tab",
@@ -1348,24 +1293,7 @@ server <- function(input, output, session) {
13481293
rownames = F)
13491294
)
13501295
)
1351-
# i <- metadata$SRA_project_tidy %>% unique() %>% length()
1352-
#
1353-
# #metadata <- plot_metadata()
1354-
# tagList(
1355-
#
1356-
# lapply(1:i, function(n) {
1357-
#
1358-
# metadata <- plot_metadata()
1359-
# total <- metadata$SRA_project_tidy %>% unique()
1360-
# df <- metadata %>%
1361-
# dplyr::filter(SRA_project_tidy == total[n])
1362-
# #print(total[n])
1363-
# #outputtt[[paste(n)]]
1364-
# shiny::tags$h3(total[n]) %>% print
1365-
# DT::renderDT(server = F, DT::datatable(df))
1366-
# #outputtt$`25`
1367-
# })
1368-
# )
1296+
13691297
})
13701298

13711299
output$intron_table <- DT::renderDataTable({

0 commit comments

Comments
 (0)