Skip to content

Commit

Permalink
Cosmetic changes for the logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWeinreb committed Oct 12, 2022
1 parent 2b82e41 commit 4a65f0d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
20 changes: 14 additions & 6 deletions server.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### CenGenAPP 2018-2020
#### Report bugs to: gabrielsantperebaro@gmail.com
#### CeNGEN-app 2018-2022
#### Report bugs at https://github.com/cengenproject/CengenApp/issues



Expand All @@ -8,6 +8,7 @@ server <- function(input, output) {
### Gene expression by cell type Panel ----

observeEvent(input$TCell, {
cat("--> thresholded gene expression TCell\n")
withProgress(message = "Obtaining information...", value = 0, {

load_as_needed("L4.all.TPM.raw_th")
Expand Down Expand Up @@ -75,6 +76,7 @@ server <- function(input, output) {
})

observeEvent(input$TGene, {
cat("--> thresholded gene expression TGene\n")

load_as_needed("L4.all.TPM.raw_th")
load_as_needed("ths")
Expand Down Expand Up @@ -179,6 +181,7 @@ server <- function(input, output) {
})

observeEvent( list(input$Tgene_name_batch, input$Tgene_cut_batch) , {
cat("--> thresholded gene expression Tgene_name_batch/Tgene_cut_batch\n")

load_as_needed("L4.all.TPM.raw_th")
load_as_needed("ths")
Expand Down Expand Up @@ -244,6 +247,7 @@ server <- function(input, output) {
### Find markers based on percentage of expression Panel ----

observeEvent(input$Filter, {
cat("--> find markers Filter\n")

load_as_needed("pcttable")

Expand Down Expand Up @@ -321,6 +325,7 @@ server <- function(input, output) {
### Enriched Genes by cell type Panel ----

observeEvent(input$Markers, {
cat("--> enriched genes Markers\n")

load_as_needed("markers")

Expand Down Expand Up @@ -350,7 +355,9 @@ server <- function(input, output) {
}
)
})

observeEvent(input$Markers2, {
cat("--> enriched genes Markers2\n")

load_as_needed("markersAllcells")

Expand Down Expand Up @@ -380,8 +387,7 @@ server <- function(input, output) {

### Find Differential Expression between Cell Types Panel ----
observeEvent(input$DEXButton, {

cat("Testing DE of ", input$batch1, " vs ", input$batch2, "\n")
cat("--> testing DE of ", input$batch1, " vs ", input$batch2, "\n")

b1 <- unlist(strsplit(input$batch1, split = ","))
b1 <- gsub(" ", "", as.character(b1))
Expand Down Expand Up @@ -534,7 +540,8 @@ server <- function(input, output) {

### Heatmaps of gene expression Panel ----

observeEvent(input$PlotHeatmap, {
observeEvent(input$PlotHeatmapFromList, {
cat("--> heatmap PlotHeatmapFromList\n")

load_as_needed("med.scaled.long")
load_as_needed("L4.TPM.raw.scaled.long")
Expand Down Expand Up @@ -696,7 +703,8 @@ server <- function(input, output) {

### From file

observeEvent(input$PlotHeatmap2, {
observeEvent(input$PlotHeatmapFromFile, {
cat("--> heatmap PlotHeatmapFromFile\n")

load_as_needed("med.scaled.long")
load_as_needed("L4.TPM.raw.scaled.long")
Expand Down
32 changes: 19 additions & 13 deletions ui.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#### CenGenAPP 2018-2020
#### Report bugs to: [email protected]
#### CeNGEN-app 2018-2022
#### Report bugs at https://github.com/cengenproject/CengenApp/issues


cat("############# Loading libraries #################\n")

require(shiny)
library(shinyjs)
Expand All @@ -22,15 +25,18 @@ library(qs)
library(Matrix)
library(limma)

cat("############## Setting options ##################\n")

options(repos = BiocManager::repositories())
options(shiny.maxRequestSize = 400 * 1024 ^ 2)

source("Functions.R")


options(scipen = 0)
options(digits = 2)

cat("############ End initializations ################\n")


source("Functions.R")
utr <-
c(
"WBGene00023498",
Expand Down Expand Up @@ -113,7 +119,7 @@ ui <- fluidPage(
choices = c(1:4, "Unfiltered", "All Cells Unfiltered"),
selected = 2
),
actionButton("TCell", "Expressed genes", icon = icon("hand-o-right"))
actionButton("TCell", "Expressed genes", icon = icon("hand-point-right"))

),
#column(width = 1, offset = 0, style='padding:5px;'),
Expand All @@ -130,7 +136,7 @@ ui <- fluidPage(
choices = c(1:4, "Unfiltered", "All Cells Unfiltered"),
selected = 2
),
actionButton("TGene", "Which cell types", icon = icon("hand-o-right"))
actionButton("TGene", "Which cell types", icon = icon("hand-point-right"))
),
column(
2,
Expand Down Expand Up @@ -206,7 +212,7 @@ ui <- fluidPage(
label = "Minimum percentage of cells expressing the gene",
value = 65
),
actionButton("Filter", "Run query", icon = icon("hand-o-right"))
actionButton("Filter", "Run query", icon = icon("hand-point-right"))

),
#column(width = 1, offset = 0, style='padding:5px;'),
Expand Down Expand Up @@ -343,7 +349,7 @@ ui <- fluidPage(
selected = c("RME_DV","RME_LR"),
multiple = TRUE
),
actionButton("DEXButton", "Calculate DEX", icon = icon("hand-o-right"))
actionButton("DEXButton", "Calculate DEX", icon = icon("hand-point-right"))

),
column(
Expand Down Expand Up @@ -400,8 +406,8 @@ ui <- fluidPage(


actionButton(
"PlotHeatmap","Plot heatmap from list",
icon = icon("hand-o-right")
"PlotHeatmapFromList","Plot heatmap from list",
icon = icon("hand-point-right")


),
Expand All @@ -415,9 +421,9 @@ ui <- fluidPage(
)),
#column(3,actionButton("resetFile", "Clear uploaded file")),
column(3, actionButton(
"PlotHeatmap2",
"PlotHeatmapFromFile",
"Plot heatmap from file",
icon = icon("hand-o-right")
icon = icon("hand-point-right")
))
),

Expand Down

0 comments on commit 4a65f0d

Please sign in to comment.