Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Nov 12, 2024
1 parent f15c696 commit b2a5231
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/Seurat.Utils.Visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -2945,6 +2945,7 @@ plotQUMAPsInAFolder <- function(genes, obj = combined.obj,
#' @param df_markers Data frame or list of DE genes across clusters. If not provided,
#' attempts to retrieve from `obj@misc$df.markers[[paste0("res.", cl_res)]]`;
#' Default: calculated based on `cl_res`.
#' @param filt_coding_genes Logical indicating whether to filter out non-coding genes; Default: `TRUE`.
#'
#' @examples
#' \dontrun{
Expand All @@ -2960,9 +2961,15 @@ PlotTopGenesPerCluster <- function(
nrGenes = p$"n.markers",
order.by = c("combined.score", "avg_log2FC", "p_val_adj")[1],
df_markers = obj@misc$"df.markers"[[paste0("res.", cl_res)]],
filt_coding_genes = TRUE,
...) {
message(" > Running PlotTopGenesPerCluster...")

if(filt_coding_genes) {
genes <- df_markers$gene
df_markers <- df_markers[genes %in% filterCodingGenes(genes), ]
}

topX.markers <- GetTopMarkers(
dfDE = df_markers, n = nrGenes,
order.by = order.by
Expand Down
3 changes: 3 additions & 0 deletions man/PlotTopGenesPerCluster.Rd

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

0 comments on commit b2a5231

Please sign in to comment.