Skip to content

Commit 11caf20

Browse files
authored
Merge pull request #246 from samuel-marsh/release/3.2.1
Release/3.2.1
2 parents c9e67c9 + b138594 commit 11caf20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1593
-796
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.RData
44
.Ruserdata
55
.DS_Store
6-
scCustomize.Rproj
76
vignettes/assets
87
README.Rmd
98
index.Rmd

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Package: scCustomize
22
Type: Package
33
Title: Custom Visualizations & Functions for Streamlined Analyses of Single Cell Sequencing
44
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" <doi:10.5281/zenodo.5706430> RRID:SCR_024675.
5-
Version: 3.2.0
6-
Date: 2025-09-09
5+
Version: 3.2.1
6+
Date: 2025-11-07
77
Authors@R: c(
88
person(given = "Samuel", family = "Marsh", email = "sccustomize@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3012-6945")),
99
person(given = "Ming", family = "Tang", role = c("ctb"), email = "tangming2005@gmail.com"),
@@ -69,4 +69,4 @@ License: GPL (>= 3)
6969
Encoding: UTF-8
7070
LazyData: true
7171
Roxygen: list(markdown = TRUE)
72-
RoxygenNote: 7.3.2
72+
RoxygenNote: 7.3.3

NAMESPACE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export(Add_Mito_Ribo)
3939
export(Add_Pct_Diff)
4040
export(Add_Sample_Meta)
4141
export(Add_Top_Gene_Pct)
42-
export(Add_Top_Gene_Pct_Seurat)
4342
export(Barcode_Plot)
4443
export(Blank_Theme)
4544
export(Case_Check)
@@ -70,6 +69,7 @@ export(DimPlot_LIGER)
7069
export(DimPlot_scCustom)
7170
export(DiscretePalette_scCustomize)
7271
export(DotPlot_scCustom)
72+
export(ElbowPlot_scCustom)
7373
export(Embeddings)
7474
export(Extract_Modality)
7575
export(Extract_Sample_Meta)
@@ -95,8 +95,8 @@ export(Iterate_Plot_Density_Custom)
9595
export(Iterate_Plot_Density_Joint)
9696
export(Iterate_VlnPlot_scCustom)
9797
export(JCO_Four)
98-
export(Liger_to_Seurat)
9998
export(MAD_Stats)
99+
export(Map_New_Meta)
100100
export(Median_Stats)
101101
export(Merge_Seurat_List)
102102
export(Merge_Sparse_Data_All)
@@ -291,6 +291,7 @@ importFrom(patchwork,plot_layout)
291291
importFrom(patchwork,wrap_plots)
292292
importFrom(pbapply,pblapply)
293293
importFrom(pbapply,pboptions)
294+
importFrom(purrr,compact)
294295
importFrom(purrr,discard)
295296
importFrom(purrr,keep)
296297
importFrom(purrr,map)

