Skip to content

Commit

Permalink
Dev (#3)
Browse files Browse the repository at this point in the history
* clean up requirements
* sync package loading with req.txt file
* clean up redudant code to check and install packages
* set up tests for mzML and Bruker file loading
* set smoothHalfWindowSize to a more reasonable value
* remove devtools and use pak instead
* add more error handling for loading data
* add notifications to the app
  • Loading branch information
thomas-enzlein committed Jul 2, 2024
1 parent 4c26569 commit e74e7fb
Show file tree
Hide file tree
Showing 36 changed files with 386 additions and 423 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ jobs:
# Install R package dependencies from req.txt
- name: Install R packages from req.txt
run: |
R -e "install.packages('devtools')"
R -e "devtools::install_github('CeMOS-Mannheim/MALDIcellassay')"
R -e "packages <- readLines('req.txt'); install.packages(packages)"
R -e "install.packages('pak')"
R -e "packages <- readLines('req.txt'); pak::pkg_install(packages)"
# Install R package dependencies from req.txt
- name: Install MALDIcellassay
run: |
R -e "pak::pkg_install('CeMOS-Mannheim/MALDIcellassay')"
# Install testthat if it's not listed in req.txt
- name: Install testthat
run: R -e "if (!require('testthat')) install.packages('testthat')"
run: R -e "if (!require('testthat')) pak::pkg_install('testthat')"

# Run tests
- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
defaults.conf
settings.conf
settings.csv
checkUsedFunctions.R
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ COPY req.txt /req.txt
RUN R -e "packages <- readLines('/req.txt'); install.packages(packages)"

# Install the MALDIcellassay from GitHub
RUN R -e "devtools::install_github('CeMOS-Mannheim/MALDIcellassay')"
RUN R -e "pak::pkg_install('CeMOS-Mannheim/MALDIcellassay')"


## copy app folder into container
COPY ./ ./app
Expand Down
8 changes: 4 additions & 4 deletions components/hcTab.R → components/clustTab.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
clustTab <- function() {
#### HClust tab ####
#### clustering tab ####
tabPanel("Cluster",
h4("Curve clustering"),
fluidRow(
column(6,
plotlyOutput("hclustPlot")),
plotlyOutput("clustPlot")),
column(6,
plotlyOutput("clustCurvesPlot"))
),
fluidRow(
column(2,
createActionButton(inputId = "doHC",
createActionButton(inputId = "doClust",
label = "Perform clustering",
icon = "circle-nodes")),
column(2,
Expand All @@ -21,7 +21,7 @@ clustTab <- function() {
value = defaults$num_cluster,
step = 1)),
column(2,
createActionButton(inputId = "hc2peaksTable",
createActionButton(inputId = "clust2peaksTable",
label = "Send to Peak Table",
icon = "share-from-square"))
),
Expand Down
2 changes: 1 addition & 1 deletion components/mainpanel.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source("components/mainTab.R")
source("components/qcTab.R")
source("components/pcaTab.R")
source("components/hcTab.R")
source("components/clustTab.R")

appMainPanel <- function(defaults) {
m <- mainPanel(
Expand Down
8 changes: 3 additions & 5 deletions components/pcaTab.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ pcaTab <- function() {
multiple = FALSE,
selected = defaults$pcaEllipse)),
column(1,
materialSwitch(
inputId = "simpleLoadings",
label = "Summarise loadings",
value = defaults$simpleLoadings,
status = "primary")
checkboxInput(inputId = "simpleLoadings",
label = "Summarise loadings",
value = defaults$simpleLoadings)
),
column(2,
createActionButton(inputId = "pca2peaksTable",
Expand Down
Loading

0 comments on commit e74e7fb

Please sign in to comment.