diff --git a/.Rbuildignore b/.Rbuildignore index a53e219b..f7bd2a92 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -15,4 +15,7 @@ ^.*\.h5Seurat$ ^.*\.rds$ ^.*\.Rds$ +^LICENSE$ ^data-raw$ +^inst$ +^tests$ diff --git a/DESCRIPTION b/DESCRIPTION index 8ab1cacc..71ba5959 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: SeuratObject Type: Package Title: Data Structures for Single Cell Data -Version: 0.0.0.9000 -Date: 2020-08-10 +Version: 4.0.0 +Date: 2021-01-07 Authors@R: c( person(given = 'Rahul', family = 'Satija', email = 'rsatija@nygenome.org', role = 'aut', comment = c(ORCID = '0000-0001-9448-8833')), person(given = 'Andrew', family = 'Butler', email = 'abutler@nygenome.org', role = 'aut', comment = c(ORCID = '0000-0003-3608-0463')), @@ -17,12 +17,16 @@ Authors@R: c( Description: Defines S4 classes for single-cell genomic data and associated information, such as dimensionality reduction embeddings, nearest-neighbor graphs, and spatially-resolved coordinates. Provides data access methods and - R-native hooks to ensure the Seurat object is familiar to other R users. -URL: http://www.satijalab.org/seurat, + R-native hooks to ensure the Seurat object is familiar to other R users. See + Satija R, Farrell J, Gennert D, et al (2015) , + Macosko E, Basu A, Satija R, et al (2015) , + and Stuart T, Butler A, et al (2019) for + more details. +URL: https://satijalab.org/seurat, https://github.com/mojaveazure/seurat-object BugReports: https://github.com/mojaveazure/seurat-object/issues -License: GPL-3 | file LICENSE +License: GPL-3 Encoding: UTF-8 LazyData: true RoxygenNote: 7.1.1 diff --git a/R/assay.R b/R/assay.R index d28391a0..cd87c3c1 100644 --- a/R/assay.R +++ b/R/assay.R @@ -68,6 +68,8 @@ Assay <- setClass( #' @param min.features Include cells where at least this many features are #' detected. #' +#' @return A \code{\link{Assay}} object +#' #' @importFrom methods as #' @importFrom Matrix colSums rowSums #' @@ -1173,6 +1175,8 @@ setMethod( #' #' @keywords internal #' +#' @noRd +#' #' @examples #' \donttest{ #' calcn <- SeuratObject:::CalcN(pbmc_small[["RNA"]]) @@ -1197,6 +1201,8 @@ CalcN <- function(object) { #' #' @keywords internal #' +#' @noRd +#' IsSCT <- function(assay) { if (is.list(x = assay)) { sct.check <- lapply(X = assay, FUN = function(x) { @@ -1215,6 +1221,8 @@ IsSCT <- function(assay) { #' #' @keywords internal #' +#' @noRd +#' SubsetVST <- function(sct.info, cells, features) { cells.keep <- intersect(x = cells, y = rownames(x = sct.info$cell_attr)) sct.info$cell_attr <- sct.info$cell_attr[cells.keep, ] @@ -1241,6 +1249,8 @@ SubsetVST <- function(sct.info, cells, features) { #' #' @keywords internal #' +#' @noRd +#' ValidateDataForMerge <- function(assay, slot) { mat <- GetAssayData(object = assay, slot = slot) if (any(dim(x = mat) == c(0, 0))) { diff --git a/R/dimreduc.R b/R/dimreduc.R index 1c028bec..e7e81e52 100644 --- a/R/dimreduc.R +++ b/R/dimreduc.R @@ -66,6 +66,8 @@ DimReduc <- setClass( #' @param misc list for the user to store any additional information associated #' with the dimensional reduction #' +#' @return A \code{\link{DimReduc}} object +#' #' @aliases SetDimReduction #' #' @export @@ -777,6 +779,8 @@ setMethod( #' #' @keywords internal #' +#' @noRd +#' Projected <- function(object) { return(!IsMatrixEmpty(x = Loadings(object = object, projected = TRUE))) } diff --git a/R/generics.R b/R/generics.R index 32b31cca..fe38023c 100644 --- a/R/generics.R +++ b/R/generics.R @@ -10,7 +10,9 @@ NULL #' variance). To add cell level information, add to the Seurat object. If adding #' feature-level metadata, add to the Assay object (e.g. \code{object[["RNA"]]}) #' -#' @inheritParams .AddMetaData +#' @param object An object +#' @param metadata A vector, list, or data.frame with metadata to add +#' @param col.name A name for meta data if not a named list or data.frame #' #' @return \code{object} with metadata added #' @@ -79,6 +81,8 @@ as.Neighbor <- function(x, ...) { #' @param x An object to convert to class \code{Seurat} #' @param ... Arguments passed to other methods #' +#' @return A \code{\link{Seurat}} object generated from \code{x} +#' #' @rdname as.Seurat #' @export as.Seurat #' @@ -218,6 +222,8 @@ DefaultAssay <- function(object, ...) { #' @param object An object #' @param ... Arguments passed to other methods #' +#' @return The distance matrix +#' #' @rdname Distances #' @export Distances #' @@ -232,6 +238,8 @@ Distances <- function(object, ...) { #' @param object An object #' @param ... Arguments passed to other methods #' +#' @return The embeddings matrix +#' #' @rdname Embeddings #' @export Embeddings #' @@ -475,6 +483,9 @@ IsGlobal <- function(object, ...) { #' @param object An object #' @param ... Arguments passed to other methods #' +#' @return \code{JS}: either a \code{\link{JackStrawData}} object or the +#' specified jackstraw data +#' #' @rdname JS #' @export JS #' @@ -486,6 +497,8 @@ JS <- function(object, ...) { #' @param value JackStraw information #' +#' @return \code{JS<-}: \code{object} with the update jackstraw information +#' #' @rdname JS #' @export JS<- #' @@ -498,6 +511,8 @@ JS <- function(object, ...) { #' @param object An object #' @param ... Arguments passed to other methods #' +#' @return \code{Key}: the object key +#' #' @rdname Key #' @export Key #' @@ -509,6 +524,8 @@ Key <- function(object, ...) { #' @param value Key value #' +#' @return \code{Key<-}: \code{object} with an updated key +#' #' @rdname Key #' @export Key<- #' @@ -523,6 +540,8 @@ Key <- function(object, ...) { #' @param object An object #' @param ... Arguments passed to other methods #' +#' @return \code{Loadings}: the feature loadings for \code{object} +#' #' @rdname Loadings #' @export Loadings #' @@ -534,6 +553,8 @@ Loadings <- function(object, ...) { #' @param value Feature loadings to add #' +#' @return \code{Loadings<-}: \code{object} with the updated loadings +#' #' @rdname Loadings #' @export Loadings<- #' @@ -724,6 +745,8 @@ StashIdent <- function(object, save.name, ...) { #' @param object An object #' @param ... Arguments passed to other methods #' +#' @return The standard deviations +#' #' @rdname Stdev #' @export Stdev #' diff --git a/R/seurat.R b/R/seurat.R index a0d150e6..c8d492ef 100644 --- a/R/seurat.R +++ b/R/seurat.R @@ -2990,6 +2990,8 @@ setMethod( #' #' @keywords internal #' +#' @noRd +#' #' @examples #' \donttest{ #' SeuratObject:::Collections(pbmc_small) @@ -3022,6 +3024,8 @@ Collections <- function(object) { #' #' @keywords internal #' +#' @noRd +#' DefaultImage <- function(object) { object <- UpdateSlots(object = object) images <- Images(object = object, assay = DefaultAssay(object = object)) @@ -3041,6 +3045,8 @@ DefaultImage <- function(object) { #' #' @keywords internal #' +#' @noRd +#' FilterObjects <- function(object, classes.keep = c('Assay', 'DimReduc')) { object <- UpdateSlots(object = object) slots <- na.omit(object = Filter( @@ -3080,6 +3086,8 @@ FilterObjects <- function(object, classes.keep = c('Assay', 'DimReduc')) { #' #' @keywords internal #' +#' @noRd +#' #' @examples #' \donttest{ #' SeuratObject:::FindObject(pbmc_small, name = "RNA") @@ -3133,6 +3141,8 @@ FindObject <- function(object, name) { #' #' @seealso \code{\link[sctransform]{get_residuals}} #' +#' @noRd +#' #' @examples #' \dontrun{ #' pbmc_small <- SCTransform(pbmc_small, variable.features.n = 20) @@ -3377,6 +3387,8 @@ GetResidualVstOut <- function( #' #' @keywords internal #' +#' @noRd +#' UpdateAssay <- function(old.assay, assay) { cells <- colnames(x = old.assay@data) counts <- old.assay@raw.data @@ -3405,7 +3417,7 @@ UpdateAssay <- function(old.assay, assay) { #' #' @rdname V2Update #' -#' @keywords internal +#' @noRd #' UpdateDimReduction <- function(old.dr, assay) { new.dr <- list() @@ -3453,6 +3465,8 @@ UpdateDimReduction <- function(old.dr, assay) { #' #' @keywords internal #' +#' @noRd +#' UpdateJackstraw <- function(old.jackstraw) { if (is.null(x = old.jackstraw)) { new.jackstraw <- new( diff --git a/R/spatial.R b/R/spatial.R index 4481fea1..7379e1c9 100644 --- a/R/spatial.R +++ b/R/spatial.R @@ -374,6 +374,8 @@ setMethod( #' #' @keywords internal #' +#' @noRd +#' NullImage <- function(mode = c('grob', 'raster', 'plotly', 'raw')) { mode <- mode[1] mode <- match.arg(arg = mode) diff --git a/R/utils.R b/R/utils.R index 87853f78..1b1c9082 100644 --- a/R/utils.R +++ b/R/utils.R @@ -321,6 +321,8 @@ S4ToList.list <- function(object) { #' #' @keywords internal #' +#' @noRd +#' CheckDots <- function(..., fxns = NULL) { args.names <- names(x = list(...)) if (length(x = list(...)) == 0) { @@ -460,6 +462,8 @@ CheckDots <- function(..., fxns = NULL) { #' #' @keywords internal #' +#' @noRd +#' CheckDuplicateCellNames <- function(object.list, verbose = TRUE, stop = FALSE) { cell.names <- unlist(x = lapply(X = object.list, FUN = colnames)) if (any(duplicated(x = cell.names))) { @@ -497,6 +501,8 @@ CheckDuplicateCellNames <- function(object.list, verbose = TRUE, stop = FALSE) { #' #' @keywords internal #' +#' @noRd +#' #' @examples #' \donttest{ #' SeuratObject:::ExtractField('Hello World', field = 1, delim = '_') @@ -526,6 +532,8 @@ ExtractField <- function(string, field = 1, delim = "_") { #' #' @keywords internal #' +#' @noRd +#' #' @examples #' \donttest{ #' SeuratObject:::IsMatrixEmpty(new("matrix")) @@ -553,6 +561,8 @@ IsMatrixEmpty <- function(x) { #' #' @keywords internal #' +#' @noRd +#' IsNullPtr <- function(x) { stopifnot(is(object = x, class2 = 'externalptr')) return(.Call('isnull', x)) @@ -572,6 +582,8 @@ IsNullPtr <- function(x) { #' #' @keywords internal #' +#' @noRd +#' #' @examples #' \dontrun{ #' set.seed(42L) @@ -608,6 +620,8 @@ RandomName <- function(length = 5L, ...) { #' #' @seealso \code{\link{s4list}} #' +#' @noRd +#' SwapClassPkg <- function(x, from = NULL, to = NULL) { if (!inherits(x = x, what = 'list')) { return(x) @@ -659,6 +673,8 @@ SwapClassPkg <- function(x, from = NULL, to = NULL) { #' #' @keywords internal #' +#' @noRd +#' Top <- function(data, num = 20, balanced = FALSE) { nr <- nrow(x = data) if (num > nr) { @@ -699,6 +715,8 @@ Top <- function(data, num = 20, balanced = FALSE) { #' #' @keywords internal #' +#' @noRd +#' UpdateClassPkg <- function(object, from = NULL, to = NULL) { if (!isS4(object)) { return(object) @@ -719,6 +737,8 @@ UpdateClassPkg <- function(object, from = NULL, to = NULL) { #' #' @keywords internal #' +#' @noRd +#' UpdateSlots <- function(object) { object.list <- sapply( X = slotNames(x = object), @@ -759,6 +779,8 @@ UpdateSlots <- function(object) { #' #' @keywords internal #' +#' @noRd +#' UpdateKey <- function(key) { if (grepl(pattern = '^[[:alnum:]]+_$', x = key)) { return(key) diff --git a/R/zzz.R b/R/zzz.R index fff6a20a..4c6c0d32 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -60,6 +60,8 @@ setOldClass(Classes = 'package_version') #' #' @keywords internal #' +#' @noRd +#' .AddMetaData <- function(object, metadata, col.name = NULL) { if (is.null(x = col.name) && is.atomic(x = metadata)) { stop("'col.name' must be provided for atomic metadata types (eg. vectors)") @@ -88,6 +90,8 @@ setOldClass(Classes = 'package_version') #' #' @keywords internal #' +#' @noRd +#' .Misc <- function(object, slot = NULL, ...) { CheckDots(...) if (is.null(x = slot)) { @@ -103,6 +107,8 @@ setOldClass(Classes = 'package_version') #' #' @rdname dot-Misc #' +#' @noRd +#' ".Misc<-" <- function(object, slot, ..., value) { CheckDots(...) if (slot %in% names(x = Misc(object = object))) { diff --git a/README.Rmd b/README.Rmd index 09a65fa9..b285ace0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -47,8 +47,10 @@ color <- c("experimental" = "orange", "maturing" = "blue", "stable" = "brightgre # SeuratObject -[![CRAN/METACRAN](https://img.shields.io/cran/v/`r pkg`)](`r paste0(cran.cannoncial, pkg)`) [![Lifecycle](https://img.shields.io/badge/lifecycle-`r stage`-`r color`.svg)](`r github.url`) +[![CRAN/METACRAN](https://img.shields.io/cran/v/`r pkg`)](`r paste0(cran.cannoncial, pkg)`) +[![dependencies](https://tinyverse.netlify.com/badge/`r pkg`)](`r paste0(cran.cannoncial, pkg)`) +[![Downloads](https://cranlogs.r-pkg.org/badges/`r pkg`?color=brightgreen)](`r paste0(cran.cannoncial, pkg)`) ```{r description, echo=FALSE, results='asis'} @@ -57,12 +59,8 @@ cat(gsub(pattern = '\n', replacement = ' ', x = description[, "Description"])) ## Installation -`r pkg` is not currently available on CRAN. -You can install it from [GitHub](`r github.url`) with: +`r pkg` is available on CRAN -``` r -if (!requireNamespace("remotes", quietly = TRUE)) { - install.packages("remotes") -} -remotes::install_github("mojaveazure/seurat-object") +```r +install.packages("SeuratObject") ``` diff --git a/README.md b/README.md index b8035b35..52f85e60 100644 --- a/README.md +++ b/README.md @@ -5,24 +5,25 @@ +[![Lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://github.com/mojaveazure/seurat-object) [![CRAN/METACRAN](https://img.shields.io/cran/v/SeuratObject)](https://cran.r-project.org/package=SeuratObject) -[![Lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://github.com/mojaveazure/seurat-object) +[![dependencies](https://tinyverse.netlify.com/badge/SeuratObject)](https://cran.r-project.org/package=SeuratObject) +[![Downloads](https://cranlogs.r-pkg.org/badges/SeuratObject?color=brightgreen)](https://cran.r-project.org/package=SeuratObject) Defines S4 classes for single-cell genomic data and associated information, such as dimensionality reduction embeddings, nearest-neighbor graphs, and spatially-resolved coordinates. Provides data access methods and R-native hooks to ensure the Seurat object is -familiar to other R users. +familiar to other R users. See Satija R, Farrell J, Gennert D, et al +(2015) , Macosko E, Basu A, Satija R, et al (2015) +, and Stuart T, Butler A, et al (2019) + for more details. ## Installation -SeuratObject is not currently available on CRAN. You can install it from -[GitHub](https://github.com/mojaveazure/seurat-object) with: +SeuratObject is available on CRAN ``` r -if (!requireNamespace("remotes", quietly = TRUE)) { - install.packages("remotes") -} -remotes::install_github("mojaveazure/seurat-object") +install.packages("SeuratObject") ``` diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 00000000..b42113b4 --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,18 @@ +# SeuratObject v4.0.0 + +## Test environments +* local ubuntu 20.04 install, R 4.0.3 +* local macOS 10.14.6 install, R 4.0.2 +* win-builder (oldrelease, release, devel) + +## R CMD check results + +There were no ERRORs or WARNINGs + +There was 1 NOTE: + +* This is a new release. + +## Downstream dependencies + +There are no packages that import or depend on SeuratObject diff --git a/man/CalcN.Rd b/man/CalcN.Rd deleted file mode 100644 index abe09331..00000000 --- a/man/CalcN.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/assay.R -\name{CalcN} -\alias{CalcN} -\title{Calculate nCount and nFeature} -\usage{ -CalcN(object) -} -\arguments{ -\item{object}{An \code{\link{Assay}} object} -} -\value{ -A named list with nCount and nFeature -} -\description{ -Calculate nCount and nFeature -} -\examples{ -\donttest{ -calcn <- SeuratObject:::CalcN(pbmc_small[["RNA"]]) -head(as.data.frame(calcn)) -} - -} -\keyword{internal} diff --git a/man/CheckDots.Rd b/man/CheckDots.Rd deleted file mode 100644 index bf366685..00000000 --- a/man/CheckDots.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{CheckDots} -\alias{CheckDots} -\title{Check the use of dots} -\usage{ -CheckDots(..., fxns = NULL) -} -\arguments{ -\item{...}{Arguments passed to a function that fall under \code{...}} - -\item{fxns}{A list/vector of functions or function names} -} -\value{ -... -} -\description{ -Check the use of dots -} -\keyword{internal} diff --git a/man/CheckDuplicateCellNames.Rd b/man/CheckDuplicateCellNames.Rd deleted file mode 100644 index 730b09cd..00000000 --- a/man/CheckDuplicateCellNames.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{CheckDuplicateCellNames} -\alias{CheckDuplicateCellNames} -\title{Check a list of objects for duplicate cell names} -\usage{ -CheckDuplicateCellNames(object.list, verbose = TRUE, stop = FALSE) -} -\arguments{ -\item{object.list}{List of Seurat objects} - -\item{verbose}{Print message about renaming} - -\item{stop}{Error out if any duplicate names exist} -} -\value{ -Returns list of objects with duplicate cells renamed to be unique -} -\description{ -Check a list of objects for duplicate cell names -} -\keyword{internal} diff --git a/man/Collections.Rd b/man/Collections.Rd deleted file mode 100644 index 3c14c1b6..00000000 --- a/man/Collections.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/seurat.R -\name{Collections} -\alias{Collections} -\title{Object Collections} -\usage{ -Collections(object) -} -\arguments{ -\item{object}{An S4 object} -} -\value{ -A vector with the names of slots that are a list -} -\description{ -Find the names of collections in an object -} -\examples{ -\donttest{ -SeuratObject:::Collections(pbmc_small) -} - -} -\keyword{internal} diff --git a/man/CreateAssayObject.Rd b/man/CreateAssayObject.Rd index 7f83529a..d792d1e5 100644 --- a/man/CreateAssayObject.Rd +++ b/man/CreateAssayObject.Rd @@ -18,6 +18,9 @@ new object with a lower cutoff.} \item{min.features}{Include cells where at least this many features are detected.} } +\value{ +A \code{\link{Assay}} object +} \description{ Create an Assay object from a feature (e.g. gene) expression matrix. The expected format of the input matrix is features x cells. diff --git a/man/CreateDimReducObject.Rd b/man/CreateDimReducObject.Rd index 99304a99..812c149a 100644 --- a/man/CreateDimReducObject.Rd +++ b/man/CreateDimReducObject.Rd @@ -38,6 +38,9 @@ specific DimReduc} \item{misc}{list for the user to store any additional information associated with the dimensional reduction} } +\value{ +A \code{\link{DimReduc}} object +} \description{ Create a DimReduc object } diff --git a/man/DefaultImage.Rd b/man/DefaultImage.Rd deleted file mode 100644 index c9ca18c0..00000000 --- a/man/DefaultImage.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/seurat.R -\name{DefaultImage} -\alias{DefaultImage} -\title{Get the default image of an object} -\usage{ -DefaultImage(object) -} -\arguments{ -\item{object}{A \code{\link{Seurat}} object} -} -\value{ -The name of the default image -} -\description{ -Attempts to find all images associated with the default assay of the object. -If none present, finds all images present in the object. Returns the name of -the first image -} -\keyword{internal} diff --git a/man/Distances.Rd b/man/Distances.Rd index 1442b3cf..ab74c5b1 100644 --- a/man/Distances.Rd +++ b/man/Distances.Rd @@ -14,6 +14,9 @@ Distances(object, ...) \item{...}{Arguments passed to other methods} } +\value{ +The distance matrix +} \description{ Get the Neighbor nearest neighbors distance matrix } diff --git a/man/Embeddings.Rd b/man/Embeddings.Rd index ddbe0eb8..a8e98e18 100644 --- a/man/Embeddings.Rd +++ b/man/Embeddings.Rd @@ -19,6 +19,9 @@ Embeddings(object, ...) \item{reduction}{Name of reduction to pull cell embeddings for} } +\value{ +The embeddings matrix +} \description{ Get Cell Embeddings } diff --git a/man/ExtractField.Rd b/man/ExtractField.Rd deleted file mode 100644 index e4137489..00000000 --- a/man/ExtractField.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{ExtractField} -\alias{ExtractField} -\title{Extract delimiter information from a string.} -\usage{ -ExtractField(string, field = 1, delim = "_") -} -\arguments{ -\item{string}{String to parse.} - -\item{field}{Integer(s) indicating which field(s) to extract. Can be a -vector multiple numbers.} - -\item{delim}{Delimiter to use, set to underscore by default.} -} -\value{ -A new string, that parses out the requested fields, and -(if multiple), rejoins them with the same delimiter -} -\description{ -Parses a string (usually a cell name) and extracts fields based - on a delimiter -} -\examples{ -\donttest{ -SeuratObject:::ExtractField('Hello World', field = 1, delim = '_') -} - -} -\keyword{internal} diff --git a/man/FilterObjects.Rd b/man/FilterObjects.Rd deleted file mode 100644 index b72b83a7..00000000 --- a/man/FilterObjects.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/seurat.R -\name{FilterObjects} -\alias{FilterObjects} -\title{Get the names of objects within a Seurat object that are of a certain class} -\usage{ -FilterObjects(object, classes.keep = c("Assay", "DimReduc")) -} -\arguments{ -\item{object}{A \code{\link{Seurat}} object} - -\item{classes.keep}{A vector of names of classes to get} -} -\value{ -A vector with the names of objects within the Seurat object that are -of class \code{classes.keep} -} -\description{ -Get the names of objects within a Seurat object that are of a certain class -} -\keyword{internal} diff --git a/man/FindObject.Rd b/man/FindObject.Rd deleted file mode 100644 index 3e291021..00000000 --- a/man/FindObject.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/seurat.R -\name{FindObject} -\alias{FindObject} -\title{Find the collection of an object within a Seurat object} -\usage{ -FindObject(object, name) -} -\arguments{ -\item{object}{A \code{\link{Seurat}} object} - -\item{name}{Name of object to find} -} -\value{ -The collection (slot) of the object -} -\description{ -Find the collection of an object within a Seurat object -} -\examples{ -\donttest{ -SeuratObject:::FindObject(pbmc_small, name = "RNA") -} - -} -\keyword{internal} diff --git a/man/GetResidual.Rd b/man/GetResidual.Rd deleted file mode 100644 index 4c54507b..00000000 --- a/man/GetResidual.Rd +++ /dev/null @@ -1,51 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/seurat.R -\name{GetResidual} -\alias{GetResidual} -\title{Calculate pearson residuals of features not in the scale.data} -\usage{ -GetResidual( - object, - features, - assay = "SCT", - umi.assay = NULL, - clip.range = NULL, - replace.value = FALSE, - verbose = TRUE -) -} -\arguments{ -\item{object}{A seurat object} - -\item{features}{Name of features to add into the scale.data} - -\item{assay}{Name of the assay of the seurat object generated by SCTransform} - -\item{umi.assay}{Name of the assay of the seurat object containing UMI matrix and the default is -RNA} - -\item{clip.range}{Numeric of length two specifying the min and max values the Pearson residual -will be clipped to} - -\item{replace.value}{Recalculate residuals for all features, even if they are already present. -Useful if you want to change the clip.range.} - -\item{verbose}{Whether to print messages and progress bars} -} -\value{ -Returns a Seurat object containing pearson residuals of added features in its scale.data -} -\description{ -This function calls sctransform::get_residuals. -} -\examples{ -\dontrun{ -pbmc_small <- SCTransform(pbmc_small, variable.features.n = 20) -pbmc_small <- GetResidual(pbmc_small, features = c('MS4A1', 'TCL1A')) -} - -} -\seealso{ -\code{\link[sctransform]{get_residuals}} -} -\keyword{internal} diff --git a/man/IsMatrixEmpty.Rd b/man/IsMatrixEmpty.Rd deleted file mode 100644 index 3a4ee3d0..00000000 --- a/man/IsMatrixEmpty.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{IsMatrixEmpty} -\alias{IsMatrixEmpty} -\title{Check if a matrix is empty} -\usage{ -IsMatrixEmpty(x) -} -\arguments{ -\item{x}{A matrix} -} -\value{ -Whether or not \code{x} is empty -} -\description{ -Takes a matrix and asks if it's empty (either 0x0 or 1x1 with a value of NA) -} -\examples{ -\donttest{ -SeuratObject:::IsMatrixEmpty(new("matrix")) -SeuratObject:::IsMatrixEmpty(matrix()) -SeuratObject:::IsMatrixEmpty(matrix(1:3)) -} - -} -\keyword{internal} diff --git a/man/IsNullPtr.Rd b/man/IsNullPtr.Rd deleted file mode 100644 index c5c3f2dd..00000000 --- a/man/IsNullPtr.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{IsNullPtr} -\alias{IsNullPtr} -\title{Test Null Pointers} -\usage{ -IsNullPtr(x) -} -\arguments{ -\item{x}{An \link[methods:externalptr-class]{external pointer} object} -} -\value{ -\code{TRUE} if \code{x} is a null pointer, otherwise \code{FALSE} -} -\description{ -Check to see if a C++ pointer is a null pointer on the compiled side -} -\references{ -\url{https://stackoverflow.com/questions/26666614/how-do-i-check-if-an-externalptr-is-null-from-within-r} -} -\keyword{internal} diff --git a/man/IsSCT.Rd b/man/IsSCT.Rd deleted file mode 100644 index 0492f2a4..00000000 --- a/man/IsSCT.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/assay.R -\name{IsSCT} -\alias{IsSCT} -\title{Check whether an assay has been processed by sctransform} -\usage{ -IsSCT(assay) -} -\arguments{ -\item{assay}{assay to check} -} -\value{ -Boolean -} -\description{ -Check whether an assay has been processed by sctransform -} -\keyword{internal} diff --git a/man/JS.Rd b/man/JS.Rd index 6ccf9230..a165f30f 100644 --- a/man/JS.Rd +++ b/man/JS.Rd @@ -31,6 +31,12 @@ JS(object, ...) <- value \item{slot}{Name of slot to store JackStraw scores to Can shorten to 'empirical', 'fake', 'full', or 'overall'} } +\value{ +\code{JS}: either a \code{\link{JackStrawData}} object or the +specified jackstraw data + +\code{JS<-}: \code{object} with the update jackstraw information +} \description{ Get and set JackStraw information } diff --git a/man/Key.Rd b/man/Key.Rd index 0d47b37f..6c4dc04c 100644 --- a/man/Key.Rd +++ b/man/Key.Rd @@ -31,6 +31,11 @@ Key(object, ...) <- value \item{value}{Key value} } +\value{ +\code{Key}: the object key + +\code{Key<-}: \code{object} with an updated key +} \description{ Get and set object keys } diff --git a/man/Loadings.Rd b/man/Loadings.Rd index 8674150a..dff69d03 100644 --- a/man/Loadings.Rd +++ b/man/Loadings.Rd @@ -29,6 +29,11 @@ Loadings(object, ...) <- value \item{reduction}{Name of reduction to pull feature loadings for} } +\value{ +\code{Loadings}: the feature loadings for \code{object} + +\code{Loadings<-}: \code{object} with the updated loadings +} \description{ Get and set feature loadings } diff --git a/man/NullImage.Rd b/man/NullImage.Rd deleted file mode 100644 index 78d24c35..00000000 --- a/man/NullImage.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/spatial.R -\name{NullImage} -\alias{NullImage} -\title{Return a null image} -\usage{ -NullImage(mode = c("grob", "raster", "plotly", "raw")) -} -\arguments{ -\item{mode}{How to return the image; should accept one of \dQuote{grob}, -\dQuote{raster}, \dQuote{plotly}, or \dQuote{raw}} -} -\value{ -Varies by value of \code{mode}: -\describe{ - \item{\dQuote{grob}}{a \code{\link[grid]{nullGrob}}} - \item{\dQuote{raster}}{an empty \code{\link[grDevices:as.raster]{raster}}} - \item{\dQuote{plotly}}{a list with one named item: \code{value = FALSE}} - \item{\dQuote{raw}}{returns \code{NULL}} -} -} -\description{ -Return a null image -} -\keyword{internal} diff --git a/man/Projected.Rd b/man/Projected.Rd deleted file mode 100644 index 8eb8ff3a..00000000 --- a/man/Projected.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dimreduc.R -\name{Projected} -\alias{Projected} -\title{Check to see if projected loadings have been set} -\usage{ -Projected(object) -} -\arguments{ -\item{object}{a DimReduc object} -} -\value{ -TRUE if projected loadings have been set, else FALSE -} -\description{ -Check to see if projected loadings have been set -} -\keyword{internal} diff --git a/man/RandomName.Rd b/man/RandomName.Rd deleted file mode 100644 index 723ed177..00000000 --- a/man/RandomName.Rd +++ /dev/null @@ -1,32 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{RandomName} -\alias{RandomName} -\title{Generate a random name} -\usage{ -RandomName(length = 5L, ...) -} -\arguments{ -\item{length}{How long should the name be} - -\item{...}{Extra parameters passed to \code{\link[base]{sample}}} -} -\value{ -A character with \code{nchar == length} of randomly sampled letters -} -\description{ -Make a name from randomly sampled lowercase letters, pasted together with no -spaces or other characters -} -\examples{ -\dontrun{ -set.seed(42L) -SeuratObject:::RandomName() -SeuratObject:::RandomName(7L, replace = TRUE) -} - -} -\seealso{ -\code{\link[base]{sample}} -} -\keyword{internal} diff --git a/man/SeuratObject-package.Rd b/man/SeuratObject-package.Rd index e1dd0c78..75f8f7e8 100644 --- a/man/SeuratObject-package.Rd +++ b/man/SeuratObject-package.Rd @@ -9,12 +9,16 @@ Defines S4 classes for single-cell genomic data and associated information, such as dimensionality reduction embeddings, nearest-neighbor graphs, and spatially-resolved coordinates. Provides data access methods and - R-native hooks to ensure the Seurat object is familiar to other R users. + R-native hooks to ensure the Seurat object is familiar to other R users. See + Satija R, Farrell J, Gennert D, et al (2015) , + Macosko E, Basu A, Satija R, et al (2015) , + and Stuart T, Butler A, et al (2019) for + more details. } \seealso{ Useful links: \itemize{ - \item \url{http://www.satijalab.org/seurat} + \item \url{https://satijalab.org/seurat} \item \url{https://github.com/mojaveazure/seurat-object} \item Report bugs at \url{https://github.com/mojaveazure/seurat-object/issues} } diff --git a/man/Stdev.Rd b/man/Stdev.Rd index 032dcbb9..97ae554b 100644 --- a/man/Stdev.Rd +++ b/man/Stdev.Rd @@ -19,6 +19,9 @@ Stdev(object, ...) \item{reduction}{Name of reduction to use} } +\value{ +The standard deviations +} \description{ Get the standard deviations for an object } diff --git a/man/SubsetVST.Rd b/man/SubsetVST.Rd deleted file mode 100644 index 9cc74eb8..00000000 --- a/man/SubsetVST.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/assay.R -\name{SubsetVST} -\alias{SubsetVST} -\title{Subset cells in vst data} -\usage{ -SubsetVST(sct.info, cells, features) -} -\arguments{ -\item{sct.info}{A vst.out list} - -\item{cells}{vector of cells to retain} - -\item{features}{vector of features to retain} -} -\description{ -Subset cells in vst data -} -\keyword{internal} diff --git a/man/Top.Rd b/man/Top.Rd deleted file mode 100644 index ae5ff2de..00000000 --- a/man/Top.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{Top} -\alias{Top} -\title{Get the top} -\usage{ -Top(data, num = 20, balanced = FALSE) -} -\arguments{ -\item{data}{Data to pull the top from} - -\item{num}{Pull top \code{num}} - -\item{balanced}{Pull even amounts of from positive and negative values} -} -\value{ -The top \code{num} -} -\description{ -Get the top -} -\keyword{internal} diff --git a/man/UpdateKey.Rd b/man/UpdateKey.Rd deleted file mode 100644 index 759ab6ac..00000000 --- a/man/UpdateKey.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{UpdateKey} -\alias{UpdateKey} -\title{Update a Key} -\usage{ -UpdateKey(key) -} -\arguments{ -\item{key}{A character to become a Seurat Key} -} -\value{ -An updated Key that's valid for Seurat -} -\description{ -Update a Key -} -\section{\code{Seurat} Object Keys}{ - -blah -} - -\keyword{internal} diff --git a/man/UpdateSlots.Rd b/man/UpdateSlots.Rd deleted file mode 100644 index 8a7a827f..00000000 --- a/man/UpdateSlots.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{UpdateSlots} -\alias{UpdateSlots} -\title{Update slots in an object} -\usage{ -UpdateSlots(object) -} -\arguments{ -\item{object}{An object to update} -} -\value{ -\code{object} with the latest slot definitions -} -\description{ -Update slots in an object -} -\keyword{internal} diff --git a/man/V2Update.Rd b/man/V2Update.Rd deleted file mode 100644 index 32d2c3d9..00000000 --- a/man/V2Update.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/seurat.R -\name{V2Update} -\alias{V2Update} -\alias{UpdateAssay} -\alias{UpdateDimReduction} -\alias{UpdateJackstraw} -\title{Update Seurat v2 Internal Objects} -\usage{ -UpdateAssay(old.assay, assay) - -UpdateDimReduction(old.dr, assay) - -UpdateJackstraw(old.jackstraw) -} -\arguments{ -\item{old.assay, old.dr, old.jackstraw}{Seurat v2 assay, dimensional -reduction, or jackstraw object} - -\item{assay}{Name to store for assay in new object} - -\item{assay.used}{Name of assay used to compute dimension reduction} -} -\value{ -A v3/v4 \code{\link{Assay}}, \code{\link{DimReduc}}, or -\code{\link{JackStrawData}} object -} -\description{ -Helper functions to update old Seurat v2 objects to v3/v4 objects -} -\keyword{internal} diff --git a/man/ValidateDataForMerge.Rd b/man/ValidateDataForMerge.Rd deleted file mode 100644 index b5bfdf60..00000000 --- a/man/ValidateDataForMerge.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/assay.R -\name{ValidateDataForMerge} -\alias{ValidateDataForMerge} -\title{Validate Assay Data for Merge} -\usage{ -ValidateDataForMerge(assay, slot) -} -\arguments{ -\item{assay}{Assay to pull data from} - -\item{slot}{Slot to pull from} -} -\value{ -Returns the data matrix if present (i.e.) not 0x0. Otherwise, -returns an appropriately sized empty sparse matrix -} -\description{ -Pulls the proper data matrix for merging assay data. If the slot is empty, -will return an empty matrix with the proper dimensions from one of the -remaining data slots. -} -\keyword{internal} diff --git a/man/as.Seurat.Rd b/man/as.Seurat.Rd index 520932a2..585e25a5 100644 --- a/man/as.Seurat.Rd +++ b/man/as.Seurat.Rd @@ -11,6 +11,9 @@ as.Seurat(x, ...) \item{...}{Arguments passed to other methods} } +\value{ +A \code{\link{Seurat}} object generated from \code{x} +} \description{ Convert objects to Seurat objects } diff --git a/man/classpkg.Rd b/man/classpkg.Rd deleted file mode 100644 index e08db104..00000000 --- a/man/classpkg.Rd +++ /dev/null @@ -1,48 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{classpkg} -\alias{classpkg} -\alias{SwapClassPkg} -\alias{UpdateClassPkg} -\title{Update a Class's Package} -\usage{ -SwapClassPkg(x, from = NULL, to = NULL) - -UpdateClassPkg(object, from = NULL, to = NULL) -} -\arguments{ -\item{x}{A list with an S4 class definition attribute} - -\item{from}{A vector of one or more packages to limit conversion from} - -\item{to}{A character naming the package to search for new class definitions; -defaults to the package of the function calling this function} - -\item{object}{An S4 object} -} -\value{ -\code{SwapClassPkg}: \code{x} with an updated S4 class -definition attribute - -\code{UpdateClassPkg}: \code{object} with the updated -class definition -} -\description{ -Swap packages for an object's class definition. As classes move between -packages, these functions rescope the namespace of the S4 class. This allows -objects to depend only on the new package for class definitions rather than -both the new and old packages -} -\section{S4 Class Definition Attributes}{ - -S4 classes are scoped to the package and class name. In order to properly -track which class a list is generated from in order to build a new one, -these function use an \code{\link[base:attr]{attribute}} to denote the -class name and package of origin. This attribute is stored as -\dQuote{classDef} and takes the form of \dQuote{\code{package:class}}. -} - -\seealso{ -\code{\link{s4list}} -} -\keyword{internal} diff --git a/man/dot-AddMetaData.Rd b/man/dot-AddMetaData.Rd deleted file mode 100644 index 7856e162..00000000 --- a/man/dot-AddMetaData.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/zzz.R -\name{.AddMetaData} -\alias{.AddMetaData} -\title{Object Metadata} -\usage{ -.AddMetaData(object, metadata, col.name = NULL) -} -\arguments{ -\item{object}{An object} - -\item{metadata}{A vector, list, or data.frame with metadata to add} - -\item{col.name}{A name for meta data if not a named list or data.frame} -} -\value{ -object with metadata added -} -\description{ -Internal \code{\link{AddMetaData}} definition -} -\keyword{internal} diff --git a/man/dot-Misc.Rd b/man/dot-Misc.Rd deleted file mode 100644 index c5ea9207..00000000 --- a/man/dot-Misc.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/zzz.R -\name{.Misc} -\alias{.Misc} -\alias{.Misc<-} -\title{Miscellaneous Data} -\usage{ -.Misc(object, slot = NULL, ...) - -.Misc(object, slot, ...) <- value -} -\arguments{ -\item{object}{An object} - -\item{slot}{Name of miscellaneous data to get or set} - -\item{...}{Arguments passed to other methods} - -\item{value}{Data to add} -} -\value{ -\code{.Misc}: If \code{slot} is \code{NULL}, all miscellaneous -data, otherwise the miscellaneous data for \code{slot} - -\code{.Misc<-}: \code{object} with \code{value} added to the -miscellaneous data slot \code{slot} -} -\description{ -Internal functions for getting and setting miscellaneous data -} -\keyword{internal}