From 852cd93b87a6d6abbda6639904edcd9eac43f29f Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Fri, 6 Dec 2024 09:14:40 -0500 Subject: [PATCH 01/26] bump dev branch --- DESCRIPTION | 4 ++-- NEWS.md | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a17e09d54..3f8cf27c6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: scCustomize Type: Package Title: Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing Description: Collection of functions created and/or curated to aid in the visualization and analysis of single-cell data using 'R'. 'scCustomize' aims to provide 1) Customized visualizations for aid in ease of use and to create more aesthetic and functional visuals. 2) Improve speed/reproducibility of common tasks/pieces of code in scRNA-seq analysis with a single or group of functions. For citation please use: Marsh SE (2021) "Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing" RRID:SCR_024675. -Version: 3.0.0 -Date: 2024-12-05 +Version: 3.0.0.0001 +Date: 2024-12-06 Authors@R: c( person(given = "Samuel", family = "Marsh", email = "samuel.marsh@childrens.harvard.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3012-6945")), person(given = "Ming", family = "Tang", role = c("ctb"), email = "tangming2005@gmail.com"), diff --git a/NEWS.md b/NEWS.md index 4e728b13a..0fbcb4c33 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,16 @@ +# scCustomize 3.X.X (202X-XX-XX) +## Added + + +## Changed + + +## Fixes + + + + + # scCustomize 3.0.0 (2024-12-05) ## Added **Major Updates to Functionality with rliger Package:** From cd9b0a2ee2fdd14fc7a4cce6dc533b4072a304a0 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 07:42:05 -0500 Subject: [PATCH 02/26] fix random downsample --- R/Object_Utilities.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/Object_Utilities.R b/R/Object_Utilities.R index ae41db644..656373578 100644 --- a/R/Object_Utilities.R +++ b/R/Object_Utilities.R @@ -474,7 +474,7 @@ Fetch_Meta.Seurat <- function( #' @param num_cells number of cells per ident to use in down-sampling. This value must be less than or #' equal to the size of ident with fewest cells. Alternatively, can set to "min" which will #' use the maximum number of barcodes based on size of smallest group. -#' @param group.by The ident to use to group cells. Default is "ident" which use current active.ident. . +#' @param group.by The ident to use to group cells. Default is NULL which use current active.ident. . #' @param return_list logical, whether or not to return the results as list instead of vector, default is #' FALSE. #' @param allow_lower logical, if number of cells in identity is lower than `num_cells` keep the @@ -513,7 +513,7 @@ Fetch_Meta.Seurat <- function( Random_Cells_Downsample <- function( seurat_object, num_cells, - group.by = "ident", + group.by = NULL, return_list = FALSE, allow_lower = FALSE, seed = 123 @@ -522,7 +522,7 @@ Random_Cells_Downsample <- function( Is_Seurat(seurat_object = seurat_object) # set ident in case of NULL - group.by <- "ident" %||% group.by + group.by <- group.by %||% "ident" # Check and set idents if not "ident" if (group.by != "ident") { @@ -536,7 +536,7 @@ Random_Cells_Downsample <- function( rownames_to_column("barcodes") # get unique ident vector - idents_all <- as.character(levels(x = Idents(object = seurat_object))) + idents_all <- as.character(x = levels(x = Idents(object = seurat_object))) # Find minimum length ident and warn if num_cells not equal or lower min_cells <- CellsByIdentities(object = seurat_object) @@ -574,7 +574,7 @@ Random_Cells_Downsample <- function( # set seed and select random cells per ident set.seed(seed = seed) - random_cells <- lapply(1:length(idents_all), function(x) { + random_cells <- lapply(1:length(x = idents_all), function(x) { clus_barcodes <- cluster_barcodes %>% filter(.data[["ident"]] == idents_all[x]) %>% column_to_rownames("barcodes") %>% From ca384b17fb83c8e12ee87dfe9b6c7cffc30c0d87 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 07:42:40 -0500 Subject: [PATCH 03/26] update docs --- man/Random_Cells_Downsample.Rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/Random_Cells_Downsample.Rd b/man/Random_Cells_Downsample.Rd index 66a452a2c..0ef6d28ea 100644 --- a/man/Random_Cells_Downsample.Rd +++ b/man/Random_Cells_Downsample.Rd @@ -7,7 +7,7 @@ Random_Cells_Downsample( seurat_object, num_cells, - group.by = "ident", + group.by = NULL, return_list = FALSE, allow_lower = FALSE, seed = 123 @@ -20,7 +20,7 @@ Random_Cells_Downsample( equal to the size of ident with fewest cells. Alternatively, can set to "min" which will use the maximum number of barcodes based on size of smallest group.} -\item{group.by}{The ident to use to group cells. Default is "ident" which use current active.ident. .} +\item{group.by}{The ident to use to group cells. Default is NULL which use current active.ident. .} \item{return_list}{logical, whether or not to return the results as list instead of vector, default is FALSE.} From 6608196bcbd6719effdb8ee4aa407f1dd890220b Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 07:42:50 -0500 Subject: [PATCH 04/26] Update changelog --- NEWS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 5e979b246..822711dec 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# scCustomize 3.X.X (202X-XX-XX) +# scCustomize 3.0.1 (2024-12-11) ## Added @@ -6,7 +6,7 @@ ## Fixes - +- Fixed bug in `Random_Cells_Downsample` that prevented setting identity using the `group.by` parameter. From d36a516316a3bf49789ac31f22cdfa8c614a6445 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 07:42:58 -0500 Subject: [PATCH 05/26] Update cran comments --- cran-comments.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 29a557aca..81a17352d 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,5 @@ -## Major Update -This is major update to version 3.0.0. See News.md for full changelog. +## Hotfix Update +This is major update to version 3.0.1. Fixes bug preventing a function from operating correctly. See News.md for full changelog. From d271f9471f32a3d56072c7637635615f0375ef72 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 07:43:04 -0500 Subject: [PATCH 06/26] bump version and date --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3f8cf27c6..8c0a16ec9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: scCustomize Type: Package Title: Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing Description: Collection of functions created and/or curated to aid in the visualization and analysis of single-cell data using 'R'. 'scCustomize' aims to provide 1) Customized visualizations for aid in ease of use and to create more aesthetic and functional visuals. 2) Improve speed/reproducibility of common tasks/pieces of code in scRNA-seq analysis with a single or group of functions. For citation please use: Marsh SE (2021) "Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing" RRID:SCR_024675. -Version: 3.0.0.0001 -Date: 2024-12-06 +Version: 3.0.1 +Date: 2024-12-11 Authors@R: c( person(given = "Samuel", family = "Marsh", email = "samuel.marsh@childrens.harvard.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3012-6945")), person(given = "Ming", family = "Tang", role = c("ctb"), email = "tangming2005@gmail.com"), From a70d0646f642ee1aad6db482a4c7b822ddf2bcdf Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 15:47:19 -0500 Subject: [PATCH 07/26] fix reduction not setting properly --- R/Plotting_Seurat.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/R/Plotting_Seurat.R b/R/Plotting_Seurat.R index 9b4c8d7e9..557a2b38b 100644 --- a/R/Plotting_Seurat.R +++ b/R/Plotting_Seurat.R @@ -1688,6 +1688,7 @@ Cell_Highlight_Plot <- function( split.by = split.by, split_seurat = split_seurat, label = label, + reduction = reduction, ...) # Edit plot legend @@ -1710,9 +1711,6 @@ Cell_Highlight_Plot <- function( } - - - #' DimPlot with modified default settings #' #' Creates DimPlot with some of the settings modified from their Seurat defaults (colors_use, shuffle, label). From 78b6d2436b0653d5500b30e4fedae1cc2b61ea32 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 15:50:29 -0500 Subject: [PATCH 08/26] Update changelog --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 822711dec..95cdf0a3d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ ## Fixes - Fixed bug in `Random_Cells_Downsample` that prevented setting identity using the `group.by` parameter. +- Fixed bug in `Cell_Highlight_Plot` that didn't pass the reduction parameter properly ([#216](https://github.com/samuel-marsh/scCustomize/issues/216)). From eb580b470d9dac3a932cf30aa0b55b53ebdbba8a Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 15:51:32 -0500 Subject: [PATCH 09/26] fix IEG gene list retrieval --- R/Internal_Utilities.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/Internal_Utilities.R b/R/Internal_Utilities.R index 7de8332fd..e965973a6 100644 --- a/R/Internal_Utilities.R +++ b/R/Internal_Utilities.R @@ -827,7 +827,7 @@ Retrieve_IEG_Ensembl_Lists <- function( # pull lists qc_gene_list <- list( - ieg = ieg_gene_list[[ieg]] + ieg = ensembl_ieg_list[[ieg]] ) return(qc_gene_list) From dbfd77422eb7063838bf4f96eef003540f548ac2 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 11 Dec 2024 15:52:02 -0500 Subject: [PATCH 10/26] Update changelog --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 95cdf0a3d..f8d77a9a3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,6 +8,7 @@ ## Fixes - Fixed bug in `Random_Cells_Downsample` that prevented setting identity using the `group.by` parameter. - Fixed bug in `Cell_Highlight_Plot` that didn't pass the reduction parameter properly ([#216](https://github.com/samuel-marsh/scCustomize/issues/216)). +- Fixed bug when retrieving ensembl IDs for IEGs. From 9c24b3b29a75fa3914a63c015e0beaa5e0e717c8 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 08:10:41 -0500 Subject: [PATCH 11/26] allow return plots without error --- R/Plotting_Seurat_Iterative.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/Plotting_Seurat_Iterative.R b/R/Plotting_Seurat_Iterative.R index 0f20ee6b6..c4e4f025d 100644 --- a/R/Plotting_Seurat_Iterative.R +++ b/R/Plotting_Seurat_Iterative.R @@ -969,12 +969,13 @@ Iterate_FeaturePlot_scCustom <- function( # Check file_type parameter file_type_options <- c(".pdf", ".png", ".tiff", ".jpeg", ".svg") - if (is.null(x = file_type)) { + if (is.null(x = file_type) && isFALSE(x = return_plots)) { cli_abort(message = c("{.code file_type} not specified.", "*" = "Must specify output file type format from the following:", "i" = "{.field {glue_collapse_scCustom(input_string = file_type_options, and = TRUE)}}")) } - if (!file_type %in% file_type_options) { + + if (!file_type %in% file_type_options && isFALSE(x = return_plots)) { cli_abort(message = "{.code file_type} must be one of the following: {.field {glue_collapse_scCustom(input_string = file_type_options, and = TRUE)}}") } From d3453c7ba703a270a6c9a4653a970e16c9302cc2 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 08:38:38 -0500 Subject: [PATCH 12/26] edit section title --- R/Internal_Utilities.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/Internal_Utilities.R b/R/Internal_Utilities.R index e965973a6..5f4a028a8 100644 --- a/R/Internal_Utilities.R +++ b/R/Internal_Utilities.R @@ -189,7 +189,7 @@ Assay5_Check <- function( #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -#################### WARN/ERROR MESSAGING #################### +#################### FUNCTION HELPERS #################### #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From d001ea787452cfd89c56f1093e613c753075d2ee Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 08:39:04 -0500 Subject: [PATCH 13/26] update height/width param for pdf() calls --- R/Plotting_Seurat_Iterative.R | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/R/Plotting_Seurat_Iterative.R b/R/Plotting_Seurat_Iterative.R index c4e4f025d..3b0682f19 100644 --- a/R/Plotting_Seurat_Iterative.R +++ b/R/Plotting_Seurat_Iterative.R @@ -146,6 +146,8 @@ Iterate_DimPlot_bySample <- function( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, color = "black", no_legend = TRUE, @@ -272,7 +274,7 @@ Iterate_DimPlot_bySample <- function( } }) cli_inform(message = "{.field Saving plots to file}") - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]]) @@ -383,6 +385,8 @@ Iterate_Cluster_Highlight_Plot <- function( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, raster = NULL, ... @@ -468,7 +472,7 @@ Iterate_Cluster_Highlight_Plot <- function( ...)) }) cli_inform(message = "{.field Saving plots to file}") - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]]) @@ -583,6 +587,8 @@ Iterate_Meta_Highlight_Plot <- function( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, raster = NULL, ... @@ -735,7 +741,7 @@ Iterate_Meta_Highlight_Plot <- function( }) cli_inform(message = "{.field Saving plots to file}") - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]]) @@ -888,6 +894,8 @@ Iterate_FeaturePlot_scCustom <- function( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, features_per_page = 1, num_columns = NULL, landscape = TRUE, @@ -1016,7 +1024,7 @@ Iterate_FeaturePlot_scCustom <- function( cli_inform(message = "{.field Saving plots to file}") # save plots with cluster annotation if (!is.null(x = names(x = all_found_features)) && is.null(x = split.by)) { - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]] + ggtitle((paste0(all_found_features[i], "_", names(x = all_found_features)[i])))) @@ -1026,7 +1034,7 @@ Iterate_FeaturePlot_scCustom <- function( dev.off() } else { # Save plots without cluster annotation - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]]) @@ -1227,6 +1235,8 @@ Iterate_VlnPlot_scCustom <- function( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, raster = NULL, dpi = 600, ggplot_default_colors = FALSE, @@ -1320,7 +1330,7 @@ Iterate_VlnPlot_scCustom <- function( pboptions(char = "=") all_plots <- pblapply(all_found_features,function(gene) {VlnPlot_scCustom(seurat_object = seurat_object, features = gene, colors_use = colors_use, pt.size = pt.size, group.by = group.by, raster = raster, ggplot_default_colors = ggplot_default_colors, color_seed = color_seed, split.by = split.by, ...)}) cli_inform(message = "{.field Saving plots to file}") - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]]) @@ -1406,6 +1416,8 @@ Iterate_Plot_Density_Custom <- function( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, reduction = NULL, combine = TRUE, @@ -1499,7 +1511,7 @@ Iterate_Plot_Density_Custom <- function( cli_inform(message = "{.field Saving plots to file}") # save plots with cluster annotation if (!is.null(x = names(x = gene_list))) { - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]] + ggtitle((paste0(gene_list[i], "_", names(x = gene_list)[i])))) @@ -1509,7 +1521,7 @@ Iterate_Plot_Density_Custom <- function( dev.off() } else { # Save plots without cluster annotation - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]]) @@ -1607,6 +1619,8 @@ Iterate_Plot_Density_Joint <- function( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, reduction = NULL, combine = TRUE, @@ -1725,7 +1739,7 @@ Iterate_Plot_Density_Joint <- function( cli_inform(message = "{.field Saving plots to file}") # save plots with cluster annotation if (!is.null(x = names(x = final_gene_list))) { - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]] + ggtitle((paste0(paste(final_gene_list[[i]], collapse = "_"), "_", names(x = final_gene_list)[i])))) @@ -1735,7 +1749,7 @@ Iterate_Plot_Density_Joint <- function( dev.off() } else { # Save plots without cluster annotation - pdf(paste(file_path, file_name, file_type, sep="")) + pdf(paste(file_path, file_name, file_type, sep=""), width = output_width, height = output_height) pb <- txtProgressBar(min = 0, max = length(all_plots), style = 3, file = stderr()) for (i in 1:length(all_plots)) { print(all_plots[[i]]) From 43a8bb897fc79ea21d8ec62a9b31a7d22215764a Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 08:48:59 -0500 Subject: [PATCH 14/26] reorg and add replace_null internal function --- R/Internal_Utilities.R | 153 ++++++++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 62 deletions(-) diff --git a/R/Internal_Utilities.R b/R/Internal_Utilities.R index 5f4a028a8..63d51e772 100644 --- a/R/Internal_Utilities.R +++ b/R/Internal_Utilities.R @@ -47,7 +47,7 @@ #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -#################### Object Checks #################### +#################### Object/Feature Checks #################### #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -188,8 +188,68 @@ Assay5_Check <- function( } +#' Perform Feature and Meta Checks before plotting +#' +#' Wraps the `Feature_Present`, `Meta_Present`, `Reduction_Loading_Present`, and `Case_Check` into +#' single function to perform feature checks before plotting. +#' +#' @param object Seurat object +#' @param features vector of features and/or meta data variables to plot. +#' @param assay Assay to use (default all assays present). +#' +#' @return vector of features and/or meta data that were found in object. +#' +#' @noRd +#' +#' @keywords internal +#' + +Feature_PreCheck <- function( + object, + features, + assay = NULL +) { + # set assay (if null set to active assay) + assay <- assay %||% Assays(object = object) + + # Check features and meta to determine which features present + features_list <- Feature_Present(data = object, features = features, omit_warn = FALSE, print_msg = FALSE, case_check_msg = FALSE, return_none = TRUE, seurat_assay = assay) + + meta_list <- Meta_Present(object = object, meta_col_names = features_list[[2]], omit_warn = FALSE, print_msg = FALSE, return_none = TRUE) + + reduction_list <- Reduction_Loading_Present(seurat_object = object, reduction_names = meta_list[[2]], omit_warn = FALSE, print_msg = FALSE, return_none = TRUE) + + all_not_found_features <- reduction_list[[2]] + + all_found_features <- c(features_list[[1]], meta_list[[1]], reduction_list[[1]]) + + # Stop if no features found + if (length(x = all_found_features) < 1) { + cli_abort(message = c("No features were found.", + "*" = "The following are not present in object:", + "i" = "{.field {glue_collapse_scCustom(input_string = all_not_found_features, and = TRUE)}}") + ) + } + + # Return message of features not found + if (length(x = all_not_found_features) > 0) { + op <- options(warn = 1) + on.exit(options(op)) + cli_warn(message = c("The following features were omitted as they were not found:", + "i" = "{.field {glue_collapse_scCustom(input_string = all_not_found_features, and = TRUE)}}") + ) + } + + # Check feature case and message if found + Case_Check(seurat_object = object, gene_list = all_not_found_features, case_check_msg = TRUE, return_features = FALSE) + + # return all found features + return(all_found_features) +} + + #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -#################### FUNCTION HELPERS #################### +#################### FUNCTION HELPERS #################### #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -250,66 +310,6 @@ glue_collapse_scCustom <- function( } -#' Perform Feature and Meta Checks before plotting -#' -#' Wraps the `Feature_Present`, `Meta_Present`, `Reduction_Loading_Present`, and `Case_Check` into -#' single function to perform feature checks before plotting. -#' -#' @param object Seurat object -#' @param features vector of features and/or meta data variables to plot. -#' @param assay Assay to use (default all assays present). -#' -#' @return vector of features and/or meta data that were found in object. -#' -#' @noRd -#' -#' @keywords internal -#' - -Feature_PreCheck <- function( - object, - features, - assay = NULL -) { - # set assay (if null set to active assay) - assay <- assay %||% Assays(object = object) - - # Check features and meta to determine which features present - features_list <- Feature_Present(data = object, features = features, omit_warn = FALSE, print_msg = FALSE, case_check_msg = FALSE, return_none = TRUE, seurat_assay = assay) - - meta_list <- Meta_Present(object = object, meta_col_names = features_list[[2]], omit_warn = FALSE, print_msg = FALSE, return_none = TRUE) - - reduction_list <- Reduction_Loading_Present(seurat_object = object, reduction_names = meta_list[[2]], omit_warn = FALSE, print_msg = FALSE, return_none = TRUE) - - all_not_found_features <- reduction_list[[2]] - - all_found_features <- c(features_list[[1]], meta_list[[1]], reduction_list[[1]]) - - # Stop if no features found - if (length(x = all_found_features) < 1) { - cli_abort(message = c("No features were found.", - "*" = "The following are not present in object:", - "i" = "{.field {glue_collapse_scCustom(input_string = all_not_found_features, and = TRUE)}}") - ) - } - - # Return message of features not found - if (length(x = all_not_found_features) > 0) { - op <- options(warn = 1) - on.exit(options(op)) - cli_warn(message = c("The following features were omitted as they were not found:", - "i" = "{.field {glue_collapse_scCustom(input_string = all_not_found_features, and = TRUE)}}") - ) - } - - # Check feature case and message if found - Case_Check(seurat_object = object, gene_list = all_not_found_features, case_check_msg = TRUE, return_features = FALSE) - - # return all found features - return(all_found_features) -} - - #' Ask yes/no question to proceed #' #' Asks the user to answer yes/no question and returns logical value depending on @@ -337,6 +337,35 @@ yesno <- function(msg, .envir = parent.frame()) { } +#' Change function parameter value from NULL to NA +#' +#' Provides method to change parameter value dynamically within function to suit defaults of other functions. +#' Used in iterative plotting functions. +#' +#' @return if NULL returns NA otherwise returns input value. +#' +#' +#' @import cli +#' +#' @noRd +#' + +replace_null <- function( + parameter +) { + # check length + if (length(x = parameter) > 1) { + cli_abort(message = "{.code parameter} must be single value.") + } + + # check NULL and swap NA + if (is.null(x = parameter)) { + parameter <- NA + } + return(parameter) +} + + #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #################### QC HELPERS #################### #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From cccf3b07f1951eb095090aa7daae36569093d6f2 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 08:50:34 -0500 Subject: [PATCH 15/26] update documentation --- R/Internal_Utilities.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/Internal_Utilities.R b/R/Internal_Utilities.R index 63d51e772..bf205989c 100644 --- a/R/Internal_Utilities.R +++ b/R/Internal_Utilities.R @@ -342,6 +342,8 @@ yesno <- function(msg, .envir = parent.frame()) { #' Provides method to change parameter value dynamically within function to suit defaults of other functions. #' Used in iterative plotting functions. #' +#' @param parameter the parameter to check for NULL +#' #' @return if NULL returns NA otherwise returns input value. #' #' From 076345fb1d60a6ca585cc39646a3b0e77b82eba4 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 08:54:35 -0500 Subject: [PATCH 16/26] update ggsave calls for height/width params --- R/Plotting_Seurat_Iterative.R | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/R/Plotting_Seurat_Iterative.R b/R/Plotting_Seurat_Iterative.R index 3b0682f19..baa488c58 100644 --- a/R/Plotting_Seurat_Iterative.R +++ b/R/Plotting_Seurat_Iterative.R @@ -301,7 +301,7 @@ Iterate_DimPlot_bySample <- function( xlim(x_axis) + ylim(y_axis) } - suppressMessages(ggsave(filename = paste(file_path, column_list[[i]], file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, column_list[[i]], file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) setTxtProgressBar(pb = pb, value = i) } close(con = pb) @@ -323,7 +323,7 @@ Iterate_DimPlot_bySample <- function( xlim(x_axis) + ylim(y_axis) } - suppressMessages(ggsave(filename = paste(file_path, column_list[[i]], file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, column_list[[i]], file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) setTxtProgressBar(pb = pb, value = i) } close(con = pb) @@ -495,7 +495,7 @@ Iterate_Cluster_Highlight_Plot <- function( reduction = reduction, raster = raster, ...)) - suppressMessages(ggsave(filename = paste(file_path, list_idents_save[i], "_", file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, list_idents_save[i], "_", file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) setTxtProgressBar(pb = pb, value = i) } close(con = pb) @@ -513,7 +513,7 @@ Iterate_Cluster_Highlight_Plot <- function( reduction = reduction, raster = raster, ...)) - suppressMessages(ggsave(filename = paste(file_path, list_idents_save[[i]], "_", file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, list_idents_save[[i]], "_", file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) setTxtProgressBar(pb = pb, value = i) } close(con = pb) @@ -781,7 +781,7 @@ Iterate_Meta_Highlight_Plot <- function( ...)) } - suppressMessages(ggsave(filename = paste(file_path, list_idents_save[i], "_", file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, list_idents_save[i], "_", file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) setTxtProgressBar(pb = pb, value = i) } close(con = pb) @@ -816,7 +816,7 @@ Iterate_Meta_Highlight_Plot <- function( ...)) } - suppressMessages(ggsave(filename = paste(file_path, list_idents_save[[i]], "_", file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, list_idents_save[[i]], "_", file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) setTxtProgressBar(pb = pb, value = i) } close(con = pb) @@ -1139,9 +1139,9 @@ Iterate_FeaturePlot_scCustom <- function( for (i in 1:length(all_found_features)) { FeaturePlot_scCustom(seurat_object = seurat_object, features = all_found_features[i], colors_use = colors_use, na_color = na_color, na_cutoff = na_cutoff, split.by = split.by, order = order, pt.size = pt.size, reduction = reduction, raster = raster, alpha_exp = alpha_exp, alpha_na_exp = alpha_na_exp, ...) if (!is.null(x = names(x = all_found_features))) { - suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], "_", names(x = all_found_features)[i], "_", file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], "_", names(x = all_found_features)[i], "_", file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } else { - suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], "_", file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], "_", file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } setTxtProgressBar(pb = pb, value = i) } @@ -1153,9 +1153,9 @@ Iterate_FeaturePlot_scCustom <- function( for (i in 1:length(all_found_features)) { FeaturePlot_scCustom(seurat_object = seurat_object, features = all_found_features[i], colors_use = colors_use, na_color = na_color, na_cutoff = na_cutoff, split.by = split.by, order = order, pt.size = pt.size, reduction = reduction, raster = raster, alpha_exp = alpha_exp, alpha_na_exp = alpha_na_exp, ...) if (!is.null(x = names(x = all_found_features))) { - suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], "_", names(x = all_found_features)[i], "_", file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], "_", names(x = all_found_features)[i], "_", file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } else { - suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], "_", file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], "_", file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } setTxtProgressBar(pb = pb, value = i) } @@ -1345,7 +1345,7 @@ Iterate_VlnPlot_scCustom <- function( pb <- txtProgressBar(min = 0, max = length(x = all_found_features), style = 3, file = stderr()) for (i in 1:length(x = all_found_features)) { VlnPlot_scCustom(seurat_object = seurat_object, features = all_found_features[i], colors_use = colors_use, pt.size = pt.size, group.by = group.by, raster = raster, ggplot_default_colors = ggplot_default_colors, color_seed = color_seed, split.by = split.by, ...) - suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) setTxtProgressBar(pb = pb, value = i) } close(con = pb) @@ -1355,7 +1355,7 @@ Iterate_VlnPlot_scCustom <- function( pb <- txtProgressBar(min = 0, max = length(x = all_found_features), style = 3, file = stderr()) for (i in 1:length(x = all_found_features)) { VlnPlot_scCustom(seurat_object = seurat_object, features = all_found_features[i], colors_use = colors_use, pt.size = pt.size, group.by = group.by, raster = raster, ggplot_default_colors = ggplot_default_colors, color_seed = color_seed, split.by = split.by, ...) - suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, all_found_features[i], file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) setTxtProgressBar(pb = pb, value = i) } close(con = pb) @@ -1538,9 +1538,9 @@ Iterate_Plot_Density_Custom <- function( for (i in 1:length(gene_list)) { Plot_Density_Custom(seurat_object = seurat_object, features = gene_list[i], joint = FALSE, viridis_palette = viridis_palette, custom_palette = custom_palette, pt.size = pt.size, reduction = reduction, ...) if (!is.null(x = names(x = gene_list))) { - suppressMessages(ggsave(filename = paste(file_path, gene_list[i], "_", names(x = gene_list)[i], "_", file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, gene_list[i], "_", names(x = gene_list)[i], "_", file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } else { - suppressMessages(ggsave(filename = paste(file_path, gene_list[i], "_", file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, gene_list[i], "_", file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } setTxtProgressBar(pb = pb, value = i) } @@ -1552,9 +1552,9 @@ Iterate_Plot_Density_Custom <- function( for (i in 1:length(gene_list)) { Plot_Density_Custom(seurat_object = seurat_object, features = gene_list[i], joint = FALSE, viridis_palette = viridis_palette, custom_palette = custom_palette, pt.size = pt.size, reduction = reduction, ...) if (!is.null(x = names(x = gene_list))) { - suppressMessages(ggsave(filename = paste(file_path, gene_list[i], "_", names(x = gene_list)[i], "_", file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, gene_list[i], "_", names(x = gene_list)[i], "_", file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } else { - suppressMessages(ggsave(filename = paste(file_path, gene_list[i], "_", file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, gene_list[i], "_", file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } setTxtProgressBar(pb = pb, value = i) } @@ -1766,9 +1766,9 @@ Iterate_Plot_Density_Joint <- function( for (i in 1:length(final_gene_list)) { Plot_Density_Joint_Only(seurat_object = seurat_object, features = final_gene_list[[i]], viridis_palette = viridis_palette, custom_palette = custom_palette, pt.size = pt.size, reduction = reduction, ...) if (!is.null(x = names(x = final_gene_list))) { - suppressMessages(ggsave(filename = paste(file_path, paste(final_gene_list[[i]], collapse = "_"), "_", names(x = final_gene_list)[i], "_", file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, paste(final_gene_list[[i]], collapse = "_"), "_", names(x = final_gene_list)[i], "_", file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } else { - suppressMessages(ggsave(filename = paste(file_path, paste(final_gene_list[[i]], collapse = "_"), "_", file_name, file_type, sep=""), dpi = dpi)) + suppressMessages(ggsave(filename = paste(file_path, paste(final_gene_list[[i]], collapse = "_"), "_", file_name, file_type, sep=""), dpi = dpi, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } setTxtProgressBar(pb = pb, value = i) } @@ -1780,9 +1780,9 @@ Iterate_Plot_Density_Joint <- function( for (i in 1:length(final_gene_list)) { Plot_Density_Joint_Only(seurat_object = seurat_object, features = final_gene_list[[i]], viridis_palette = viridis_palette, custom_palette = custom_palette, pt.size = pt.size, reduction = reduction, ...) if (!is.null(x = names(x = final_gene_list))) { - suppressMessages(ggsave(filename = paste(file_path, paste(final_gene_list[[i]], collapse = "_"), "_", names(x = final_gene_list)[i], "_", file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, paste(final_gene_list[[i]], collapse = "_"), "_", names(x = final_gene_list)[i], "_", file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } else { - suppressMessages(ggsave(filename = paste(file_path, paste(final_gene_list[[i]], collapse = "_"), "_", file_name, file_type, sep=""), useDingbats = FALSE)) + suppressMessages(ggsave(filename = paste(file_path, paste(final_gene_list[[i]], collapse = "_"), "_", file_name, file_type, sep=""), useDingbats = FALSE, height = replace_null(parameter = output_height), width = replace_null(parameter = output_width))) } setTxtProgressBar(pb = pb, value = i) } From 0d386e2ece0aa105554e6581caee0b1b276c94aa Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 08:57:27 -0500 Subject: [PATCH 17/26] update manual entries --- R/Plotting_Seurat_Iterative.R | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/R/Plotting_Seurat_Iterative.R b/R/Plotting_Seurat_Iterative.R index baa488c58..06c336129 100644 --- a/R/Plotting_Seurat_Iterative.R +++ b/R/Plotting_Seurat_Iterative.R @@ -103,6 +103,8 @@ Iterate_PC_Loading_Plots <- function( #' @param file_name name suffix to append after sample name. #' @param file_type File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg". #' @param single_pdf saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf +#' @param output_width the width (in inches) for output page size. Default is NULL. +#' @param output_height the height (in inches) for output page size. Default is NULL. #' @param color color scheme to use. #' @param no_legend logical, whether or not to include plot legend, default is TRUE. #' @param title_prefix Value that should be used for plot title prefix if `no_legend = TRUE`. @@ -346,7 +348,9 @@ Iterate_DimPlot_bySample <- function( #' @param file_path directory file path and/or file name prefix. Defaults to current wd. #' @param file_name name suffix to append after sample name. #' @param file_type File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg". -#' @param single_pdf saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf +#' @param single_pdf saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf. +#' @param output_width the width (in inches) for output page size. Default is NULL. +#' @param output_height the height (in inches) for output page size. Default is NULL. #' @param dpi dpi for image saving. #' @param raster Convert points to raster format. Default is NULL which will rasterize by default if #' greater than 200,000 cells. @@ -542,7 +546,9 @@ Iterate_Cluster_Highlight_Plot <- function( #' @param file_path directory file path and/or file name prefix. Defaults to current wd. #' @param file_name name suffix to append after sample name. #' @param file_type File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg". -#' @param single_pdf saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf +#' @param single_pdf saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf. +#' @param output_width the width (in inches) for output page size. Default is NULL. +#' @param output_height the height (in inches) for output page size. Default is NULL. #' @param dpi dpi for image saving. #' @param raster Convert points to raster format. Default is NULL which will rasterize by default if #' greater than 200,000 cells. @@ -842,6 +848,8 @@ Iterate_Meta_Highlight_Plot <- function( #' @param file_name name suffix and file extension. #' @param file_type File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg". #' @param single_pdf saves all plots to single PDF file (default = FALSE). +#' @param output_width the width (in inches) for output page size. Default is NULL. +#' @param output_height the height (in inches) for output page size. Default is NULL. #' @param features_per_page numeric, number of features to plot on single page if `single_pdf = TRUE`. Default is 1. #' @param num_columns Number of columns in plot layout (only applicable if `single_pdf = TRUE` AND #' `features_per_page` > 1). @@ -1194,6 +1202,8 @@ Iterate_FeaturePlot_scCustom <- function( #' @param file_name name suffix and file extension. #' @param file_type File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg". #' @param single_pdf saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf. +#' @param output_width the width (in inches) for output page size. Default is NULL. +#' @param output_height the height (in inches) for output page size. Default is NULL. #' @param raster Convert points to raster format. Default is NULL which will rasterize by default if #' greater than 100,000 total points plotted (# Cells x # of features). #' @param dpi dpi for image saving. @@ -1378,6 +1388,8 @@ Iterate_VlnPlot_scCustom <- function( #' @param file_name name suffix and file extension. #' @param file_type File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg". #' @param single_pdf saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf. +#' @param output_width the width (in inches) for output page size. Default is NULL. +#' @param output_height the height (in inches) for output page size. Default is NULL. #' @param dpi dpi for image saving. #' @param reduction Dimensionality Reduction to use (if NULL then defaults to Object default) #' @param joint NULL. This function only supports `joint = FALSE`. Leave as NULL to generate plots. To iterate joint plots see function: `Iterate_Plot_Density_Joint`. @@ -1580,6 +1592,8 @@ Iterate_Plot_Density_Custom <- function( #' @param file_name name suffix and file extension. #' @param file_type File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg". #' @param single_pdf saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf. +#' @param output_width the width (in inches) for output page size. Default is NULL. +#' @param output_height the height (in inches) for output page size. Default is NULL. #' @param dpi dpi for image saving. #' @param reduction Dimensionality Reduction to use (if NULL then defaults to Object default) #' @param joint NULL. This function only supports `joint = FALSE`. Leave as NULL to generate plots. To iterate joint plots see function: `Iterate_Plot_Density_Joint`. From 9eb2d5613008166c1ee696beadddeac212f63f1e Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 08:57:41 -0500 Subject: [PATCH 18/26] Update docs --- man/Iterate_Cluster_Highlight_Plot.Rd | 8 +++++++- man/Iterate_DimPlot_bySample.Rd | 6 ++++++ man/Iterate_FeaturePlot_scCustom.Rd | 6 ++++++ man/Iterate_Meta_Highlight_Plot.Rd | 8 +++++++- man/Iterate_Plot_Density_Custom.Rd | 6 ++++++ man/Iterate_Plot_Density_Joint.Rd | 6 ++++++ man/Iterate_VlnPlot_scCustom.Rd | 6 ++++++ 7 files changed, 44 insertions(+), 2 deletions(-) diff --git a/man/Iterate_Cluster_Highlight_Plot.Rd b/man/Iterate_Cluster_Highlight_Plot.Rd index dc00ae7c6..ca76a0cff 100644 --- a/man/Iterate_Cluster_Highlight_Plot.Rd +++ b/man/Iterate_Cluster_Highlight_Plot.Rd @@ -14,6 +14,8 @@ Iterate_Cluster_Highlight_Plot( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, raster = NULL, ... @@ -37,7 +39,11 @@ all clusters/plots or a vector of colors equal to the number of clusters to use \item{file_type}{File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg".} -\item{single_pdf}{saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf} +\item{single_pdf}{saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf.} + +\item{output_width}{the width (in inches) for output page size. Default is NULL.} + +\item{output_height}{the height (in inches) for output page size. Default is NULL.} \item{dpi}{dpi for image saving.} diff --git a/man/Iterate_DimPlot_bySample.Rd b/man/Iterate_DimPlot_bySample.Rd index a87595aca..7ca4b054c 100644 --- a/man/Iterate_DimPlot_bySample.Rd +++ b/man/Iterate_DimPlot_bySample.Rd @@ -11,6 +11,8 @@ Iterate_DimPlot_bySample( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, color = "black", no_legend = TRUE, @@ -35,6 +37,10 @@ Iterate_DimPlot_bySample( \item{single_pdf}{saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf} +\item{output_width}{the width (in inches) for output page size. Default is NULL.} + +\item{output_height}{the height (in inches) for output page size. Default is NULL.} + \item{dpi}{dpi for image saving.} \item{color}{color scheme to use.} diff --git a/man/Iterate_FeaturePlot_scCustom.Rd b/man/Iterate_FeaturePlot_scCustom.Rd index 3efa5b61b..9eeb9fa7f 100644 --- a/man/Iterate_FeaturePlot_scCustom.Rd +++ b/man/Iterate_FeaturePlot_scCustom.Rd @@ -17,6 +17,8 @@ Iterate_FeaturePlot_scCustom( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, features_per_page = 1, num_columns = NULL, landscape = TRUE, @@ -55,6 +57,10 @@ will be incorporated into plot title if \code{single_pdf = TRUE} or into file na \item{single_pdf}{saves all plots to single PDF file (default = FALSE).} +\item{output_width}{the width (in inches) for output page size. Default is NULL.} + +\item{output_height}{the height (in inches) for output page size. Default is NULL.} + \item{features_per_page}{numeric, number of features to plot on single page if \code{single_pdf = TRUE}. Default is 1.} \item{num_columns}{Number of columns in plot layout (only applicable if \code{single_pdf = TRUE} AND diff --git a/man/Iterate_Meta_Highlight_Plot.Rd b/man/Iterate_Meta_Highlight_Plot.Rd index 4f285aa0d..a4179008d 100644 --- a/man/Iterate_Meta_Highlight_Plot.Rd +++ b/man/Iterate_Meta_Highlight_Plot.Rd @@ -19,6 +19,8 @@ Iterate_Meta_Highlight_Plot( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, raster = NULL, ... @@ -54,7 +56,11 @@ If NULL the value of \code{meta_data_column} will be used. Default is NULL.} \item{file_type}{File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg".} -\item{single_pdf}{saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf} +\item{single_pdf}{saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf.} + +\item{output_width}{the width (in inches) for output page size. Default is NULL.} + +\item{output_height}{the height (in inches) for output page size. Default is NULL.} \item{dpi}{dpi for image saving.} diff --git a/man/Iterate_Plot_Density_Custom.Rd b/man/Iterate_Plot_Density_Custom.Rd index 4b2029ac5..1fb6c95dd 100644 --- a/man/Iterate_Plot_Density_Custom.Rd +++ b/man/Iterate_Plot_Density_Custom.Rd @@ -14,6 +14,8 @@ Iterate_Plot_Density_Custom( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, reduction = NULL, combine = TRUE, @@ -41,6 +43,10 @@ will be incorporated into plot title if \code{single_pdf = TRUE} or into file na \item{single_pdf}{saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf.} +\item{output_width}{the width (in inches) for output page size. Default is NULL.} + +\item{output_height}{the height (in inches) for output page size. Default is NULL.} + \item{dpi}{dpi for image saving.} \item{reduction}{Dimensionality Reduction to use (if NULL then defaults to Object default)} diff --git a/man/Iterate_Plot_Density_Joint.Rd b/man/Iterate_Plot_Density_Joint.Rd index 8abc11079..ec31bc63b 100644 --- a/man/Iterate_Plot_Density_Joint.Rd +++ b/man/Iterate_Plot_Density_Joint.Rd @@ -14,6 +14,8 @@ Iterate_Plot_Density_Joint( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, dpi = 600, reduction = NULL, combine = TRUE, @@ -43,6 +45,10 @@ into file name if \code{FALSE}.} \item{single_pdf}{saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf.} +\item{output_width}{the width (in inches) for output page size. Default is NULL.} + +\item{output_height}{the height (in inches) for output page size. Default is NULL.} + \item{dpi}{dpi for image saving.} \item{reduction}{Dimensionality Reduction to use (if NULL then defaults to Object default)} diff --git a/man/Iterate_VlnPlot_scCustom.Rd b/man/Iterate_VlnPlot_scCustom.Rd index 45d517463..e62cd6fdd 100644 --- a/man/Iterate_VlnPlot_scCustom.Rd +++ b/man/Iterate_VlnPlot_scCustom.Rd @@ -15,6 +15,8 @@ Iterate_VlnPlot_scCustom( file_name = NULL, file_type = NULL, single_pdf = FALSE, + output_width = NULL, + output_height = NULL, raster = NULL, dpi = 600, ggplot_default_colors = FALSE, @@ -46,6 +48,10 @@ default is the current active.ident of the object.} \item{single_pdf}{saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf.} +\item{output_width}{the width (in inches) for output page size. Default is NULL.} + +\item{output_height}{the height (in inches) for output page size. Default is NULL.} + \item{raster}{Convert points to raster format. Default is NULL which will rasterize by default if greater than 100,000 total points plotted (# Cells x # of features).} From 723af62b92c11fa06117659e777a95e9d17299dd Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 09:01:38 -0500 Subject: [PATCH 19/26] Update changelog --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index f8d77a9a3..e6185bca5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # scCustomize 3.0.1 (2024-12-11) ## Added +- Added new parameters `output_width` and `output_height` to the `Iterate_*` family of plotting functions ([#217](https://github.com/samuel-marsh/scCustomize/issues/217)). ## Changed @@ -9,6 +10,7 @@ - Fixed bug in `Random_Cells_Downsample` that prevented setting identity using the `group.by` parameter. - Fixed bug in `Cell_Highlight_Plot` that didn't pass the reduction parameter properly ([#216](https://github.com/samuel-marsh/scCustomize/issues/216)). - Fixed bug when retrieving ensembl IDs for IEGs. +- Fixed bug that prevented using `return_plots` in iterative plotting functions([#217](https://github.com/samuel-marsh/scCustomize/issues/217)). From c61e50b16a15849f967fe13845a79ef507505751 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 09:01:47 -0500 Subject: [PATCH 20/26] bump date --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8c0a16ec9..39b6d5c40 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Type: Package Title: Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing Description: Collection of functions created and/or curated to aid in the visualization and analysis of single-cell data using 'R'. 'scCustomize' aims to provide 1) Customized visualizations for aid in ease of use and to create more aesthetic and functional visuals. 2) Improve speed/reproducibility of common tasks/pieces of code in scRNA-seq analysis with a single or group of functions. For citation please use: Marsh SE (2021) "Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing" RRID:SCR_024675. Version: 3.0.1 -Date: 2024-12-11 +Date: 2024-12-12 Authors@R: c( person(given = "Samuel", family = "Marsh", email = "samuel.marsh@childrens.harvard.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3012-6945")), person(given = "Ming", family = "Tang", role = c("ctb"), email = "tangming2005@gmail.com"), From 99fc9a286e8a6ee43a0193003b293c04b65b24e8 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 09:38:03 -0500 Subject: [PATCH 21/26] add numeric checks for output height/width --- R/Plotting_Seurat_Iterative.R | 91 +++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/R/Plotting_Seurat_Iterative.R b/R/Plotting_Seurat_Iterative.R index 06c336129..accd5391c 100644 --- a/R/Plotting_Seurat_Iterative.R +++ b/R/Plotting_Seurat_Iterative.R @@ -163,6 +163,19 @@ Iterate_DimPlot_bySample <- function( # Check Seurat Is_Seurat(seurat_object = seurat_object) + # check non-default output values + if (!is.null(x = output_width)) { + if (!is.numeric(x = output_width)) { + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + } + } + + if (!is.null(x = output_height)) { + if (!is.numeric(x = output_height)) { + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + } + } + # Harmonize pt.size across all plots pt.size <- pt.size %||% AutoPointSize_scCustom(data = seurat_object) @@ -398,6 +411,19 @@ Iterate_Cluster_Highlight_Plot <- function( # Check Seurat Is_Seurat(seurat_object = seurat_object) + # check non-default output values + if (!is.null(x = output_width)) { + if (!is.numeric(x = output_width)) { + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + } + } + + if (!is.null(x = output_height)) { + if (!is.numeric(x = output_height)) { + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + } + } + # Set file_path before path check if current dir specified as opposed to leaving set to NULL if (!is.null(x = file_path) && file_path == "") { file_path <- NULL @@ -602,6 +628,19 @@ Iterate_Meta_Highlight_Plot <- function( # Check Seurat Is_Seurat(seurat_object = seurat_object) + # check non-default output values + if (!is.null(x = output_width)) { + if (!is.numeric(x = output_width)) { + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + } + } + + if (!is.null(x = output_height)) { + if (!is.numeric(x = output_height)) { + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + } + } + # Check meta data meta_data_column <- Meta_Present(object = seurat_object, meta_col_names = meta_data_column, omit_warn = FALSE, print_msg = FALSE)[[1]] @@ -922,6 +961,19 @@ Iterate_FeaturePlot_scCustom <- function( # Check Seurat Is_Seurat(seurat_object = seurat_object) + # check non-default output values + if (!is.null(x = output_width)) { + if (!is.numeric(x = output_width)) { + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + } + } + + if (!is.null(x = output_height)) { + if (!is.numeric(x = output_height)) { + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + } + } + # Add raster check for scCustomize raster <- raster %||% (length(x = Cells(x = seurat_object)) > 2e5) @@ -1256,6 +1308,19 @@ Iterate_VlnPlot_scCustom <- function( # Check Seurat Is_Seurat(seurat_object = seurat_object) + # check non-default output values + if (!is.null(x = output_width)) { + if (!is.numeric(x = output_width)) { + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + } + } + + if (!is.null(x = output_height)) { + if (!is.numeric(x = output_height)) { + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + } + } + # Add pt.size check pt.size <- pt.size %||% AutoPointSize_scCustom(data = seurat_object) @@ -1452,6 +1517,19 @@ Iterate_Plot_Density_Custom <- function( # Check Seurat Is_Seurat(seurat_object = seurat_object) + # check non-default output values + if (!is.null(x = output_width)) { + if (!is.numeric(x = output_width)) { + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + } + } + + if (!is.null(x = output_height)) { + if (!is.numeric(x = output_height)) { + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + } + } + # joint check if (!is.null(x = joint)) { cli_abort(message = c("{.code Iterate_Plot_Density_Custom} only supports {.code joint = FALSE}.", @@ -1657,6 +1735,19 @@ Iterate_Plot_Density_Joint <- function( # Check Seurat Is_Seurat(seurat_object = seurat_object) + # check non-default output values + if (!is.null(x = output_width)) { + if (!is.numeric(x = output_width)) { + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + } + } + + if (!is.null(x = output_height)) { + if (!is.numeric(x = output_height)) { + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + } + } + # Check gene list is in list form if (!inherits(x = gene_list, what = "list")) { cli_abort(message = c("For {.code Iterate_Plot_Density_Joint} the {.code gene_list} must be of class(): {.val list}", From baea6369f0f8f10704b81dce5c3a8d46837e4064 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 12 Dec 2024 09:41:40 -0500 Subject: [PATCH 22/26] fix typo --- R/Plotting_Seurat_Iterative.R | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/R/Plotting_Seurat_Iterative.R b/R/Plotting_Seurat_Iterative.R index accd5391c..e5c94b6bd 100644 --- a/R/Plotting_Seurat_Iterative.R +++ b/R/Plotting_Seurat_Iterative.R @@ -166,13 +166,13 @@ Iterate_DimPlot_bySample <- function( # check non-default output values if (!is.null(x = output_width)) { if (!is.numeric(x = output_width)) { - cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is not numeric.") } } if (!is.null(x = output_height)) { if (!is.numeric(x = output_height)) { - cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is not numeric.") } } @@ -414,13 +414,13 @@ Iterate_Cluster_Highlight_Plot <- function( # check non-default output values if (!is.null(x = output_width)) { if (!is.numeric(x = output_width)) { - cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is not numeric.") } } if (!is.null(x = output_height)) { if (!is.numeric(x = output_height)) { - cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is not numeric.") } } @@ -631,13 +631,13 @@ Iterate_Meta_Highlight_Plot <- function( # check non-default output values if (!is.null(x = output_width)) { if (!is.numeric(x = output_width)) { - cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is not numeric.") } } if (!is.null(x = output_height)) { if (!is.numeric(x = output_height)) { - cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is not numeric.") } } @@ -964,13 +964,13 @@ Iterate_FeaturePlot_scCustom <- function( # check non-default output values if (!is.null(x = output_width)) { if (!is.numeric(x = output_width)) { - cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is not numeric.") } } if (!is.null(x = output_height)) { if (!is.numeric(x = output_height)) { - cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is not numeric.") } } @@ -1311,13 +1311,13 @@ Iterate_VlnPlot_scCustom <- function( # check non-default output values if (!is.null(x = output_width)) { if (!is.numeric(x = output_width)) { - cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is not numeric.") } } if (!is.null(x = output_height)) { if (!is.numeric(x = output_height)) { - cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is not numeric.") } } @@ -1520,13 +1520,13 @@ Iterate_Plot_Density_Custom <- function( # check non-default output values if (!is.null(x = output_width)) { if (!is.numeric(x = output_width)) { - cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is not numeric.") } } if (!is.null(x = output_height)) { if (!is.numeric(x = output_height)) { - cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is not numeric.") } } @@ -1738,13 +1738,13 @@ Iterate_Plot_Density_Joint <- function( # check non-default output values if (!is.null(x = output_width)) { if (!is.numeric(x = output_width)) { - cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_width} ({.field {output_width}}) is not numeric.") } } if (!is.null(x = output_height)) { if (!is.numeric(x = output_height)) { - cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is is not numeric.") + cli_abort(message = "The value provided to {.code output_height} ({.field {output_height}}) is not numeric.") } } From 154aaa1ad21f6732b9503921aa70ab9822bd2bb9 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 18 Dec 2024 09:17:29 -0500 Subject: [PATCH 23/26] update r proj --- scCustomize.Rproj | 1 + 1 file changed, 1 insertion(+) diff --git a/scCustomize.Rproj b/scCustomize.Rproj index d0ded0715..d65c29a9a 100644 --- a/scCustomize.Rproj +++ b/scCustomize.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: 36c01bc4-551d-46b8-b881-69c09777ce3d RestoreWorkspace: Default SaveWorkspace: Default From 591c06a72149524190ea494befd68dc5176cd87b Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 18 Dec 2024 09:18:06 -0500 Subject: [PATCH 24/26] update changelog --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index e6185bca5..28a354222 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# scCustomize 3.0.1 (2024-12-11) +# scCustomize 3.0.1 (2024-12-18) ## Added - Added new parameters `output_width` and `output_height` to the `Iterate_*` family of plotting functions ([#217](https://github.com/samuel-marsh/scCustomize/issues/217)). From 35310192b2d1cf45a606dbe68178e8545eeabb17 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 18 Dec 2024 09:18:13 -0500 Subject: [PATCH 25/26] bump version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 39b6d5c40..cd09ae999 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Type: Package Title: Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing Description: Collection of functions created and/or curated to aid in the visualization and analysis of single-cell data using 'R'. 'scCustomize' aims to provide 1) Customized visualizations for aid in ease of use and to create more aesthetic and functional visuals. 2) Improve speed/reproducibility of common tasks/pieces of code in scRNA-seq analysis with a single or group of functions. For citation please use: Marsh SE (2021) "Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing" RRID:SCR_024675. Version: 3.0.1 -Date: 2024-12-12 +Date: 2024-12-18 Authors@R: c( person(given = "Samuel", family = "Marsh", email = "samuel.marsh@childrens.harvard.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3012-6945")), person(given = "Ming", family = "Tang", role = c("ctb"), email = "tangming2005@gmail.com"), From 56e5fca4a67c56977dc8e02618af1461aab40b61 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Wed, 18 Dec 2024 09:18:58 -0500 Subject: [PATCH 26/26] Update cran comments --- cran-comments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cran-comments.md b/cran-comments.md index 81a17352d..93a2849a6 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,5 @@ ## Hotfix Update -This is major update to version 3.0.1. Fixes bug preventing a function from operating correctly. See News.md for full changelog. +This is major update to version 3.0.1. Fixes 4 minor bugs that caused unexpected errors. See News.md for full changelog.