Skip to content

Commit

Permalink
Move sctransform from suggests to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mojaveazure committed Apr 12, 2019
1 parent cc45b31 commit 6e7dc04
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: Seurat
Version: 3.0.0.9150
Version: 3.0.0.9200
Date: 2019-04-16
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>, and Butler A and Satija R (2017) <doi:10.1101/164889> for more details.
Expand Down Expand Up @@ -51,6 +51,7 @@ Imports:
rsvd,
Rtsne,
scales,
sctransform (>= 0.2.0),
SDMTools,
stats,
tools,
Expand All @@ -77,7 +78,6 @@ RoxygenNote: 6.1.1
Encoding: UTF-8
Suggests:
testthat,
sctransform,
hdf5r,
S4Vectors,
SummarizedExperiment,
Expand Down
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ importFrom(rlang,"!!")
importFrom(rsvd,rsvd)
importFrom(scales,hue_pal)
importFrom(scales,zero_range)
importFrom(sctransform,correct_counts)
importFrom(sctransform,get_residual_var)
importFrom(sctransform,get_residuals)
importFrom(sctransform,vst)
importFrom(stats,aggregate)
importFrom(stats,anova)
importFrom(stats,approxfun)
Expand Down
11 changes: 6 additions & 5 deletions R/preprocessing.R
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ SampleUMI <- function(
#' @param ... Additional parameters passed to \code{sctransform::vst}
#'
#' @importFrom stats setNames
#' @importFrom sctransform vst get_residual_var get_residuals correct_counts
#'
#' @export
#'
Expand Down Expand Up @@ -1081,8 +1082,8 @@ SCTransform <- function(
}
if (conserve.memory) {
vst.args[['residual_type']] <- 'none'
vst.out <- do.call(what = sctransform::vst, args = vst.args)
feature.variance <- sctransform::get_residual_var(
vst.out <- do.call(what = 'vst', args = vst.args)
feature.variance <- get_residual_var(
vst_out = vst.out,
umi = umi,
residual_type = residual.type,
Expand All @@ -1091,7 +1092,7 @@ SCTransform <- function(
vst.out$gene_attr$residual_variance <- NA_real_
vst.out$gene_attr[names(x = feature.variance), 'residual_variance'] <- feature.variance
} else {
vst.out <- do.call(what = sctransform::vst, args = vst.args)
vst.out <- do.call(what = 'vst', args = vst.args)
feature.variance <- setNames(
object = vst.out$gene_attr$residual_variance,
nm = rownames(x = vst.out$gene_attr)
Expand All @@ -1114,14 +1115,14 @@ SCTransform <- function(
if (verbose) {
message("Return only variable features for scale.data slot of the output assay")
}
vst.out$y <- sctransform::get_residuals(
vst.out$y <- get_residuals(
vst_out = vst.out,
umi = umi[top.features, ],
residual_type = residual.type,
res_clip_range = res.clip.range
)
if (do.correct.umi & residual.type == 'pearson') {
vst.out$umi_corrected <- sctransform::correct_counts(
vst.out$umi_corrected <- correct_counts(
x = vst.out,
umi = umi,
show_progress = verbose
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![CRAN Version](https://www.r-pkg.org/badges/version/Seurat)](https://cran.r-project.org/package=Seurat)
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/Seurat)](https://cran.r-project.org/package=Seurat)

# Seurat v3.0.0.9150 - Beta
# Seurat v3.0.0.9200 - Beta

Seurat is an R toolkit for single cell genomics, developed and maintained by the Satija Lab at NYGC.

Expand Down

0 comments on commit 6e7dc04

Please sign in to comment.