diff --git a/DESCRIPTION b/DESCRIPTION index 9c045b5f1535b0b64349bad79910994f1f3728d3..de1cc47ca88da1aecff1e86bbbdc1d0406d43eba 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,11 @@ Package: drugsens Title: Automated Analysis of 'QuPath' Output Data and Metadata Extraction -Description: A comprehensive toolkit for analyzing microscopy data output from - 'QuPath' software. Provides functionality for automated data processing, - metadata extraction, and statistical analysis of imaging results. - Designed to complement the STAR Protocol Protocol for quantifying drug - sensitivity in 3D patient-derived ovarian cancer models - <doi:10.1016/j.xpro.2024.103274>. +Description: A comprehensive toolkit for analyzing microscopy data output from 'QuPath' software. + Provides functionality for automated data processing, metadata extraction, and statistical + analysis of imaging results. The methodology implemented in this package is based on + Labrosse et al. (2024) <doi:10.1016/j.xpro.2024.103274> "Protocol for quantifying drug + sensitivity in 3D patient-derived ovarian cancer models", which describes the complete + workflow for drug sensitivity analysis in patient-derived cancer models. Version: 0.1.0 BugReports: https://git.scicore.unibas.ch/ovca-research/drugsens/-/issues SystemRequirements: QuPathâ„¢ 4.0.0 or higher diff --git a/NAMESPACE b/NAMESPACE index 579ce919190dadbb2de1942c37ce0ae6ab18df53..1bec287b8e48a624996bca6aaa64e8b52d92607d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,6 +7,7 @@ export(get_QC_plots) export(get_QC_plots_parsed_merged_data) export(make_count_dataframe) export(make_run_config) +export(string_parsing) import(ggplot2) import(ggpubr) import(knitr) diff --git a/R/get_QC_plots_and_stats.R b/R/get_QC_plots_and_stats.R index 55719301decb751a1c99dbc3cc5ebf9f5544c2a7..4daf74c4c6a2ac93dd9dd24347405dd2329f85e5 100644 --- a/R/get_QC_plots_and_stats.R +++ b/R/get_QC_plots_and_stats.R @@ -24,7 +24,7 @@ #' @examples #' \dontrun{ #' qc <- get_QC_plots_parsed_merged_data(bind_data, save_plots = TRUE, -#' save_list_of_plots = TRUE) +#' save_list_of_plots = FALSE) #' } #' @export @@ -64,8 +64,8 @@ get_QC_plots_parsed_merged_data <- function(.data, if (!is.null(isolate_specific_drug)) subset_data <- subset_data[subset_data[[drug_column_name]] %in% isolate_specific_drug, ] if (nrow(subset_data) < 1) { - print(unique(subset_data[[PID_column_name]])) - print(unique(subset_data[[drug_column_name]])) + message(unique(subset_data[[PID_column_name]])) + message(unique(subset_data[[drug_column_name]])) stop("ERROR: Your filtering query has returned no observations") } diff --git a/R/parsers.R b/R/parsers.R index bc0153f8e4d2c059854c66fff23e8ee60768cfd3..034cac0ec7c921aa9c13bb3032273755da56eb10 100644 --- a/R/parsers.R +++ b/R/parsers.R @@ -8,11 +8,12 @@ #' @importFrom stringr str_count #' @return A `dataframe`/`tibble`. #' @param .data dataframe with parsed metadata +#' @export #' @examples #' input_data <- data.frame( #' Image = "B516_Ascites_2023-11-25_DOC2020-12-14_dmso_rep_Ecad_cCasp3_(series 01).tif" #' ) -#' test <- drugsens:::string_parsing(input_data) +#' test <- drugsens::string_parsing(input_data) #' \dontrun{ #' data.parsed <- string_parsing(.data) #' } diff --git a/man/get_QC_plots_parsed_merged_data.Rd b/man/get_QC_plots_parsed_merged_data.Rd index 221cc7ebc3b0a5e14b4ddd6e82a8a27f17132047..de2b2e59456f854836d974661dd327f540b712f0 100644 --- a/man/get_QC_plots_parsed_merged_data.Rd +++ b/man/get_QC_plots_parsed_merged_data.Rd @@ -56,6 +56,6 @@ This plot can show trends within the dataset and run some basic statistics. \examples{ \dontrun{ qc <- get_QC_plots_parsed_merged_data(bind_data, save_plots = TRUE, - save_list_of_plots = TRUE) + save_list_of_plots = FALSE) } } diff --git a/man/string_parsing.Rd b/man/string_parsing.Rd index e6b8843a3ce9e4db1e0a479153d663c645bcc800..1317c7378cc70d3dc95cac42faf674ef9f6793f8 100644 --- a/man/string_parsing.Rd +++ b/man/string_parsing.Rd @@ -20,7 +20,7 @@ The metadata will be then associated to the count file as well input_data <- data.frame( Image = "B516_Ascites_2023-11-25_DOC2020-12-14_dmso_rep_Ecad_cCasp3_(series 01).tif" ) -test <- drugsens:::string_parsing(input_data) +test <- drugsens::string_parsing(input_data) \dontrun{ data.parsed <- string_parsing(.data) } diff --git a/tests/testthat/test_cases.R b/tests/testthat/test_cases.R index bb105ab40b659ca354c4b7d91dac2b4bfff1667e..fbd7cf5187f8e75e49b7beddbac83d685dcd01d9 100644 --- a/tests/testthat/test_cases.R +++ b/tests/testthat/test_cases.R @@ -82,7 +82,7 @@ test_that("The parsing is working", { ConcentrationUnits1 = "uM", ConcentrationUnits2 = "nm", Treatment_complete = "TreatmentRana10uM-15nm") - expect_equal(drugsens:::string_parsing(input_data), expected = expected_output) + expect_equal(drugsens::string_parsing(input_data), expected = expected_output) }) test_that("Another parsing test", { @@ -101,7 +101,7 @@ test_that("Another parsing test", { ConcentrationUnits1 = NA_character_, ConcentrationUnits2 = NA_character_, Treatment_complete = "dmso") - expect_equal(drugsens:::string_parsing(input_data), expected = expected_output) + expect_equal(drugsens::string_parsing(input_data), expected = expected_output) # Image1 <- "B516_Ascites_2023-11-25_DOC2020-12-14_CarboplatinPaclitaxel_100_uM_10_nM_Ecad_cCasp3_(series 01).tif" # Image2 <- "A8759_Spleen_2020.11.10_DOC2001.10.05_compoundX34542_1000_uM_EpCAM_Ecad_cCasp3_(series 01).tif" # Image3 <- "A8759_Spleen_2020.11.10_DOC2001.10.05_compoundX34542_1000_uM_EpCAM_Ecad_cCasp3_(series 01).tif"