Skip to content

Commit

Permalink
[UPD] - change app name from QFeaturesImport to importQFeatures
Browse files Browse the repository at this point in the history
  • Loading branch information
leopoldguyot committed Jul 15, 2024
1 parent 582ae2c commit 8d27dfc
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 39 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Version: 0.1.1
Date: 2024-04-23
Authors@R:
person(given = "Léopold", family = "Guyot", email = "[email protected]", role = c("aut", "cre"))
Description: "QFeaturesGUI is a suite of shiny apps that serve as graphical interfaces for the QFeatures package. Currently, the package contains the following shiny apps: 'QFeaturesImport'."
Description: "QFeaturesGUI is a suite of shiny apps that serve as graphical interfaces for the QFeatures package. Currently, the package contains the following shiny apps: 'importQFeatures'."
biocViews: Software, ShinyApps, GUI, Proteomics
URL: https://uclouvain-cbio.github.io/QFeaturesGUI/, https://github.com/UCLouvain-CBIO/QFeaturesGUI
BugReports: https://github.com/UCLouvain-CBIO/QFeaturesGUI/issues
Expand Down
2 changes: 1 addition & 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(QFeaturesImport)
export(importQFeatures)
importFrom(DT,dataTableOutput)
importFrom(DT,datatable)
importFrom(DT,renderDataTable)
Expand Down
8 changes: 4 additions & 4 deletions R/QFeaturesImport.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @title A shiny app to import QFeatures objects, some optional pre-processing steps.
#'
#' @description QFeaturesImport is a simple graphical interface to import bulk and single-cell proteomic data.
#' @description importQFeatures is a simple graphical interface to import bulk and single-cell proteomic data.
#' The app use the \code{\link[QFeatures]{readQFeatures}} function from the QFeatures package to convert simple table (single or multiple, csv or tsv) to a QFeatures object.
#' The app is divided into mutliple sections:
#' \itemize{
Expand All @@ -10,7 +10,7 @@
#' @param sample_table A dataframe that contains the sample table.
#' @param input_table A dataframe that contains the input table.
#'
#' @return Return the "QFeaturesImport" shiny app object.
#' @return Return the "importQFeatures" shiny app object.
#' @export
#' @importFrom shiny shinyApp runApp
#'
Expand All @@ -19,13 +19,13 @@
#'
#' data("sampleTable")
#' data("inputTable")
#' app <- QFeaturesImport(sample_table = sampleTable, input_table = inputTable)
#' app <- importQFeatures(sample_table = sampleTable, input_table = inputTable)
#'
#' if (interactive()) {
#' shiny::runApp(app)
#' }
#'
QFeaturesImport <- function(sample_table = NULL, input_table = NULL) {
importQFeatures <- function(sample_table = NULL, input_table = NULL) {
ui <- build_ui()
server <- build_server(sample_table, input_table)
shinyApp(ui = ui, server = server)
Expand Down
2 changes: 1 addition & 1 deletion R/build_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build_ui <- function() {
includeCSS(system.file(package = "QFeaturesGUI", "www", "style.css")),
uiOutput("all_tabs")
),
title = "QFeaturesImport"
title = "importQFeatures"
)

return(ui)
Expand Down
4 changes: 2 additions & 2 deletions R/interface_header.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' ui header builder
#'
#' @return the dashboardHeader object for the QFeaturesImport app.
#' @return the dashboardHeader object for the importQFeatures app.
#' @rdname INTERNAL_interface_header
#' @keywords internal
#'
Expand All @@ -9,7 +9,7 @@
#'
header <- function() {
dashboardHeader(
title = "QFeaturesImport",
title = "importQFeatures",
dropdownMenuOutput("exception_menu")
)
}
27 changes: 27 additions & 0 deletions R/utils_global.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,33 @@ loading <- function(msg) {
))
}


#' Will convert a qfeatures object to a summary data.frame object
#'
#' @param qfeatures a qfeatures object
#'
#' @return a data.frame object
#' @rdname INTERNAL_qfeatures_to_df
#' @keywords internal
#'
qfeatures_to_df <- function(qfeatures) {
df <- data.frame(
"Name" = rep.int(0, length(qfeatures)),
"Class" = rep.int(0, length(qfeatures)),
"nrows" = rep.int(0, length(qfeatures)),
"ncols" = rep.int(0, length(qfeatures))
)
for (i in seq_along(qfeatures)) {
df[i, "Name"] <- remove_QFeaturesGUI(names(qfeatures)[[i]])
df[i, "Class"] <- class(qfeatures[[i]])[[1]]
df[i, "nrows"] <- nrow(qfeatures[[i]])[[1]]
df[i, "ncols"] <- ncol(qfeatures[[i]])[[1]]
}

df
}


#' A function that remove the "(QFeaturesGUI#x)" suffix from a string
#' @param string `str` string to remove the suffix from
#' @return `str` the string without the suffix
Expand Down
24 changes: 0 additions & 24 deletions R/utils_import_tab.R

This file was deleted.

12 changes: 6 additions & 6 deletions man/QFeaturesImport.Rd → man/importQFeatures.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d27dfc

Please sign in to comment.