Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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" <doi:10.5281/zenodo.5706430> RRID:SCR_024675.
Version: 3.2.1
Date: 2025-11-07
Version: 3.2.2
Date: 2025-11-12
Authors@R: c(
person(given = "Samuel", family = "Marsh", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3012-6945")),
person(given = "Ming", family = "Tang", role = c("ctb"), email = "[email protected]"),
Expand Down
21 changes: 21 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# scCustomize 3.2.2 (2025-11-12)
## Added



## Changed
- Changed behavior of file extension checking in `Add_MALAT1_Threshold`.



## Fixes
- Fixed problem with `Add_Cell_QC_Metrics` that was not correctly accounting for all lncRNA genes when calculating percentage of lncRNA counts.









# scCustomize 3.2.1 (2025-11-07)
## Added
- Added new function `ElbowPlot_scCustom` which expands `ElbowPlot` to include calculations of amount of variance conferred by PCs. See manual for more details.
Expand Down
12 changes: 2 additions & 10 deletions R/Internal_Utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -1682,8 +1682,6 @@ Add_IEG_Seurat <- function(
#' @param seurat_object object name.
#' @param species Species of origin for given Seurat Object.
#' @param lncRNA_name name to use for the new meta.data column containing percent lncRNA gene counts. Default is "percent_lncRNA".
#' @param ensembl_ids logical, whether feature names in the object are gene names or
#' ensembl IDs (default is FALSE; set TRUE if feature names are ensembl IDs).
#' @param assay Assay to use (default is the current object default assay).
#' @param overwrite Logical. Whether to overwrite existing meta.data columns. Default is FALSE meaning that
#' function will abort if columns with the name provided to `lncRNA_name` is present in meta.data slot.
Expand All @@ -1699,7 +1697,6 @@ Add_lncRNA_Seurat <- function(
seurat_object,
species,
lncRNA_name = "percent_lncRNA",
ensembl_ids = FALSE,
assay = NULL,
overwrite = FALSE
) {
Expand Down Expand Up @@ -1738,13 +1735,9 @@ Add_lncRNA_Seurat <- function(
assay <- assay %||% DefaultAssay(object = seurat_object)

# Retrieve gene lists
if (isFALSE(x = ensembl_ids)) {
lncRNA_gene_list <- Retrieve_lncRNA(species = species)
} else {
lncRNA_gene_list <- Retrieve_Ensembl_lncRNA(species = species)
}
complete_lnc_list <- c(Retrieve_lncRNA(species = species), Retrieve_Ensembl_lncRNA(species = species))

lncRNA_found <- Feature_PreCheck(object = seurat_object, features = lncRNA_gene_list, print_missing = FALSE)
lncRNA_found <- Feature_PreCheck(object = seurat_object, features = complete_lnc_list, print_missing = FALSE)

# Add mito and ribo columns
if (length(x = lncRNA_found) > 0) {
Expand All @@ -1759,7 +1752,6 @@ Add_lncRNA_Seurat <- function(
}



#' Define MALAT1 QC Threshold
#'
#' This function is a threshold calculation and procedure as described in
Expand Down
11 changes: 2 additions & 9 deletions R/LIGER_Internal_Utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -2296,8 +2296,6 @@ Add_IEG_LIGER <- function(
#' @param liger_object object name.
#' @param species Species of origin for given Seurat Object.
#' @param lncRNA_name name to use for the new meta.data column containing percent lncRNA gene counts. Default is "percent_lncRNA".
#' @param ensembl_ids logical, whether feature names in the object are gene names or
#' ensembl IDs (default is FALSE; set TRUE if feature names are ensembl IDs).
#' @param overwrite Logical. Whether to overwrite existing meta data columns. Default is FALSE meaning that
#' function will abort if columns with the name provided to `lncRNA_name` is present in meta data slot.
#'
Expand All @@ -2312,7 +2310,6 @@ Add_lncRNA_LIGER <- function(
liger_object,
species,
lncRNA_name = "percent_lncRNA",
ensembl_ids = FALSE,
overwrite = FALSE
) {
# Accepted species names
Expand Down Expand Up @@ -2349,15 +2346,11 @@ Add_lncRNA_LIGER <- function(
}

# Retrieve gene lists
if (isFALSE(x = ensembl_ids)) {
lncRNA_gene_list <- Retrieve_lncRNA(species = species)
} else {
lncRNA_gene_list <- Retrieve_Ensembl_lncRNA(species = species)
}
complete_lnc_list <- c(Retrieve_lncRNA(species = species), Retrieve_Ensembl_lncRNA(species = species))

all_features <- Features(x = liger_object, by_dataset = FALSE)

lncRNA_found <- intersect(x = lncRNA_gene_list, y = all_features)
lncRNA_found <- intersect(x = complete_lnc_list, y = all_features)

# Add ieg column
if (length(x = lncRNA_found) > 0) {
Expand Down
6 changes: 1 addition & 5 deletions R/LIGER_Utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -1197,16 +1197,12 @@ Add_Cell_QC_Metrics.liger <- function(

# Add lncRNA
if (isTRUE(x = add_lncRNA)) {
if (species %in% marmoset_options && isFALSE(x = ensembl_ids)) {
cli_warn(message = c("{.val Marmoset} lncRNAs do not currently have annotated symbols (only Ensembl IDs) in Ensembl database.",
"i" = "No columns will be added to object meta.data"))
}
if (species %in% drosophila_options) {
cli_warn(message = c("{.val Drosophila} do not have separate lncRNA gene biotype (only ncRNA) in Ensembl database.",
"i" = "No columns will be added to object meta.data"))
} else {
cli_inform(message = c("*" = "Adding {.field lncRNA Percentages} to meta.data."))
object <- Add_lncRNA_LIGER(liger_object = object, species = species, lncRNA_name = lncRNA_name, overwrite = overwrite, ensembl_ids = ensembl_ids)
object <- Add_lncRNA_LIGER(liger_object = object, species = species, lncRNA_name = lncRNA_name, overwrite = overwrite)
}
}

Expand Down
8 changes: 2 additions & 6 deletions R/QC_Utilities_Seurat.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,12 @@ Add_Cell_QC_Metrics.Seurat <- function(

# Add lncRNA
if (isTRUE(x = add_lncRNA)) {
if (species %in% marmoset_options && isFALSE(x = ensembl_ids)) {
cli_warn(message = c("{.val Marmoset} lncRNAs do not currently have annotated symbols (only Ensembl IDs) in Ensembl database.",
"i" = "No columns will be added to object meta.data"))
}
if (species %in% drosophila_options) {
cli_warn(message = c("{.val Drosophila} do not have separate lncRNA gene biotype (only ncRNA) in Ensembl database.",
"i" = "No columns will be added to object meta.data"))
} else {
cli_inform(message = c("*" = "Adding {.field lncRNA Percentages} to meta.data."))
object <- Add_lncRNA_Seurat(seurat_object = object, species = species, lncRNA_name = lncRNA_name, assay = assay, overwrite = overwrite, ensembl_ids = ensembl_ids)
object <- Add_lncRNA_Seurat(seurat_object = object, species = species, lncRNA_name = lncRNA_name, assay = assay, overwrite = overwrite)
}
}

Expand Down Expand Up @@ -1099,7 +1095,7 @@ Add_MALAT1_Threshold.Seurat <- function(
# append .pdf if needed
file_ext <- grep(x = save_plot_name, pattern = ".pdf$")
if (length(x = file_ext) == 0) {
cli_abort(message = "{.code save_plot_name} must end with file extension '.pdf'.")
save_plot_name <- paste0(save_plot_name, ".pdf")
}

# check non-default output values
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Update
This is minor update to version 3.2.1. Contains bug fixes and 2 new functions. See News.md for full changelog.
This is minor patch to version 3.2.2. Contains 2 critical bug fixes. See News.md for full changelog.



Expand Down
2 changes: 1 addition & 1 deletion man/Create_10X_H5.Rd

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

2 changes: 1 addition & 1 deletion man/Create_CellBender_Merged_Seurat.Rd

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

2 changes: 1 addition & 1 deletion man/Pull_Directory_List.Rd

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

2 changes: 1 addition & 1 deletion man/Read10X_GEO.Rd

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

2 changes: 1 addition & 1 deletion man/Read10X_Multi_Directory.Rd

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

2 changes: 1 addition & 1 deletion man/Read10X_h5_GEO.Rd

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

2 changes: 1 addition & 1 deletion man/Read10X_h5_Multi_Directory.Rd

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

2 changes: 1 addition & 1 deletion man/Read_Add_cNMF.Rd

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

2 changes: 1 addition & 1 deletion man/Read_CellBender_h5_Mat.Rd

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

2 changes: 1 addition & 1 deletion man/Read_CellBender_h5_Multi_Directory.Rd

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

2 changes: 1 addition & 1 deletion man/Read_CellBender_h5_Multi_File.Rd

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

2 changes: 1 addition & 1 deletion man/Read_GEO_Delim.Rd

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

2 changes: 1 addition & 1 deletion man/Read_Metrics_10X.Rd

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

2 changes: 1 addition & 1 deletion man/Read_Metrics_CellBender.Rd

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