diff --git a/R/change_data_format_to_longer.R b/R/change_data_format_to_longer.R index ab13c54b8f98c9ead6fd16adcd26d2b61433de6d..dbf103c610670f3dcdd6075e06772116ec31a081 100644 --- a/R/change_data_format_to_longer.R +++ b/R/change_data_format_to_longer.R @@ -43,12 +43,8 @@ change_data_format_to_longer <- function(.data, if (length(col_names_of_markers) < 1) stop(paste0("Failed to find pattern: ", pattern_column_markers, " in the columnames")) - # if (!all(additional_columns_to_use %in% colnames(.data))) stop(paste0('One or more of the following columnames: - # c(Treatment", "PID", "Image_number", "Tissue", "Concentration", "DOC") could not be found. - # Please check the names of your data.frame and/or provide your selection'), - # "Those are the colnames found in the input data: ", - # colnames(.data)) if (!"Image_number" %in% additional_columns_to_use) stop("Image_number has to be in the dataframe.") + if (!"Treatment_complete" %in% additional_columns_to_use) stop("Treatment_complete has to be in the dataframe.") diff --git a/R/get_QC_plots_and_stats.R b/R/get_QC_plots_and_stats.R index 7872515943dbff57c0f35e1bddc24f63b28acef1..f70b173e3ee1c7174da997c01651dfa36fcfda63 100644 --- a/R/get_QC_plots_and_stats.R +++ b/R/get_QC_plots_and_stats.R @@ -59,7 +59,6 @@ get_QC_plots_parsed_merged_data <- function(.data, subset_data <- .data[.data[[PID_column_name]] == pid, ] for (i in list_of_columns_to_plot) { - # if (!isolate_specific_drug %in% subset_data[[drug_column_name]] |> unique()) stop("ERROR: The `isolate_specific_drug` is not included in the name of the availble treaments.") if (!is.null(isolate_specific_drug)) subset_data <- subset_data[subset_data[[drug_column_name]] %in% isolate_specific_drug, ] if (nrow(subset_data) < 1) { @@ -108,7 +107,8 @@ get_QC_plots_parsed_merged_data <- function(.data, if (save_plots) { if (save_plots_in_patient_specific_subfolders) { - if (!dir.exists(paste0(saving_plots_folder, "/", pid))) dir.create(paste0(saving_plots_folder, "/", pid)) + + if (!dir.exists(paste0(saving_plots_folder, "/", pid))) dir.create(paste0(saving_plots_folder, "/", pid), showWarnings = F, recursive = T) ggsave( plot = p, filename = paste0( @@ -128,7 +128,7 @@ get_QC_plots_parsed_merged_data <- function(.data, ) } else { # Saving plots in .pdf at 600 dpi - if (!dir.exists(saving_plots_folder)) dir.create(saving_plots_folder) + if (!dir.exists(saving_plots_folder)) dir.create(saving_plots_folder, showWarnings = F, recursive = T) ggsave( plot = p, width = p_width, diff --git a/README.md b/README.md index 837bb55a605aaadeb7931bfb93d6cddbaa35aa52..cc7841ff4f1d53feaafb8ec30e8fd5f567385542 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,20 @@  # Overview -DRUGSENS is a R-package tha allow users to automatically analyze QuPath™ output data from imaging analysis. -Here we include a QuPath™ script to run reproducible QuPath™-based image analysis, and some examples on how DRUGSENS can be used. For more detailed examples of QuPath™ scripting please refer to [QuPath™'s Documentation](https://qupath.readthedocs.io/en/stable/). -This script should be placed into scripts within QuPath™. We tested this code to a previous version of QuPath&trade. -This packge is complementary to the STAR protocol: `...` + +DRUGSENS is a R-package that allows users to automatically analyze QuPath™'s output data from imaging analysis. +Here we include a QuPath™ script (the same that we regularly use) to run reproducible QuPath™-based image analysis, and some examples on how DRUGSENS can be used. For more detailed examples of QuPath™ scripting and usage please refer to [QuPath™'s Documentation](https://qupath.readthedocs.io/en/stable/). +This script should be placed into scripts manager within QuPath™. We tested this code with previous versions of QuPath™, but new versions should also be compatible. +This package is complementary to the STAR protocol: `...` # Installation ``` r -devtools::install_gitlab("https://git.scicore.unibas.ch/ovca-research/drugsens") +devtools::install_git("https://git.scicore.unibas.ch/ovca-research/drugsens") + # OR -devtools::install_github("https://github.com/flalom/drugsens") # this is the mirroring repo of the gitlab + +devtools::install_github("https://github.com/flalom/drugsens") # this is the GitLab's mirroring repo ``` `devtools` is required to install DRUGSENS. If `devtools` is not installed yet you can install it with: @@ -313,4 +316,4 @@ Renv will automatically activate and install the necessary packages as specified ### Reporting Issues If you encounter any bugs or have suggestions for improvements, please file an issue using our [GitLab Issue]("https://git.scicore.unibas.ch/ovca-research/DRUGSENS/issues"). Be sure to include as much information as possible to help us understand and address the issue. -Please make sure to file the issue in gitlab as the GitHub is a mirror repo. +Please make sure to file the issue in the GitLab repo as this one in GitHub is a forward-only mirror repo.