NEWS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# scCustomize 3.2.1 (2025-11-07)
2+
## Added
3+
- Added new function `ElbowPlot_scCustom` which expands `ElbowPlot` to include calculations of amount of variance conferred by PCs. See manual for more details.
4+
- Added new function `Map_New_Meta` to enable mapping of existing meta.data column to new variable.
5+
- Added `split_downsample` parameter to `DimPlot_scCustom` to downsample each group when splitting plots to the number of cells in the smallest group.
6+
- Added `show_annotation_name` parameter to `Clustered_DotPlot` to control whether annotation name is shown next to color bar on plot. Thanks @Biase-lab, ([#243](https://github.com/samuel-marsh/scCustomize/issues/243)).
7+
- Added `no_file_prefix` to `Read_CellBender_h5_Multi_Directory` to allow for situations where file does not share folder name as prefix, default is FALSE. Thanks @pedro-fr, ([#242](https://github.com/samuel-marsh/scCustomize/issues/242)).
8+
- Added `columnns` parameter to `Fetch_Meta` to allow for return of select meta data columns instead of all columns (default remains returning all columns).
9+
- Added support for VDJ B metrics in `Read_Metrics_10X`.
10+
- Added support for Antibody Capture metrics in `Read_Metrics_10X`.
11+
12+
13+
## Changed
14+
- **BREAKING CHANGE** The `sample_name` parameter has been soft-deprecated in `Extract_Sample_Meta`. Please use `sample_col` instead. Using `sample_name` will warn user but still work until scCustomize v3.3.0.
15+
- Updated messages in `Random_Cells_Downsample`.
16+
- Full deprecation of `Add_Top_Gene_Pct_Seurat`, see current `Add_Top_Gene_Pct` function.
17+
- Full deprecation of `Liger_to_Seurat` see `as.Seurat` for LIGER v1.0 objects or `rliger::ligerToSeurat` for LIGER v2.0+ objects.
18+
- Updated `Iterate_Cluster_Highlight_Plot` to use consistent `pt.size` across all plots if `pt.size = NULL` in function call.
19+
20+
21+
22+
## Fixes
23+
- Fixed calculation of number of cells x number of features in `VlnPlot_scCustom` to properly rasterize plot if total is greater than 200,000. Thanks @DavideBrex, ([#244](https://github.com/samuel-marsh/scCustomize/issues/244)).
24+
- Fixed issue with `Read_Metrics_10X` for outputs when `cellranger_multi = TRUE` and Cell Ranger v9+ was used to process data. Thanks @lisch7, ([#245](https://github.com/samuel-marsh/scCustomize/issues/245)).
25+
- Fixed bug in `Proportion_Plot_per_Sample` due to missing parameter internally when pulling meta data and orig.ident did not represent sample IDs.
26+
- Fixed bug in `Top_Genes_Factor` for LIGER objects when setting `factor = "all"`. Thanks @theAeon, ([#247](https://github.com/samuel-marsh/scCustomize/issues/247)).
27+
- Fixed bug in `Update_HGNC_Symbols` due to error reading HGNC file. Thanks @MD-Paris, ([#248](https://github.com/samuel-marsh/scCustomize/issues/248)).
28+
- Fixed bug in `Variable_Features_ALL_LIGER` that didn't pass `num_genes` parameter correctly to LIGER v2+ objects.
29+
30+
31+
32+
33+
134
# scCustomize 3.2.0 (2025-09-09)
235
## Added
336
- Added cNMF vignette.

R/Color_Palettes.R

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ viridis_light_high <- as.vector(x = paletteer_c(palette = "viridis::viridis", n
130130
#' See RColorBrewer for more info on palettes
131131
#' \url{https://CRAN.R-project.org/package=RColorBrewer}
132132
#'
133-
#' @import cli
134-
#'
135133
#' @export
136134
#'
137135
#' @concept palettes
@@ -199,7 +197,7 @@ Single_Color_Palette <- function(
199197
#'
200198
#' Shortcut to navy orange color plot
201199
#'
202-
#' @param flip_order Whether to flip the order of colors.
200+
#' @param flip_order logical, whether to flip the order of colors.
203201
#'
204202
#' @return Navy orange palette
205203
#'
@@ -374,10 +372,8 @@ varibow_scCustom <- function(
374372
#' that is normally an ordered palette.
375373
#' @param seed random seed for the palette shuffle. Default = 123.
376374
#'
377-
#' @import cli
378375
# #' @importFrom colorway varibow (now directly ported for CRAN compatibility)
379376
#' @importFrom paletteer paletteer_d
380-
#' @importFrom rlang is_installed
381377
#'
382378
#' @return A vector of colors
383379
#'
@@ -552,7 +548,6 @@ scCustomize_Palette <- function(
552548
#' @param label_color_num logical, whether or not to numerically label the colors in output plot.
553549
#' Default is TRUE is number of colors in `pal` is less than 75 and FALSE is greater than 75.
554550
#'
555-
#' @import cli
556551
#' @import ggplot2
557552
#'
558553
#' @return Plot of all colors in supplied palette/vector
@@ -598,13 +593,13 @@ PalettePlot <- function(
598593
# Plot
599594
# Label plot
600595
if (isTRUE(x = label_color_num)) {
601-
palette_plot <- ggplot(palette_data) +
596+
palette_plot <- ggplot(data = palette_data) +
602597
geom_tile(aes(x = .data[["x"]], y = .data[["y"]], fill = .data[["fill"]])) +
603598
geom_text(aes(x = .data[["x"]], y = .data[["y"]], label = .data[["x"]])) +
604599
scale_fill_identity() +
605600
theme_void()
606601
} else {
607-
palette_plot <- ggplot(palette_data) +
602+
palette_plot <- ggplot(data = palette_data) +
608603
geom_tile(aes(x = .data[["x"]], y = .data[["y"]], fill = .data[["fill"]])) +
609604
scale_fill_identity() +
610605
theme_void()

R/Deprecated.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@
7777
# }
7878

7979

80-
#' @description
81-
#' Use [Add_Top_Gene_Pct()] instead of `Add_Top_Gene_Pct_Seurat()`.
82-
#'
83-
#' @export
84-
#' @keywords internal
85-
#' @rdname deprecated
80+
# @description
81+
# Use [Add_Top_Gene_Pct()] instead of `Add_Top_Gene_Pct_Seurat()`.
82+
#
83+
# @export
84+
# @keywords internal
85+
# @rdname deprecated
8686

87-
Add_Top_Gene_Pct_Seurat <- function(...) {
88-
lifecycle::deprecate_stop(when = "2.2.0", what = "Add_Top_Gene_Pct_Seurat()", with = "Add_Top_Gene_Pct()", details = "Deprecation error when calling function will be removed in v3.1.0+")
89-
}
87+
# Add_Top_Gene_Pct_Seurat <- function(...) {
88+
# lifecycle::deprecate_stop(when = "2.2.0", what = "Add_Top_Gene_Pct_Seurat()", with = "Add_Top_Gene_Pct()", details = "Deprecation error when calling function will be removed in v3.1.0+")
89+
# }
9090

9191
# @description
9292
# Use [Feature_Present()] instead of `Gene_Present()`.

R/Generics.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ Add_Cell_QC_Metrics <- function(object, ...) {
167167
#' Quick function to properly pull meta.data from objects.
168168
#'
169169
#' @param object Object of class Seurat or liger.
170+
#' @param columns optional, name(s) of columns to return. Default is NULL; returns all columns
170171
#' @param ... Arguments passed to other methods
171172
#'
172173
#' @return A data.frame containing cell-level meta data
@@ -183,7 +184,7 @@ Add_Cell_QC_Metrics <- function(object, ...) {
183184
#' head(meta_data, 5)
184185
#'
185186

186-
Fetch_Meta <- function(object, ...) {
187+
Fetch_Meta <- function(object, columns = NULL, ...) {
187188
UseMethod(generic = "Fetch_Meta", object = object)
188189
}
189190

0 commit comments

Comments
 (0)