Skip to content

Commit

Permalink
Fixed a minor bug plotScanpyEmbedding function
Browse files Browse the repository at this point in the history
  • Loading branch information
irzamsarfraz committed Mar 7, 2023
1 parent 486e5e3 commit 16fb8f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/scanpyFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,8 @@ runScanpyTSNE <- function(inSCE,
#' @param inSCE Input \code{SingleCellExperiment} object.
#' @param reducedDimName Name of reducedDims object containing embeddings.
#' Eg. scanpyUMAP.
#' @param useAssay Specify name of assay to use. Default is \code{NULL},
#' which will use scaled assay by default.
#' @param color Keys for annotations of observations/cells or variables/genes.
#' @param title Provide title for panels either as string or list of strings
#' @param legend Location of legend, either 'on data', 'right margin' or a
Expand All @@ -1128,6 +1130,7 @@ runScanpyTSNE <- function(inSCE,
#' @importFrom reticulate py_module_available py_set_seed import
plotScanpyEmbedding <- function(inSCE,
reducedDimName,
useAssay = NULL,
color = NULL,
legend = 'right margin',
title = ''){
Expand All @@ -1152,6 +1155,9 @@ plotScanpyEmbedding <- function(inSCE,
)
}
useAssay <- metadata(inSCE)$sctk$runDimReduce$reddim[[reducedDimName]]$useAssay
if(is.null(useAssay)){
useAssay <- "scanpyScaledData"
}
scanpyObject <- zellkonverter::SCE2AnnData(sce = inSCE,
X_name = useAssay,
assays = FALSE,
Expand Down
4 changes: 4 additions & 0 deletions man/plotScanpyEmbedding.Rd

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

0 comments on commit 16fb8f8

Please sign in to comment.