diff --git a/NAMESPACE b/NAMESPACE index 7e21b1e55..53b51016f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -161,6 +161,7 @@ export("VariableFeatures<-") export(ALRAChooseKPlot) export(AddMetaData) export(AddModuleScore) +export(Assays) export(AugmentPlot) export(AverageExpression) export(BarcodeInflectionsPlot) @@ -260,6 +261,7 @@ export(Read10X_h5) export(ReadAlevin) export(ReadAlevinCsv) export(ReadH5AD) +export(Reductions) export(RelativeCounts) export(RenameCells) export(RenameIdents) diff --git a/R/objects.R b/R/objects.R index f7849b927..6e6d53f69 100644 --- a/R/objects.R +++ b/R/objects.R @@ -320,6 +320,20 @@ seurat <- setClass( # Functions #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +#' List Assay objects +#' +#' Lists the names of \code{\link{Assay}} objects present in +#' a Seurat object. +#' +#' @param object A Seurat object +#' @return Returns a character vector +#' @export +#' @examples +#' Assays(object = pbmc_small) +Assays <- function(object) { + return(FilterObjects(object = object, classes.keep = 'Assay')) +} + #' Create an Assay object #' #' Create an Assay object from a feature (e.g. gene) expression matrix. The @@ -3583,6 +3597,20 @@ ReadH5AD.H5File <- function(file, assay = 'RNA', verbose = TRUE, ...) { return(object) } +#' List DimReduc objects +#' +#' Lists the names of \code{\link{DimReduc}} objects present in +#' a Seurat object. +#' +#' @param object A Seurat object +#' @return Returns a character vector +#' @export +#' @examples +#' Reductions(object = pbmc_small) +Reductions <- function(object) { + return(FilterObjects(object = object, classes.keep = 'DimReduc')) +} + #' @param reverse Reverse ordering #' @param afxn Function to evaluate each identity class based on; default is #' \code{\link[base]{mean}} diff --git a/man/Assays.Rd b/man/Assays.Rd new file mode 100644 index 000000000..d0f7d5492 --- /dev/null +++ b/man/Assays.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/objects.R +\name{Assays} +\alias{Assays} +\title{List Assay objects} +\usage{ +Assays(object) +} +\arguments{ +\item{object}{A Seurat object} +} +\value{ +Returns a character vector +} +\description{ +Lists the names of \code{\link{Assay}} objects present in +a Seurat object. +} +\examples{ +Assays(object = pbmc_small) +} diff --git a/man/Reductions.Rd b/man/Reductions.Rd new file mode 100644 index 000000000..6f2fa0186 --- /dev/null +++ b/man/Reductions.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/objects.R +\name{Reductions} +\alias{Reductions} +\title{List DimReduc objects} +\usage{ +Reductions(object) +} +\arguments{ +\item{object}{A Seurat object} +} +\value{ +Returns a character vector +} +\description{ +Lists the names of \code{\link{DimReduc}} objects present in +a Seurat object. +} +\examples{ +Reductions(object = pbmc_small) +}