Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/prune gui #144

Open
wants to merge 5 commits into
base: dev_2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 45 additions & 49 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,61 +1,57 @@
Package: HaDeX
Title: Analysis and Visualisation of Hydrogen/Deuterium Exchange Mass Spectrometry Data
Title: Analysis and Visualisation of Hydrogen/Deuterium Exchange Mass
Spectrometry Data
Version: 1.2.1
Authors@R: c(person("Weronika", "Puchala",
email = "[email protected]",
comment = c(ORCID = "0000-0003-2163-1429"),
role = c("cre", "aut")),
person("Michal", "Burdukiewicz",
email = "[email protected]",
comment = c(ORCID = "0000-0001-8926-582X"),
role = c("aut")),
person("Dominik", "Rafacz",
email = "[email protected]",
role = c("ctb")),
person("Krystyna", "Grzesiak",
email = "[email protected]",
role = c("ctb")))
Description: Functions for processing, analysis and visualization of Hydrogen Deuterium eXchange monitored by
Mass Spectrometry experiments (HDX-MS). 'HaDeX' <10.1093/bioinformatics/btaa587> introduces a new
standardized and reproducible workflow for the analysis of the HDX-MS data, including novel uncertainty
intervals. Additionally, it covers data exploration, quality control and generation of publication-quality
figures. All functionalities are also available in the in-built 'Shiny' app.
Depends: R (>= 3.0)
Authors@R: c(
person("Weronika", "Puchala", , "[email protected]", role = c("cre", "aut"),
comment = c(ORCID = "0000-0003-2163-1429")),
person("Michal", "Burdukiewicz", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0001-8926-582X")),
person("Dominik", "Rafacz", , "[email protected]", role = "ctb"),
person("Krystyna", "Grzesiak", , "[email protected]", role = "ctb")
)
Description: Functions for processing, analysis and visualization of
Hydrogen Deuterium eXchange monitored by Mass Spectrometry experiments
(HDX-MS). 'HaDeX' <10.1093/bioinformatics/btaa587> introduces a new
standardized and reproducible workflow for the analysis of the HDX-MS
data, including novel uncertainty intervals. Additionally, it covers
data exploration, quality control and generation of
publication-quality figures. All functionalities are also available in
the in-built 'Shiny' app.
License: GPL-3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.0
Depends:
R (>= 3.0)
Imports:
checkmate,
cowplot,
data.table,
dplyr,
DT,
ggplot2,
gsubfn,
latex2exp,
magick,
plyr,
reshape2,
readr,
readxl,
shiny,
stringr,
stringi,
tidyr
dplyr,
ggplot2,
grid,
HaDeXGUI,
httpuv,
magick,
plyr,
readr,
readxl,
remotes,
shiny,
stats,
stringi,
stringr,
tidyr,
tools,
utils
Suggests:
spelling,
covr,
digest,
gridExtra,
DT,
knitr,
pander,
renv,
magrittr,
rmarkdown,
shinycustomloader,
shinyhelper,
shinyjs,
spelling,
testthat,
vdiffr
VignetteBuilder: knitr
VignetteBuilder:
knitr
Encoding: UTF-8
Language: en-US
LazyData: true
RoxygenNote: 7.2.0
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(HaDeX_gui)
export(HaDeX_GUI)
export(HaDeXify)
export(add_stat_dependency)
export(calculate_MHP)
Expand Down Expand Up @@ -30,6 +30,7 @@ export(get_n_replicates)
export(get_peptide_sequence)
export(get_protein_coverage)
export(get_protein_redundancy)
export(install_GUI)
export(plot_amino_distribution)
export(plot_butterfly)
export(plot_chiclet)
Expand Down Expand Up @@ -150,6 +151,7 @@ importFrom(readr,parse_number)
importFrom(readr,read_csv)
importFrom(readr,read_tsv)
importFrom(readxl,read_excel)
importFrom(remotes,install_github)
importFrom(shiny,runApp)
importFrom(stats,qt)
importFrom(stringi,stri_count)
Expand Down
61 changes: 55 additions & 6 deletions R/HaDeX_gui.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,63 @@
#' Checks if GUI package is installed
#'
#' Indicates presence or absence of HaDeXGUI package.
#'
#' @return logical value indicating availability of GUI package
is_GUI_installed <- function()
length(find.package("HaDeXGUI", quiet = TRUE)) > 0

#' Installs GUI package from GitHub
#'
#' @importFrom remotes install_github
#' @export
install_GUI <- function()
remotes::install_github("hadexversum/HaDeXGUI")

handle_missing_GUI <- function() {
if (interactive()) {
response <- menu(
c("yes", "no"),
title = "To be able to run HaDeX Graphical User Interface, you have to have the 'HaDeXGUI' package installed. It is available via GitHub. Install?")
switch (
response,
yes = tryCatch(
install_GUI(),
finally = if (!is_GUI_installed()) {
warning("There was an error during an attempt to install 'HaDeXGUI' package.", call. = FALSE)
} else {
message("Package installed successfully. You can run the app now calling 'HaDeX_GUI()' once again.")
}
),
no = message("You cannot run the GUI without having installed 'HaDeXGUI'. You can do it by calling 'HaDeX::install_GUI()'."),
)
} else {
message("To be able to run HaDeX Graphical User Interface, you have to have the 'HaDeXGUI' package installed. You can do it by calling 'HaDeX::install_GUI()'.")
}
}

#' HaDeX Graphical User Interface
#'
#' @description Launches graphical user interface.
#' @description Launches graphical user interface from HaDeXGUI package. If the
#' GUI package is not installed, it asks user whether to install it
#'
#' @importFrom shiny runApp
#'
#' @param port The TCP port. See \code{\link[shiny]{runApp}}.
#' @param ... arguments to pass to \code{HaDeXGUI::run_app()}.
#' See \code{\link[HaDeXGUI]{run_app}}.
#' @param port number of port for the app to run on.
#' @param prod should the app run in production mode (TRUE) or development (FALSE)?
#'
#' @section Warning : Any ad-blocking software may cause malfunctions.
#'
#' @export HaDeX_gui

HaDeX_gui <- function(port = getOption("shiny.port"))
runApp(system.file("HaDeX", package = "HaDeX"), port = port)
#' @export
HaDeX_GUI <- function(port = httpuv::randomPort(), prod = TRUE, ...) {
if (is_GUI_installed()) {
opts <- options()
on.exit(options(opts))
options(
shiny.port = port,
golem.app.prod = prod
)
HaDeXGUI::run_app(options = options, ...)
} else handle_missing_GUI()
}
Binary file removed inst/HaDeX/HaDeX.png
Binary file not shown.
54 changes: 0 additions & 54 deletions inst/HaDeX/custom-elements.R

This file was deleted.

98 changes: 0 additions & 98 deletions inst/HaDeX/data-work.R

This file was deleted.

Loading