Skip to content

Commit

Permalink
nf catch arg name qSeuViolin, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Jun 20, 2024
1 parent 3c42304 commit d1fbcc2
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 12 deletions.
25 changes: 19 additions & 6 deletions R/Seurat.Utils.Visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#'
#' @description This function plots the filtering thresholds and distributions for Seurat objects,
#' using four panels to highlight the relationship between gene- and UMI-counts, and the
#' ribosomal- and mitochondrial-content.
#' ribosomal- and mitochondrial-content. !! Default arguments assume that `p` is a list of
#' parameters, present in the global environment, with elements `thr.lp.mito`, `thr.hp.mito`,
#' `thr.lp.ribo`, `thr.hp.ribo`, `thr.lp.nFeature_RNA`, and `thr.hp.nFeature_RNA`.
#'
#' @param ls.obj A list of Seurat objects to be analyzed. Default: `ls.Seurat`.
#' @param parentdir The parent directory where the plots will be stored. Default: `OutDirOrig`.
Expand All @@ -32,6 +34,9 @@
#' @examples
#' \dontrun{
#' if (interactive()) {
#' # !! Default arguments assume that `p` is a list of parameters, present in the global
#' environment, with elements `thr.lp.mito`, `thr.hp.mito`, `thr.lp.ribo`, `thr.hp.ribo`,
#' `thr.lp.nFeature_RNA`, and `thr.hp.nFeature_RNA`.
#' PlotFilters(ls.Seurat)
#' }
#' }
Expand Down Expand Up @@ -1608,6 +1613,7 @@ SeuratColorVector <- function(ident = NULL, obj = combined.obj, plot.colors = FA
#'
#' @examples
#' # Assuming `results` is the output from `calculateAverageMetaData`:
#' results <- calculateAverageMetaData(obj = combined.obj)
#' plotAndSaveHeatmaps(results, path = "path/to/save/heatmaps", file.prefix = "myData_")
#'
#' @return Invisible. The function primarily generates and saves files without returning data.
Expand Down Expand Up @@ -1762,6 +1768,9 @@ qSeuViolin <- function(
feature %in% colnames(obj@meta.data) || feature %in% rownames(obj)
)

if(!is.null("idents")) warning("Use arg. ident instead of idents!\n", immediate. = TRUE)
if(!is.null("features")) warning("Use arg. feature instead of features!\n", immediate. = TRUE)

ttl <- if (suffix.2.title) {
paste(feature, "|", suffix)
} else {
Expand Down Expand Up @@ -2143,14 +2152,17 @@ umapHiLightSel <- function(obj = combined.obj,
#' @examples
#' \dontrun{
#' if (interactive()) {
#' DimPlot.ClusterNames()
#' DimPlot.ClusterNames(obj = combined.obj)
#' }
#' }
#' @export
DimPlot.ClusterNames <- function(
obj = combined.obj,
ident = "cl.names.top.gene.res.0.5",
reduction = "umap", title = ident, ...) {
ident = GetNamedClusteringRuns(obj)[1],
reduction = "umap",
title = ident,
...) {
#
Seurat::DimPlot(
object = obj, reduction = reduction, group.by = ident,
label = TRUE, repel = TRUE, ...
Expand Down Expand Up @@ -2919,7 +2931,8 @@ AutoNumber.by.UMAP <- function(obj = combined.obj,

obj[[NewMetaCol]] <- NewMeta
if (plot) {
clUMAP(obj, ident = NewMetaCol)
x <- clUMAP(obj, ident = NewMetaCol)
print(x)
}
return(obj)
}
Expand Down Expand Up @@ -3783,8 +3796,8 @@ plot3D.umap.gene <- function(
#' @export

plot3D.umap <- function(
category,
obj = combined.obj,
category = GetNamedClusteringRuns(obj)[1],
annotate.by = category,
suffix = NULL,
dotsize = 1.25,
Expand Down
4 changes: 2 additions & 2 deletions man/DimPlot.ClusterNames.Rd

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

7 changes: 6 additions & 1 deletion man/PlotFilters.Rd

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

6 changes: 3 additions & 3 deletions man/plot3D.umap.Rd

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

1 change: 1 addition & 0 deletions man/plotAndSaveHeatmaps.Rd

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

3 changes: 3 additions & 0 deletions man/scGOEnrichment.Rd

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

0 comments on commit d1fbcc2

Please sign in to comment.