Skip to content

Commit

Permalink
Add functions to list assay and dimreduc names
Browse files Browse the repository at this point in the history
  • Loading branch information
timoast committed Aug 6, 2019
1 parent b95db44 commit 40513f7
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export("VariableFeatures<-")
export(ALRAChooseKPlot)
export(AddMetaData)
export(AddModuleScore)
export(Assays)
export(AugmentPlot)
export(AverageExpression)
export(BarcodeInflectionsPlot)
Expand Down Expand Up @@ -260,6 +261,7 @@ export(Read10X_h5)
export(ReadAlevin)
export(ReadAlevinCsv)
export(ReadH5AD)
export(Reductions)
export(RelativeCounts)
export(RenameCells)
export(RenameIdents)
Expand Down
28 changes: 28 additions & 0 deletions R/objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}}
Expand Down
21 changes: 21 additions & 0 deletions man/Assays.Rd

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

21 changes: 21 additions & 0 deletions man/Reductions.Rd

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

0 comments on commit 40513f7

Please sign in to comment.