Commit 562f8969 authored by Thomas Schwarzl's avatar Thomas Schwarzl

updated data

bumped version
added somatic disease mutations button
added counter for filter console
parent 3e3e8b66
......@@ -3,7 +3,7 @@
## Thomas Schwarzl
## schwarzl@embl.de
# ----------- Global
VERSION_ = "0.1.4"
VERSION_ = "0.1.5"
VERSION_TAG_ = "alpha"
## --------- Libraries
......@@ -356,24 +356,38 @@ pageRBPTable <- fluidRow(
#selectize = TRUE
)
),
column(2,
column(3,
tags$div(#class = "switchpanel",
materialSwitch(
inputId = "showRBPsonly",
label = "Show RBPs only",
value = TRUE#,
label = "Show RBPs only",
value = TRUE,
right = TRUE
#class = "topswitch",
#,
#status = "primary"
),
materialSwitch(
inputId = "showSomatic",
label = "Somatic Disease Mutations",
#class = "topswitch",
value = FALSE,
right = TRUE
),
materialSwitch(
inputId = "showCOVID",
label = "SARS-CoV-2 PPI",
value = FALSE#,
#class = "topswitch",
value = FALSE,
right = TRUE
#status = "primary"
),
materialSwitch(
inputId = "showInfection",
label = "RBPs virus infection",
value = FALSE#,
#class = "topswitch",
value = FALSE,
right = TRUE
#status = "primary"
),
uiOutput("filterSwitch")
......@@ -477,6 +491,9 @@ server <- function(input, output, session) {
filter <- reactiveValues()
#TODO naming of organism
#selectedOrganism <- reactiveValues()
observeEvent(input$link_to_download, {
updateTabsetPanel(session, "menu", "Download")
})
......@@ -487,12 +504,16 @@ server <- function(input, output, session) {
ret <- COMPILED_TABLE[[filter$selectedOrganism]]
# filters to RBPs found in this particular Organism
if(input$showSomatic) {
ret <- ret %>% filter(RBPANNO000000059.1)
}
if(input$showRBPsonly) {
ret <- ret %>% filter(!!rlang::sym(paste0("any_", input$selectedOrganism)))
ret <- ret %>% filter(!!rlang::sym(paste0("any_", input$selectedOrganism)))
}
if(input$showCOVID) {
ret <- ret %>% filter(RBPANNO0000000055.1)
ret <- ret %>% filter(RBPANNO000000055.1)
}
if(input$showInfection) {
......@@ -949,10 +970,12 @@ server <- function(input, output, session) {
output$filterStatus <- renderUI({
switchStatus <- input$showRBPsonly * 100 +
switchStatus <- input$showSomatic * 1000 +
input$showRBPsonly * 100 +
input$showCOVID * 10 +
input$showInfection * 1
message <- NA
n <- SelectedRBPTable() %>% nrow()
if(switchStatus == 100) {
message = "Only proteins with RIC records are shown."
......@@ -972,11 +995,31 @@ server <- function(input, output, session) {
message = "Only RBPs changing RNA-binding upon virus infection are shown."
} else if(switchStatus == 111) {
message = "Only overlap of RBPs changing RNA-binding upon virus infection and SARS-CoV-2 interactor proteins are shown."
} else if(switchStatus == 1000) {
message = "Only genes with somatic disease mutations are shown."
} else if(switchStatus == 1100) {
message = "Proteins with RIC records and somatic disease mutations are shown."
} else if(switchStatus == 1010) {
message = "SARS-CoV-2 interactor proteins with somatic disease mutations are shown."
} else if(switchStatus == 1001) {
message = "RBPs with somatic disease mutations changing RNA-binding upon virus infection are shown."
} else if(switchStatus == 1100) {
message = "SARS-CoV-2 interactor proteins with somatic disease mutations are shown."
} else if(switchStatus == 0000) {
message = "All genes are shown."
} else if(switchStatus == 1110) {
message = "SARS-CoV-2 interactor proteins with somatic disease mutations and RIC records are shown."
} else if(switchStatus == 1011) {
message = "Overlap of RBPswith somatic disease mutations changing RNA-binding upon virus infection and SARS-CoV-2 interactor proteins are shown."
} else if(switchStatus == 1101) {
message = "RBPs with somatic disease mutations changing RNA-binding upon virus infection are shown."
} else if(switchStatus == 1111) {
message = "Overlap of RBPs with somatic disease mutations changing RNA-binding upon virus infection and SARS-CoV-2 interactor proteins are shown."
} else {
stop("wrong switch values.")
}
HTML(message)
HTML(paste0(message, " (", n, ")"))
})
......
......@@ -17,7 +17,7 @@ renderAnnotationsTable <- function(ANNO_STUDIES) {
columnDefs = list(
list(
class = "dt-body-wrap",
targets = c(4),
targets = c(4, 5, 6, 7),
width = "450px"
)
)
......
......@@ -99,6 +99,9 @@ body {
font-size:70%;
}
.material-switch {
font-size:90%;
}
.rotate45 {
transform: rotate(-45deg);
......
Markdown is supported
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