diff --git a/DESCRIPTION b/DESCRIPTION index 06d218a..abcb2d9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: SeuratWrappers Title: Community-Provided Methods and Extensions for the Seurat Object -Version: 0.3.2 -Date: 2023-11-4 +Version: 0.3.3 +Date: 2024-01-19 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')), @@ -9,7 +9,8 @@ Authors@R: c( person(given = 'Tim', family = 'Stuart', email = 'tstuart@nygenome.org', role = 'aut', comment = c(ORCID = '0000-0002-3044-0897')), person(given = "Yuhan", family = "Hao", email = "yhao@nygenome.org", role = "ctb", comment = c(ORCID = "0000-0002-1810-0822")), person(given = "Austin", family = "Hartman", email = "ahartman@nygenome.org", role = "ctb", comment = c(ORCID = "0000-0001-7278-1852")), - person(given = "Gesmira", family = "Molla", email = 'gmolla@nygenome.org', role = 'ctb', comment = c(ORCID = '0000-0002-8628-5056')) + person(given = "Gesmira", family = "Molla", email = 'gmolla@nygenome.org', role = 'ctb', comment = c(ORCID = '0000-0002-8628-5056')), + person(given = "Saket", family = "Choudhary", email = "schoudhary@nygenome.org", role = "ctb", comment = c(ORCID = "0000-0001-5202-7633")) ) Description: SeuratWrappers is a collection of community-provided methods and extensions for Seurat, curated by the Satija Lab at NYGC. These methods @@ -64,7 +65,7 @@ Collate: 'velocity.R' Encoding: UTF-8 LazyData: true -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.0 Suggests: cipr, conos, diff --git a/R/miqc.R b/R/miqc.R index d897bef..099deb5 100644 --- a/R/miqc.R +++ b/R/miqc.R @@ -165,7 +165,6 @@ RunMiQC <- function( #' #' @param object Seurat object #' @details _Function to plot the miQC mixture model stored in a Seurat object. `RunMiQC` must be run prior to plotting._ -#' @return #' @references Hippen et al. (2021) miQC: An adaptive probabilistic framework for quality control of single-cell RNA-sequencing data. bioRxiv doi: 10.1101/2021.03.03.433798 #' #' @importFrom rlang %||% diff --git a/R/scVI.R b/R/scVI.R index bcc426c..b23633b 100644 --- a/R/scVI.R +++ b/R/scVI.R @@ -4,7 +4,7 @@ NULL #' Run scVI in seurat5 #' @param object A merged Seurat object -#' @param groups A one-column data frame with grouping information +#' @param groups Name of the metadata column to be used as the 'batch_key' #' @param features features to use #' @param layers Layers to use #' @param conda_env conda environment to run scVI @@ -61,11 +61,11 @@ scVIIntegration <- function( scipy <- reticulate::import('scipy', convert = FALSE) object <- JoinLayers(object = object, layers = 'counts') adata <- sc$AnnData( - X = scipy$sparse$csr_matrix(Matrix::t(LayerData(object, layers = 'counts')[features ,]) ), #scVI requires raw counts - obs = groups, - var = object[][features,] + X = scipy$sparse$csr_matrix(Matrix::t(LayerData(object, layer = 'counts')[features ,]) ), #scVI requires raw counts + obs = object[[]], + var = object[[DefaultAssay(object)]][[]][features,] ) - scvi$model$SCVI$setup_anndata(adata, batch_key = 'group') + scvi$model$SCVI$setup_anndata(adata, batch_key = groups) model = scvi$model$SCVI(adata = adata, n_latent = as.integer(x = ndims), n_layers = as.integer(x = nlayers), diff --git a/man/SeuratWrappers-package.Rd b/man/SeuratWrappers-package.Rd index fa0c1d4..640c70c 100644 --- a/man/SeuratWrappers-package.Rd +++ b/man/SeuratWrappers-package.Rd @@ -18,4 +18,12 @@ Authors: \item Tim Stuart \email{tstuart@nygenome.org} (\href{https://orcid.org/0000-0002-3044-0897}{ORCID}) } +Other contributors: +\itemize{ + \item Yuhan Hao \email{yhao@nygenome.org} (\href{https://orcid.org/0000-0002-1810-0822}{ORCID}) [contributor] + \item Austin Hartman \email{ahartman@nygenome.org} (\href{https://orcid.org/0000-0001-7278-1852}{ORCID}) [contributor] + \item Gesmira Molla \email{gmolla@nygenome.org} (\href{https://orcid.org/0000-0002-8628-5056}{ORCID}) [contributor] + \item Saket Choudhary \email{schoudhary@nygenome.org} (\href{https://orcid.org/0000-0001-5202-7633}{ORCID}) [contributor] +} + } diff --git a/man/VeloPlot.Rd b/man/VeloPlot.Rd index 25a362c..b7b8487 100644 --- a/man/VeloPlot.Rd +++ b/man/VeloPlot.Rd @@ -7,10 +7,6 @@ VeloPlot(object, reduction = NULL, ...) } \arguments{ -\item{object}{Seurat object} - -\item{reduction}{Which dimensionality reduction to use. If not specified, first searches for umap, then tsne, then pca} - \item{...}{Extra parameters passed on to \code{\link[velocyto.R]{show.velocity.on.embedding.cor}}} } \value{ diff --git a/man/as.cell_data_set.Rd b/man/as.cell_data_set.Rd index dad825e..0a08570 100644 --- a/man/as.cell_data_set.Rd +++ b/man/as.cell_data_set.Rd @@ -23,8 +23,6 @@ as.cell_data_set(x, ...) \item{...}{Arguments passed to other methods} -\item{assay}{Assays to convert} - \item{reductions}{A vector of dimensional reductions add to the \code{cell_data_set} object; defaults to all dimensional reductions calculated from \code{assay} and all \link[Seurat:IsGlobal]{global} diff --git a/man/scVIIntegration.Rd b/man/scVIIntegration.Rd index 2481c7e..4da041a 100644 --- a/man/scVIIntegration.Rd +++ b/man/scVIIntegration.Rd @@ -21,7 +21,7 @@ scVIIntegration( \arguments{ \item{object}{A merged Seurat object} -\item{groups}{A one-column data frame with grouping information} +\item{groups}{Name of the metadata column to be used as the 'batch_key'} \item{features}{features to use}