Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scVIIntegration #179

Merged
merged 4 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
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 = '[email protected]', role = 'aut', comment = c(ORCID = '0000-0001-9448-8833')),
person(given = 'Andrew', family = 'Butler', email = '[email protected]', role = 'aut', comment = c(ORCID = '0000-0003-3608-0463')),
person(given = 'Paul', family = 'Hoffman', email = '[email protected]', role = c('aut', 'cre'), comment = c(ORCID = '0000-0002-7693-8957')),
person(given = 'Tim', family = 'Stuart', email = '[email protected]', role = 'aut', comment = c(ORCID = '0000-0002-3044-0897')),
person(given = "Yuhan", family = "Hao", email = "[email protected]", role = "ctb", comment = c(ORCID = "0000-0002-1810-0822")),
person(given = "Austin", family = "Hartman", email = "[email protected]", role = "ctb", comment = c(ORCID = "0000-0001-7278-1852")),
person(given = "Gesmira", family = "Molla", email = '[email protected]', role = 'ctb', comment = c(ORCID = '0000-0002-8628-5056'))
person(given = "Gesmira", family = "Molla", email = '[email protected]', role = 'ctb', comment = c(ORCID = '0000-0002-8628-5056')),
person(given = "Saket", family = "Choudhary", email = "[email protected]", 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
Expand Down Expand Up @@ -64,7 +65,7 @@ Collate:
'velocity.R'
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
RoxygenNote: 7.3.0
Suggests:
cipr,
conos,
Expand Down
1 change: 0 additions & 1 deletion R/miqc.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 %||%
Expand Down
10 changes: 5 additions & 5 deletions R/scVI.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down
8 changes: 8 additions & 0 deletions man/SeuratWrappers-package.Rd

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

4 changes: 0 additions & 4 deletions man/VeloPlot.Rd

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

2 changes: 0 additions & 2 deletions man/as.cell_data_set.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/scVIIntegration.Rd

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

Loading