Skip to content

Commit

Permalink
update docs, cran checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinHartman committed Nov 9, 2022
1 parent d6d085b commit b23ae2e
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 63 deletions.
8 changes: 1 addition & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Seurat
Version: 4.2.1.9000
Date: 2022-11-07
Date: 2022-11-09
Title: Tools for Single Cell Genomics
Description: A toolkit for quality control, analysis, and exploration of single cell RNA sequencing data. 'Seurat' aims to enable users to identify and interpret sources of heterogeneity from single cell transcriptomic measurements, and to integrate diverse types of single cell data. See Satija R, Farrell J, Gennert D, et al (2015) <doi:10.1038/nbt.3192>, Macosko E, Basu A, Satija R, et al (2015) <doi:10.1016/j.cell.2015.05.002>, Stuart T, Butler A, et al (2019) <doi:10.1016/j.cell.2019.05.031>, and Hao, Hao, et al (2020) <doi:10.1101/2020.10.12.335331> for more details.
Authors@R: c(
Expand All @@ -24,7 +24,6 @@ Authors@R: c(
)
URL: https://satijalab.org/seurat, https://github.com/satijalab/seurat
BugReports: https://github.com/satijalab/seurat/issues
Remotes: mojaveazure/seurat-object@develop
Depends:
R (>= 4.0.0),
methods
Expand Down Expand Up @@ -67,13 +66,8 @@ Imports:
Rtsne,
scales,
scattermore (>= 0.7),
<<<<<<< HEAD
sctransform (>= 0.3.4),
SeuratObject (>= 4.1.2.9003),
=======
sctransform (>= 0.3.5),
SeuratObject (>= 4.1.3),
>>>>>>> develop
shiny,
spatstat.explore,
spatstat.geom,
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ importFrom(SeuratObject,"Misc<-")
importFrom(SeuratObject,"Project<-")
importFrom(SeuratObject,"Tool<-")
importFrom(SeuratObject,"VariableFeatures<-")
importFrom(SeuratObject,.DefaultFOV)
importFrom(SeuratObject,AddMetaData)
importFrom(SeuratObject,Assays)
importFrom(SeuratObject,AttachDeps)
Expand All @@ -443,6 +442,7 @@ importFrom(SeuratObject,CreateSeuratObject)
importFrom(SeuratObject,DefaultAssay)
importFrom(SeuratObject,DefaultBoundary)
importFrom(SeuratObject,DefaultDimReduc)
importFrom(SeuratObject,DefaultFOV)
importFrom(SeuratObject,Distances)
importFrom(SeuratObject,Embeddings)
importFrom(SeuratObject,Features)
Expand Down Expand Up @@ -640,6 +640,7 @@ importFrom(matrixStats,rowSums2)
importFrom(methods,"slot<-")
importFrom(methods,.hasSlot)
importFrom(methods,as)
importFrom(methods,getMethod)
importFrom(methods,is)
importFrom(methods,new)
importFrom(methods,setAs)
Expand Down
19 changes: 16 additions & 3 deletions R/preprocessing.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ NULL
# Functions
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

globalVariables(
names = c('fov', 'cell_ID'),
package = 'Seurat',
add = TRUE
)
#' Calculate the Barcode Distribution Inflection
#'
#' This function calculates an adaptive inflection point ("knee") of the barcode distribution
Expand Down Expand Up @@ -1591,6 +1596,11 @@ ReadMtx <- function(
#' \item \dQuote{centroids}: cell centroids in pixel coordinate space
#' \item \dQuote{segmentations}: cell segmentations in pixel coordinate space
#' }
#' @param mol.type Type of molecule spatial coordinate matrices to read;
#' choose one or more of:
#' \itemize{
#' \item \dQuote{pixels}: molecule coordinates in pixel space
#' }
#' @param metadata Type of available metadata to read;
#' choose zero or more of:
#' \itemize{
Expand Down Expand Up @@ -2040,9 +2050,12 @@ ReadSlideSeq <- function(coord.file, assay = 'Spatial') {
#' @examples
#' \dontrun{
#' coords <- ReadVitessce(
#' counts = "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.genes.json",
#' coords = "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.cells.json",
#' molecules = "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.molecules.json"
#' counts =
#' "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.genes.json",
#' coords =
#' "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.cells.json",
#' molecules =
#' "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.molecules.json"
#' )
#' names(coords)
#' coords$counts[1:10, 1:10]
Expand Down
46 changes: 14 additions & 32 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -2270,24 +2270,25 @@ PolyFeaturePlot <- function(
#' Names should be the names of FOVs and values should be the names of
#' segmentation boundaries
#' @param molecules A vector of molecules to plot
#' @param nmols Max number of each molecule specified in `molecules` to plot
#' @param dark.background Set plot background to black
#' @param crop Crop the plots to area with cells only
#' @param overlap Overlay boundaries from a single image to create a single
#' plot; if \code{TRUE}, then boundaries are stacked in the order they're
#' given (first is lowest)
#' @param axes Keep axes and panel background
#' @param combine Combine plots into a single
#' \code{\link[patchwork]{patchworked}} ggplot object.If \code{FALSE},
#' \code{patchwork} ggplot object.If \code{FALSE},
#' return a list of ggplot objects
#' @param coord.fixed Plot cartesian coordinates with fixed aspect ratio
#'
#' @return If \code{combine = TRUE}, a \code{\link[patchwork]{patchwork}ed}
#' @return If \code{combine = TRUE}, a \code{patchwork}
#' ggplot object; otherwise, a list of ggplot objects
#'
#' @importFrom rlang !! is_na sym
#' @importFrom patchwork wrap_plots
#' @importFrom ggplot2 element_blank facet_wrap vars
#' @importFrom SeuratObject .DefaultFOV Cells
#' @importFrom SeuratObject DefaultFOV Cells
#' DefaultBoundary FetchData Images Overlay
#'
#' @export
Expand Down Expand Up @@ -2513,7 +2514,7 @@ ImageDimPlot <- function(
#' @importFrom cowplot theme_cowplot
#' @importFrom ggplot2 dup_axis element_blank element_text facet_wrap guides
#' labs margin vars scale_y_continuous theme
#' @importFrom SeuratObject .DefaultFOV Cells DefaultBoundary
#' @importFrom SeuratObject DefaultFOV Cells DefaultBoundary
#' FetchData Images Overlay
#'
#' @export
Expand Down Expand Up @@ -2548,8 +2549,7 @@ ImageFeaturePlot <- function(
overlap = FALSE,
axes = FALSE,
combine = TRUE,
coord.fixed = TRUE,
...
coord.fixed = TRUE
) {
cells <- cells %||% Cells(x = object)
scale <- scale[[1L]]
Expand Down Expand Up @@ -4681,10 +4681,10 @@ PlotClusterTree <- function(object, direction = "downwards", ...) {
#' @param balanced Return an equal number of genes with + and - scores. If
#' FALSE (default), returns the top genes ranked by the scores absolute values
#' @param ncol Number of columns to display
#' @param combine Combine plots into a single \code{\link[patchwork]{patchwork}ed}
#' @param combine Combine plots into a single \code{patchwork}
#' ggplot object. If \code{FALSE}, return a list of ggplot objects
#'
#' @return A \code{\link[patchwork]{patchwork}ed} ggplot object if
#' @return A \code{patchwork} ggplot object if
#' \code{combine = TRUE}; otherwise, a list of ggplot objects
#'
#' @importFrom patchwork wrap_plots
Expand Down Expand Up @@ -6137,9 +6137,9 @@ WhiteBackground <- function(...) {
#' Prepare Coordinates for Spatial Plots
#'
#' @inheritParams SeuratObject::GetTissueCoordinates
#' @param model A \code{\link{[SeuratObject:Segmentation-class]Segmentation}},
#' \code{\link[SeuratObject:Centroids-class]{Centroids}},
#' or \code{\link[SeuratObject:Molecules-class]{Molecules}} object
#' @param model A \code{\linkS4class{Segmentation}},
#' \code{\linkS4class{Centroids}},
#' or \code{\linkS4class{Molecules}} object
#' @param data Extra data to be used for annotating the cell segmentations; the
#' easiest way to pass data is a one-column
#' \code{\link[base:data.frame]{data frame}} with the values to color by and
Expand Down Expand Up @@ -6182,26 +6182,7 @@ fortify.Molecules <- function(
seed = NA_integer_,
...
) {
return(FetchData(object = object, vars = data, nmols = nmols, seed = seed, ...))
# coords <- GetTissueCoordinates(object = model, features = data)
# if (!is.null(x = nmols)) {
# if (!is.na(x = seed)) {
# set.seed(seed = seed)
# }
# coords <- lapply(
# X = unique(x = coords$molecule),
# FUN = function(m) {
# df <- coords[coords$molecule == m, , drop = FALSE]
# if (nrow(x = df) > nmols) {
# idx <- sample(x = seq_len(length.out = nrow(x = df)), size = nmols)
# df <- df[idx, , drop = FALSE]
# }
# return(df)
# }
# )
# coords <- do.call(what = 'rbind', args = coords)
# }
# return(coords)
return(FetchData(object = model, vars = data, nmols = nmols, seed = seed, ...))
}

#' @rdname fortify-Spatial
Expand Down Expand Up @@ -8977,6 +8958,7 @@ setMethod(
}
)

#' @importFrom methods getMethod
setMethod(
f = '.PrepImageData',
signature = c(data = 'factor', cells = 'rle'),
Expand All @@ -9001,7 +8983,7 @@ setMethod(
f = '.PrepImageData',
signature = c(data = 'NULL', cells = 'rle'),
definition = function(data, cells, ...) {
return(SeuratObject:::EmptyDF(n = sum(cells$lengths)))
return(SeuratObject::EmptyDF(n = sum(cells$lengths)))
}
)

Expand Down
6 changes: 4 additions & 2 deletions man/ImageDimPlot.Rd

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

20 changes: 11 additions & 9 deletions man/ImageFeaturePlot.Rd

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

6 changes: 6 additions & 0 deletions man/ReadNanostring.Rd

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

9 changes: 6 additions & 3 deletions man/ReadVitessce.Rd

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

4 changes: 2 additions & 2 deletions man/VizDimLoadings.Rd

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

6 changes: 3 additions & 3 deletions man/fortify-Spatial.Rd

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

2 changes: 1 addition & 1 deletion man/reexports.Rd

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

0 comments on commit b23ae2e

Please sign in to comment.