Skip to content

Commit

Permalink
qSeuViolin
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Jan 5, 2024
1 parent 6732e3c commit 54b4097
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions R/Seurat.Utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -3535,9 +3535,9 @@ xsave <- function(
try(obj@misc$all.genes <- all.genes, silent = TRUE)
}

fnameBase <- trimws(kppu(prefix, substitute(obj), suffix, project, preset, "compr", idate(Format = "%Y.%m.%d_%H.%M")), whitespace = "_")
fnameBase <- trimws(kppu(prefix, substitute(obj), suffix, project, idate(Format = "%Y.%m.%d_%H.%M")), whitespace = "_") # , preset, "compr"
FNN <- paste0(out_dir, fnameBase, ".qs")
iprint(substitute(obj), '<- xread("', FNN, '")')
print(paste0(substitute(obj), " <- xread('", FNN, "')" ))

if (background_job & rstudioapi::isAvailable()) {
"This part is not debugged yet!"
Expand Down
14 changes: 10 additions & 4 deletions R/Seurat.Utils.Visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -723,11 +723,17 @@ qFeatureScatter <- function(
#'
#' @export
qSeuViolin <- function(
object = ls.Seurat[[1]], suffix = GEX_library,
features = "nFeature_RNA", split.by = "orig.ident", logY = TRUE, hline = FALSE, caption = FALSE
, ...) {
object = ls.Seurat[[1]],
split.by,
idents = GetNamedClusteringRuns(object)[1],
suffix = GEX_library,
features = "nFeature_RNA",
logY = TRUE, hline = FALSE, caption = FALSE,
...) {

print(unique(idents))

p <- VlnPlot(object = object, features = features, split.by = split.by, ...) +
p <- VlnPlot(object = object, features = features, split.by = split.by, group.by = idents, ...) +
ggtitle(label = features, subtitle = paste(suffix, "by", split.by)) +
theme(axis.title.x = element_blank()) + labs(y = "Top UVI's depth")

Expand Down

0 comments on commit 54b4097

Please sign in to comment.