Skip to content

Commit

Permalink
Minor changes to please R CMD check --as-cran
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophH committed Jul 20, 2018
1 parent 1090a38 commit 164208a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
16 changes: 10 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
Package: sctransform
Type: Package
Title: Variance Stabilizing Transformations For Single Cell UMI Data
Title: Variance Stabilizing Transformations for Single Cell UMI Data
Version: 0.1.0
Author: Christoph Hafemeister
Maintainer: Christoph Hafemeister <chafemeister@nygenome.org>
Description: Apply a variance stabilizing transformation to single-cell UMI count data.
The transformation is based on a negative binomial regression model with regularized
parameters.
Authors@R: person(given = 'Christoph', family = 'Hafemeister', email = 'chafemeister@nygenome.org', role = c('aut', 'cre'), comment = c(ORCID = '0000-0001-6365-8254'))
Description: A normalization method for single-cell UMI count data using a
variance stabilizing transformation. The transformation is based on a
negative binomial regression model with regularized parameters. A part of the
same regression framework, this package also provides functions for
differential gene expression testing, batch correction, and data
correction/denoising.
URL: https://github.com/ChristophH/sctransform
BugReports: https://github.com/ChristophH/sctransform/issues
License: GPL-3 | file LICENSE
Encoding: UTF-8
LazyData: true
Expand Down
2 changes: 1 addition & 1 deletion R/denoise.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#'
smooth_via_pca <- function(x, elbow_th = 0.025, dims_use = NULL, max_pc = 100, do_plot = FALSE,
scale. = FALSE) {
requireNamespace('irlba')
requireNamespace('irlba', quietly = TRUE)
# perform pca
if (scale.) {
scale. <- apply(x, 1, 'sd')
Expand Down
2 changes: 1 addition & 1 deletion R/vst.R
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ vst <- function(umi,
variance = apply(umi, 1, var),
residual_mean = rowMeans(res)
)
if (requireNamespace('matrixStats')) {
if (requireNamespace('matrixStats', quietly = TRUE)) {
gene_attr$residual_variance = matrixStats::rowVars(res)
} else {
message('Consider installing matrixStats package for faster gene attribute calculation.')
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
pagetitle: "README for sctransform R package"
author: "Christoph Hafemeister"
---

# sctransform
R package for modeling single cell UMI expression data using regularized negative binomial regression

Expand All @@ -19,4 +24,3 @@ Available vignettes:
[Differential expression](https://rawgit.com/ChristophH/sctransform/master/inst/doc/differential_expression.html)
[Batch correction](https://rawgit.com/ChristophH/sctransform/master/inst/doc/batch_correction.html)
[Denoising](https://rawgit.com/ChristophH/sctransform/master/inst/doc/denoising.html)

0 comments on commit 164208a

Please sign in to comment.