Browse code

Fixed and merge conflict from compbiomed-devel

rz2333 authored on 01/05/2020 03:00:48
Showing 32 changed files

... ...
@@ -2,9 +2,11 @@ language: r
2 2
 cache: 
3 3
   - packages
4 4
   - pip
5
+r:
6
+  - oldrel
5 7
 dist: trusty
6 8
 sudo: false
7
-warnings_are_errors: false
9
+warnings_are_errors: true
8 10
 bioc_required: true
9 11
 
10 12
 # Current version of xgboost fails install
... ...
@@ -88,7 +88,7 @@ Imports:
88 88
     zinbwave,
89 89
     harmony,
90 90
     V8
91
-RoxygenNote: 7.0.2
91
+RoxygenNote: 7.1.0
92 92
 Suggests:
93 93
     testthat,
94 94
     Rsubread,
... ...
@@ -111,7 +111,6 @@ import(DropletUtils)
111 111
 import(GSVAdata)
112 112
 import(SingleCellExperiment)
113 113
 import(SummarizedExperiment)
114
-import(scds)
115 114
 importFrom(reticulate,import)
116 115
 importFrom(reticulate,py_module_available)
117 116
 importFrom(reticulate,py_set_seed)
... ...
@@ -30,7 +30,7 @@ print.decorated = function (x, useSource = TRUE, ...) {
30 30
     bare
31 31
   }
32 32
   
33
-  fun_def = capture.output(print.function(bare(x), useSource = useSource, ...))
33
+  fun_def = utils::capture.output(print.function(bare(x), useSource = useSource, ...))
34 34
   for (decorator in attr(x, 'decorators'))
35 35
     cat(deparse(decorator), '%@%\n')
36 36
   cat(fun_def, sep = '\n')
... ...
@@ -28,11 +28,13 @@
28 28
 #'  droplet-based single-cell RNA sequencing experiment.
29 29
 #' @param inSCE A \link[SingleCellExperiment]{SingleCellExperiment} object.
30 30
 #'  Must contain a raw counts matrix before empty droplets have been removed.
31
+#' @param useAssay  A string specifying which assay in the SCE to use.
31 32
 #' @param sample Character vector. Indicates which sample each cell belongs to
32 33
 #'  \link[DropletUtils]{emptyDrops} will be run on cells from each sample separately.
33
-#'  If NULL, then all cells will be processed together. Default NULL.
34
-#' @param ... Additional arguments to pass to \link[DropletUtils]{barcodeRanks}.
35
-#' @param useAssay  A string specifying which assay in the SCE to use.
34
+#'  If NULL, then all cells will be processed together. Default \code{NULL}.
35
+#' @param lower See \link[DropletUtils]{emptyDrops} for more information. Default \code{100}.
36
+#' @param fitBounds See \link[DropletUtils]{emptyDrops} for more information. Default \code{NULL}. 
37
+#' @param df See \link[DropletUtils]{emptyDrops} for more information. Default \code{20}.
36 38
 #' @return A \link[SingleCellExperiment]{SingleCellExperiment} object with the
37 39
 #'  \link[DropletUtils]{barcodeRanks} output table appended to the
38 40
 #'  \link[SummarizedExperiment]{colData} slot. The columns include
... ...
@@ -54,9 +56,9 @@
54 56
 runBarcodeRankDrops <- function(inSCE,
55 57
                                 sample = NULL,
56 58
                                 useAssay = "counts", 
57
-                                lower=100, 
58
-                                fit.bounds=NULL, 
59
-                                df=20
59
+                                lower = 100, 
60
+                                fitBounds = NULL, 
61
+                                df = 20
60 62
 ) {
61 63
   if(!is.null(sample)) {
62 64
     if(length(sample) != ncol(inSCE)) {
... ...
@@ -83,9 +85,9 @@ runBarcodeRankDrops <- function(inSCE,
83 85
     sceSample <- inSCE[, sceSampleInd]
84 86
     
85 87
     mat <- SummarizedExperiment::assay(sceSample, i = useAssay)
86
-    result <- .runBarcodeRankDrops(barcode.matrix = mat, lower=100,
87
-                                   fit.bounds=NULL, 
88
-                                   df=20)
88
+    result <- .runBarcodeRankDrops(barcode.matrix = mat, lower=lower,
89
+                                   fit.bounds=fitBounds, 
90
+                                   df=df)
89 91
     
90 92
     output[sceSampleInd, ] <- result
91 93
   }
... ...
@@ -93,7 +95,7 @@ runBarcodeRankDrops <- function(inSCE,
93 95
   colData(inSCE) = cbind(colData(inSCE), output)
94 96
   
95 97
   inSCE@metadata$runBarcodeRankDrops <- argsList[-1]
96
-  inSCE@metadata$runBarcodeRankDrops$packageVersion <- packageDescription("DropletUtils")$Version
98
+  inSCE@metadata$runBarcodeRankDrops$packageVersion <- utils::packageDescription("DropletUtils")$Version
97 99
   
98 100
   return(inSCE)
99 101
 }
... ...
@@ -5,7 +5,7 @@
5 5
                            alpha=NULL,
6 6
                            retain=NULL,
7 7
                            barcode.args=list(),
8
-                           BPPARAM=SerialParam()) {
8
+                           BPPARAM=BiocParallel::SerialParam()) {
9 9
   
10 10
   barcode.matrix <- .convertToMatrix(barcode.matrix)
11 11
   
... ...
@@ -16,7 +16,7 @@
16 16
                                      alpha=NULL,
17 17
                                      retain=NULL,
18 18
                                      barcode.args=list(),
19
-                                     BPPARAM=SerialParam())
19
+                                     BPPARAM=BiocParallel::SerialParam())
20 20
   colnames(result) <- paste0("dropletUtils_emptyDrops_", colnames(result))
21 21
   
22 22
   return(result)
... ...
@@ -34,8 +34,14 @@
34 34
 #'  \link[DropletUtils]{emptyDrops} will be run on cells from each sample separately.
35 35
 #'  If NULL, then all cells will be processed together. Default NULL.
36 36
 #' @param useAssay  A string specifying which assay in the SCE to use.
37
-#' @param ... Additional arguments to pass to \link[DropletUtils]{emptyDrops}.
38
-#'  matrix.
37
+#' @param lower See \link[DropletUtils]{emptyDrops} for more information.
38
+#' @param niters See \link[DropletUtils]{emptyDrops} for more information.
39
+#' @param testAmbient See \link[DropletUtils]{emptyDrops} for more information.
40
+#' @param ignore See \link[DropletUtils]{emptyDrops} for more information.
41
+#' @param alpha See \link[DropletUtils]{emptyDrops} for more information.
42
+#' @param retain See \link[DropletUtils]{emptyDrops} for more information.
43
+#' @param barcodeArgs See \link[DropletUtils]{emptyDrops} for more information.
44
+#' @param BPPARAM See \link[DropletUtils]{emptyDrops} for more information.
39 45
 #' @return A \link[SingleCellExperiment]{SingleCellExperiment} object with the
40 46
 #'  \link[DropletUtils]{emptyDrops} output table appended to the
41 47
 #'  \link[SummarizedExperiment]{colData} slot. The columns include
... ...
@@ -59,14 +65,14 @@
59 65
 runEmptyDrops <- function(inSCE,
60 66
                           sample = NULL,
61 67
                           useAssay = "counts", 
62
-                          lower=100,
63
-                          niters=10000,
64
-                          test.ambient=FALSE,
65
-                          ignore=NULL, 
66
-                          alpha=NULL,
67
-                          retain=NULL,
68
-                          barcode.args=list(),
69
-                          BPPARAM=SerialParam()
68
+                          lower = 100,
69
+                          niters = 10000,
70
+                          testAmbient = FALSE,
71
+                          ignore = NULL, 
72
+                          alpha = NULL,
73
+                          retain = NULL,
74
+                          barcodeArgs = list(),
75
+                          BPPARAM = BiocParallel::SerialParam()
70 76
 ) {
71 77
   # getting the current argument values
72 78
   argsList <- as.list(formals(fun = sys.function(sys.parent()), envir = parent.frame()))
... ...
@@ -97,25 +103,26 @@ runEmptyDrops <- function(inSCE,
97 103
     sceSample <- inSCE[, sceSampleInd]
98 104
     
99 105
     mat <- SummarizedExperiment::assay(sceSample, i = useAssay)
100
-    result <- .runEmptyDrops(barcode.matrix = mat, lower=100,
101
-                             niters=10000,
102
-                             test.ambient=FALSE,
103
-                             ignore=NULL, 
104
-                             alpha=NULL,
105
-                             retain=NULL,
106
-                             barcode.args=list(),
107
-                             BPPARAM=SerialParam())
106
+    result <- .runEmptyDrops(barcode.matrix = mat,
107
+                             lower = lower,
108
+                             niters = niters,
109
+                             test.ambient = testAmbient,
110
+                             ignore = ignore, 
111
+                             alpha = alpha,
112
+                             retain = retain,
113
+                             barcode.args = barcodeArgs,
114
+                             BPPARAM = BPPARAM)
108 115
     
109 116
     
110 117
     output[sceSampleInd, ] <- result
111
-    metadata(output[sceSampleInd, ]) <- metadata(result)
118
+    S4Vectors::metadata(output[sceSampleInd, ]) <- S4Vectors::metadata(result)
112 119
   }
113 120
   
114 121
   colData(inSCE) = cbind(colData(inSCE), output)
115
-  inSCE@metadata = metadata(output)
122
+  inSCE@metadata = S4Vectors::metadata(output)
116 123
   
117 124
   inSCE@metadata$runEmptyDrops <- argsList[-1]
118
-  inSCE@metadata$runEmptyDrops$packageVersion <- packageDescription("DropletUtils")$Version
125
+  inSCE@metadata$runEmptyDrops$packageVersion <- utils::packageDescription("DropletUtils")$Version
119 126
   
120 127
   return(inSCE)
121 128
 }
122 129
\ No newline at end of file
... ...
@@ -7,29 +7,32 @@
7 7
 #' overridden at function call.
8 8
 #' @param sce \link[SingleCellExperiment]{SingleCellExperiment} R object to be
9 9
 #'  exported.
10
-#'  @param useAssay Character, default `"counts"`. The name of assay of
10
+#' @param useAssay Character. The name of assay of
11 11
 #' interests that will be set as the primary matrix of the output AnnData.
12
-#' @param outputDir Path to the directory where .h5ad outputs will be written
12
+#' Default \code{"counts"}. 
13
+#' @param outputDir Path to the directory where .h5ad outputs will be written. Default is the current working directory.
14
+#' @param prefix Prefix to use for the name of the output file. Default \code{"sample"}.
13 15
 #' @param overwrite Boolean. Default \code{TRUE}.
14
-#' @param compression Default \code{None}.If output file compression is required, this variable accepts
15
-#' 'gzip' or 'lzf' as inputs.
16
-#' @param compression_opts Integer. Default \code{NULL} Sets the compression level
16
+#' @param compression If output file compression is required, this variable accepts
17
+#' 'gzip' or 'lzf' as inputs. Default \code{None}.
18
+#' @param compressionOpts Integer. Sets the compression level
17 19
 #' @param forceDense Default \code{False} Write sparse data as a dense matrix.
18
-#' Refer anndata.write_h5ad documentation for details
20
+#' Refer \code{anndata.write_h5ad} documentation for details. Default \code{NULL}. 
19 21
 #' @examples
22
+#' \dontrun{
20 23
 #' data(sce_chcl, package = "scds")
21 24
 #' exportSCEtoAnnData(sce=sce_chcl, compression="gzip")
22
-#'
25
+#' }
26
+#' 
23 27
 #' @export
24
-
25 28
 exportSCEtoAnnData <- function(sce, 
26
-                                useAssay='counts',
27
-                                outputDir="./",
28
-                                sample = "sample",
29
-                                overwrite=TRUE,
30
-                                compression= c('None','lzf','gzip'),
29
+                                useAssay = 'counts',
30
+                                outputDir = "./",
31
+                                prefix = "sample",
32
+                                overwrite = TRUE,
33
+                                compression = c('None','lzf','gzip'),
31 34
                                 compressionOpts = NULL,
32
-                                forceDense= c('False','True')){
35
+                                forceDense = c('False','True')){
33 36
   compression <- match.arg(compression)
34 37
   forceDense <- match.arg(forceDense)
35 38
   if (compression == 'None'){
... ...
@@ -58,12 +61,12 @@ exportSCEtoAnnData <- function(sce,
58 61
   
59 62
   dir.create(outputDir, showWarnings = FALSE, recursive = TRUE)
60 63
   annData <- .sce2adata(sce,useAssay)
61
-  fileName <- paste0(sample,".h5ad")
64
+  fileName <- paste0(prefix,".h5ad")
62 65
   filePath <- file.path(outputDir,fileName)
63
-
66
+  
64 67
   if (file.exists(filePath) && !isTRUE(overwrite)) {
65 68
     stop(paste0(path, " already exists. Change 'outputDir' or set 'overwrite' to TRUE."))
66
-  }
69
+    }
67 70
 
68 71
   annData$write_h5ad(filePath,
69 72
                      compression = compression, 
... ...
@@ -9,7 +9,7 @@
9 9
 #'  \code{TRUE}.
10 10
 #' @param gzipped Boolean. \code{TRUE} if the output files are to be
11 11
 #'  gzip compressed. \code{FALSE} otherwise. Default
12
-#'  \code{TRUE} to save disk space.
12
+#'  \code{TRUE}.
13 13
 #' @examples
14 14
 #' data(sce_chcl, package = "scds")
15 15
 #' exportSCEtoFlatFile(sce_chcl, "sce_chcl")
... ...
@@ -43,7 +43,7 @@
43 43
                                  dataType, 
44 44
                                  rdsFileName, 
45 45
                                  sampleName = 'sample',
46
-                                 delayedArray = delayedArrary){
46
+                                 delayedArray = FALSE){
47 47
   ## Read DropEst RDS
48 48
   dropEst_rds <- .readDropEstFile(sampleDir,dataType,rdsFileName)
49 49
   if (dataType == 'filtered' && 'cm' %in% names(dropEst_rds)) {
... ...
@@ -85,10 +85,10 @@
85 85
 #' create a SingleCellExperiment object from either the raw or filtered counts matrix.
86 86
 #' Additionally parse through the RDS to obtain appropriate feature annotations as 
87 87
 #' SCE coldata, in addition to any metadata.
88
-#' @param sampleDir  A path to the directory containing the data files. Default "./".
89
-#' @param sampleName A User-defined sample name. This will be prepended to all cell barcode IDs.
88
+#' @param sampleDirs  A path to the directory containing the data files. Default "./".
89
+#' @param sampleNames A User-defined sample name. This will be prepended to all cell barcode IDs.
90 90
 #'  Default "sample".
91
-#'  @param dataType can be "filtered" or "raw". Default is "filtered"
91
+#' @param dataType can be "filtered" or "raw". Default \code{"filtered"}.
92 92
 #' @param rdsFileName File name prefix of the DropEst RDS output. default is "cell.counts"
93 93
 #' @param delayedArray Boolean. Whether to read the expression matrix as
94 94
 #'  \link[DelayedArray]{DelayedArray} object or not. Default \code{TRUE}.
... ...
@@ -103,14 +103,6 @@
103 103
 #' found in the DropEst rds, they will be added to the SCE metadata field
104 104
 #' @return A \code{SingleCellExperiment} object containing the count matrix,
105 105
 #'  the feature annotations from DropEst as ColData, and any metadata from DropEst
106
-#' @examples
107
-#' Example
108
-#' Example DropEst outputs were downloaded from the DropEst Github 
109
-#' (http://pklab.med.harvard.edu/viktor/dropest_paper/dropest_0.8.5.zip). 
110
-#' To run the dropest import function with the example dataset, 
111
-#' set the sampleDirs variable to the example dropEst provided in SCTK as follows-
112
-#' sce <- importDropEst(sampleDirs = c('path/to/dropest/folder/'), 
113
-#'                      dataType='filtered', sampleNames=c('sample'))
114 106
 #' @export
115 107
 importDropEst <- function(sampleDirs = NULL, 
116 108
                           dataType = c('filtered','raw'),
... ...
@@ -60,7 +60,6 @@ summarizeTable <- function(inSCE, useAssay="counts", expressionCutoff=1700){
60 60
 #' frames instead of file paths. The default is FALSE.
61 61
 #' @param createLogCounts If TRUE, create a log2(counts+1) normalized assay
62 62
 #' and include it in the object. The default is TRUE
63
-#'
64 63
 #' @return a SCtkExperiment object
65 64
 #' @export
66 65
 #' @examples
... ...
@@ -71,7 +70,7 @@ summarizeTable <- function(inSCE, useAssay="counts", expressionCutoff=1700){
71 70
 #' newSCE <- createSCE(assayFile = counts_mat, annotFile = sample_annot,
72 71
 #'                     featureFile = row_annot, assayName = "counts",
73 72
 #'                     inputDataFrames = TRUE, createLogCounts = TRUE)
74
-createSCE <- simpleLog %@% function(assayFile=NULL, annotFile=NULL, featureFile=NULL,
73
+createSCE <-  function(assayFile=NULL, annotFile=NULL, featureFile=NULL,
75 74
                       assayName="counts", inputDataFrames=FALSE,
76 75
                       createLogCounts=TRUE){
77 76
   
... ...
@@ -287,6 +286,7 @@ distinctColors <- function(n, hues = c("red", "cyan", "orange", "blue",
287 286
   x <- do.call(base::cbind, Mat)
288 287
   colnames(x) <- cn
289 288
   rownames(x) <- rn
289
+  
290 290
   return(x)
291 291
 }
292 292
 
... ...
@@ -13,6 +13,7 @@ blt <- NULL
13 13
 scgen <- NULL
14 14
 sc <- NULL
15 15
 bbknn <- NULL
16
+pkg_resources <- NULL
16 17
 
17 18
 .onLoad <- function(libname, pkgname) {
18 19
   # use superassignment to update global reference to scipy
... ...
@@ -24,6 +25,7 @@ bbknn <- NULL
24 25
   scgen <<- reticulate::import("scgen", delay_load = TRUE)
25 26
   sc <<- reticulate::import("scanpy", delay_load = TRUE)
26 27
   bbknn <<- reticulate::import("bbknn", delay_load = TRUE)
28
+  pkg_resources <<- reticulate::import('pkg_resources',delay_load = TRUE)
27 29
   blt <<- reticulate::import_builtins()
28 30
 }
29 31
 
... ...
@@ -94,7 +96,6 @@ sctkPythonInstallConda <- function(envname = "sctk-reticulate",
94 96
 #' @param packages Character Vector. List of packages to install. 
95 97
 #' @param selectEnvironment Boolean. Run \code{\link[singleCellTK]{selectSCTKVirtualEnvironment}} after installing all packages to select the virtual environment. Default TRUE.
96 98
 #' @param python The path to a Python interpreter, to be used with the created virtual environment. When NULL, the Python interpreter associated with the current session will be used. Default NULL.
97
-#' @param ... Other parameters to pass to \code{\link[reticulate]{conda_install}}. 
98 99
 #' @examples
99 100
 #' \dontrun{
100 101
 #' sctkPythonInstallVirtualEnv(envname = "sctk-reticulate")
... ...
@@ -50,7 +50,7 @@ runBBKNN <-function(inSCE, useAssay = 'logcounts', batch = 'batch',
50 50
     reducedDimName <- gsub(' ', '_', reducedDimName)
51 51
     
52 52
     ## Run algorithm
53
-    adata <- .sce2adata(inSCE, mainAssay = useAssay)
53
+    adata <- .sce2adata(inSCE, useAssay = useAssay)
54 54
     sc$tl$pca(adata, n_comps = nComponents)
55 55
     bbknn$bbknn(adata, batch_key = batch, n_pcs = nComponents)
56 56
     sc$tl$umap(adata, n_components = nComponents)
... ...
@@ -56,7 +56,7 @@ runSCGEN <- function(inSCE, useAssay = 'logcounts', batch = 'batch',
56 56
     nEpochs <- as.integer(nEpochs)
57 57
 
58 58
     ## Run algorithm
59
-    adata <- .sce2adata(inSCE, mainAssay = useAssay)
59
+    adata <- .sce2adata(inSCE, useAssay = useAssay)
60 60
     network = scgen$VAEArith(x_dimension = adata$n_vars)
61 61
     network$train(train_data = adata, n_epochs = nEpochs)
62 62
     corrAdata <- scgen$batch_removal(network, adata, batch_key = batch, 
... ...
@@ -10,7 +10,11 @@
10 10
 #'  separately. If NULL, then all cells will be processed together.
11 11
 #'  Default NULL.
12 12
 #' @param seed Seed for the random number generator. Default 12345.
13
-#' @param ... Additional arguments passed to \link[scds]{cxds}.
13
+#' @param ntop See \link[scds]{cxds} for more information. Default \code{500}.
14
+#' @param binThresh See \link[scds]{cxds} for more information. Default \code{0}.
15
+#' @param verb See \link[scds]{cxds} for more information. Default \code{FALSE}.
16
+#' @param retRes See \link[scds]{cxds} for more information. Default \code{FALSE}.
17
+#' @param estNdbl See \link[scds]{cxds} for more information. Default \code{FALSE}.
14 18
 #' @return A \link[SingleCellExperiment]{SingleCellExperiment} object with
15 19
 #'  \link[scds]{cxds} output appended to the
16 20
 #'  \link[SummarizedExperiment]{colData} slot. The columns include
... ...
@@ -20,7 +24,6 @@
20 24
 #' data(sce_chcl, package = "scds")
21 25
 #' sce <- runCxds(sce_chcl)
22 26
 #' @export
23
-#' @import scds
24 27
 runCxds <- function(inSCE,
25 28
     sample = NULL,
26 29
     seed = 12345,
... ...
@@ -67,10 +70,10 @@ runCxds <- function(inSCE,
67 70
         while(!inherits(result, "SingleCellExperiment") & nGene > 0) {
68 71
           try({result <- withr::with_seed(seed, scds::cxds(sce = sceSample,
69 72
                                                            ntop = nGene, 
70
-                                                           binThresh = 0, 
71
-                                                           verb = FALSE, 
72
-                                                           retRes = FALSE,
73
-                                                           estNdbl = FALSE))}, silent = TRUE)
73
+                                                           binThresh = binThresh, 
74
+                                                           verb = verb, 
75
+                                                           retRes = retRes,
76
+                                                           estNdbl = estNdbl))}, silent = TRUE)
74 77
           nGene <- nGene - 100
75 78
         }  
76 79
         
... ...
@@ -92,7 +95,7 @@ runCxds <- function(inSCE,
92 95
     colData(inSCE) = cbind(colData(inSCE), output)
93 96
     
94 97
     inSCE@metadata$runCxds <- argsList[-1]
95
-    inSCE@metadata$runCxds$packageVersion <- packageDescription("scds")$Version
98
+    inSCE@metadata$runCxds$packageVersion <- utils::packageDescription("scds")$Version
96 99
 
97 100
     return(inSCE)
98 101
 }
... ...
@@ -110,7 +113,13 @@ runCxds <- function(inSCE,
110 113
 #'  separately. If NULL, then all cells will be processed together.
111 114
 #'  Default NULL.
112 115
 #' @param seed Seed for the random number generator. Default 12345.
113
-#' @param ... Additional arguments passed to \link[scds]{bcds}.
116
+#' @param ntop See \link[scds]{bcds} for more information. Default \code{500}. 
117
+#' @param srat See \link[scds]{bcds} for more information. Default \code{1}.
118
+#' @param verb See \link[scds]{bcds} for more information. Default \code{FALSE}.
119
+#' @param retRes See \link[scds]{bcds} for more information. Default \code{FALSE}.
120
+#' @param nmax See \link[scds]{bcds} for more information. Default \code{"tune"}.
121
+#' @param varImp See \link[scds]{bcds} for more information. Default \code{FALSE}.
122
+#' @param estNdbl See \link[scds]{bcds} for more information. Default \code{FALSE}.
114 123
 #' @return A \link[SingleCellExperiment]{SingleCellExperiment} object with
115 124
 #'  \link[scds]{bcds} output appended to the
116 125
 #'  \link[SummarizedExperiment]{colData} slot. The columns include
... ...
@@ -120,7 +129,6 @@ runCxds <- function(inSCE,
120 129
 #' data(sce_chcl, package = "scds")
121 130
 #' sce <- runBcds(sce_chcl)
122 131
 #' @export
123
-#' @import scds
124 132
 runBcds <- function(inSCE,
125 133
     sample = NULL,
126 134
     seed = 12345,
... ...
@@ -146,7 +154,6 @@ runBcds <- function(inSCE,
146 154
     
147 155
     ## Getting current arguments
148 156
     argsList <- as.list(formals(fun = sys.function(sys.parent()), envir = parent.frame()))
149
-    
150 157
 
151 158
     ## Define result matrix for all samples
152 159
     if (estNdbl) {
... ...
@@ -169,13 +176,16 @@ runBcds <- function(inSCE,
169 176
         result <- NULL
170 177
         nGene <- 500
171 178
         while(!inherits(result, "SingleCellExperiment") & nGene > 0) {
172
-          try({result <- withr::with_seed(seed, scds::bcds(sce = sceSample, ntop = nGene,
173
-                                                           srat = srat,
174
-                                                           verb = verb,
175
-                                                           estNdbl = estNdbl,
176
-                                                           varImp = varImp,
177
-                                                           nmax = nmax,
178
-                                                           retRes = retRes))}, silent = TRUE)
179
+          try({result <- withr::with_seed(seed,
180
+            scds::bcds(sce = sceSample,
181
+                       ntop = nGene,
182
+                       srat = srat, 
183
+                       verb = verb,
184
+                       retRes = retRes,
185
+                       nmax = nmax, 
186
+                       varImp = varImp,
187
+                       estNdbl = estNdbl
188
+            ))}, silent = TRUE)
179 189
           nGene <- nGene - 100
180 190
         }  
181 191
 
... ...
@@ -198,7 +208,7 @@ runBcds <- function(inSCE,
198 208
     colData(inSCE) = cbind(colData(inSCE), output)
199 209
     
200 210
     inSCE@metadata$runBcds <- argsList[-1]
201
-    inSCE@metadata$runBcds$packageVersion <- packageDescription("scds")$Version
211
+    inSCE@metadata$runBcds$packageVersion <- utils::packageDescription("scds")$Version
202 212
 
203 213
     return(inSCE)
204 214
 }
... ...
@@ -216,7 +226,13 @@ runBcds <- function(inSCE,
216 226
 #'  separately. If NULL, then all cells will be processed together.
217 227
 #'  Default NULL.
218 228
 #' @param seed Seed for the random number generator. Default 12345.
219
-#' @param ... Additional arguments passed to \link[scds]{cxds_bcds_hybrid}.
229
+#' @param nTop The number of top varialbe genes to consider. Used in both \code{csds}
230
+#' and \code{bcds}. Default \code{500}. 
231
+#' @param cxdsArgs See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{NULL}.
232
+#' @param bcdsArgs See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{NULL}.
233
+#' @param verb See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{FALSE}.
234
+#' @param estNdbl See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{FALSE}.
235
+#' @param force See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{FALSE}.
220 236
 #' @return A \link[SingleCellExperiment]{SingleCellExperiment} object with
221 237
 #'  \link[scds]{cxds_bcds_hybrid} output appended to the
222 238
 #'  \link[SummarizedExperiment]{colData} slot. The columns include
... ...
@@ -227,12 +243,12 @@ runBcds <- function(inSCE,
227 243
 #' data(sce_chcl, package = "scds")
228 244
 #' sce <- runCxdsBcdsHybrid(sce_chcl)
229 245
 #' @export
230
-#' @import scds
231 246
 runCxdsBcdsHybrid <- function(inSCE,
232 247
     sample = NULL,
233 248
     seed = 12345,
234
-    cxdsArgs = NULL,
235
-    bcdsArgs = NULL, 
249
+    nTop = 500,
250
+    cxdsArgs = list(),
251
+    bcdsArgs = list(), 
236 252
     verb = FALSE,
237 253
     estNdbl = FALSE,
238 254
     force = FALSE) {
... ...
@@ -273,11 +289,11 @@ runCxdsBcdsHybrid <- function(inSCE,
273 289
         nGene <- 500
274 290
         while(!inherits(result, "SingleCellExperiment") & nGene > 0) {
275 291
           try({result <- withr::with_seed(seed, scds::cxds_bcds_hybrid(sce = sceSample, 
276
-                                                                       cxdsArgs=list(ntop = nGene), 
277
-                                                                       bcdsArgs=list(ntop = nGene), 
278
-                                                                       verb = FALSE,
279
-                                                                       estNdbl = FALSE,
280
-                                                                       force = FALSE))}, silent = TRUE)
292
+                                                                       cxdsArgs=c(list(ntop = nGene), cxdsArgs), 
293
+                                                                       bcdsArgs=c(list(ntop = nGene), bcdsArgs), 
294
+                                                                       verb = verb,
295
+                                                                       estNdbl = estNdbl,
296
+                                                                       force = force))}, silent = TRUE)
281 297
           nGene <- nGene - 100
282 298
         }  
283 299
 
... ...
@@ -299,7 +315,7 @@ runCxdsBcdsHybrid <- function(inSCE,
299 315
     colData(inSCE) = cbind(colData(inSCE), output)
300 316
     
301 317
     inSCE@metadata$runCxdsBcdsHybrid <- argsList[-1]
302
-    inSCE@metadata$runCxdsBcdsHybrid$packageVersion <- packageDescription("scds")$Version
318
+    inSCE@metadata$runCxdsBcdsHybrid$packageVersion <- utils::packageDescription("scds")$Version
303 319
 
304 320
     return(inSCE)
305 321
 }
... ...
@@ -18,6 +18,8 @@
18 18
 #' @param nNeighbors Integer. Number of neighbors used to construct the KNN
19 19
 #'  graph of observed transcriptomes and simulated doublets. If \code{NULL},
20 20
 #'  this is set to \code{round(0.5 * sqrt(n_cells))}. Default \code{NULL}.
21
+#' @param minDist Float Determines how tightly UMAP packs points together. If \code{NULL},
22
+#'  this is set to 0.1. Default \code{NULL}.
21 23
 #' @param expectedDoubletRate The estimated doublet rate for the experiment.
22 24
 #'  Default 0.1.
23 25
 #' @param stdevDoubletRate Uncertainty in the expected doublet rate.
... ...
@@ -63,6 +65,11 @@
63 65
 #' @param nPrinComps Integer. Number of principal components used to embed
64 66
 #'  the transcriptomes prior to k-nearest-neighbor graph construction.
65 67
 #'  Default 30.
68
+#' @param tsneAngle Float. Determines angular size of a distant node as measured 
69
+#'  from a point in the t-SNE plot. If default, it is set to 0.5 Default \code{NULL}. 
70
+#' @param tsnePerplexity Integer. The number of nearest neighbors that
71
+#'  is used in other manifold learning algorithms.
72
+#'  If default, it is set to 30. Default \code{NULL}.
66 73
 #' @param verbose Boolean. If \code{TRUE}, print progress updates. Default
67 74
 #'  \code{TRUE}.
68 75
 #' @param seed Seed for the random number generator. Default 12345.
... ...
@@ -82,6 +89,7 @@ runScrublet <- function(inSCE,
82 89
   useAssay = "counts",
83 90
   simDoubletRatio = 2.0,
84 91
   nNeighbors = NULL,
92
+  minDist = NULL,
85 93
   expectedDoubletRate = 0.1,
86 94
   stdevDoubletRate = 0.02,
87 95
   syntheticDoubletUmiSubsampling = 1.0,
... ...
@@ -95,6 +103,8 @@ runScrublet <- function(inSCE,
95 103
   meanCenter = TRUE,
96 104
   normalizeVariance = TRUE,
97 105
   nPrinComps = 30L,
106
+  tsneAngle = NULL,
107
+  tsnePerplexity = NULL,
98 108
   verbose = TRUE,
99 109
   seed = 12345) {
100 110
 
... ...
@@ -143,7 +153,7 @@ runScrublet <- function(inSCE,
143 153
 
144 154
       mat <- SummarizedExperiment::assay(sceSample, i = useAssay)
145 155
       mat <- .convertToMatrix(mat)
146
-
156
+      
147 157
       scr <- scrublet$Scrublet(counts_matrix = t(mat),
148 158
         sim_doublet_ratio = simDoubletRatio,
149 159
         n_neighbors = nNeighbors,
... ...
@@ -166,8 +176,27 @@ runScrublet <- function(inSCE,
166 176
 
167 177
       output[sceSampleInd, "scrublet_score"] <- result[[1]]
168 178
       output[sceSampleInd, "scrublet_call"] <- result[[2]]
179
+      
180
+      ## Extract UMAP and TSNE coordinates 
181
+      if (is.null(nNeighbors) && is.null(minDist)){
182
+        umap_coordinates <- scrublet$get_umap(scr$manifold_obs_)
183
+      }else {
184
+        umap_coordinates <- scrublet$get_umap(scr$manifold_obs_,
185
+                                              n_neighbors=as.integer(nNeighbors), 
186
+                                              min_dist=minDist)
187
+      }
188
+      reducedDim(inSCE,'UMAP') <- umap_coordinates
189
+    
190
+    if (is.null(tsneAngle) && is.null(tsnePerplexity)){
191
+      tsne_coordinates <- scrublet$get_tsne(scr$manifold_obs_)
192
+    }else {
193
+      tsne_coordinates <- scrublet$get_tsne(scr$manifold_obs_,
194
+                                            angle=tsneAngle, 
195
+                                            perplexity=as.integer(tsnePerplexity))
169 196
     }
170
-
197
+    reducedDim(inSCE,'TSNE') <- tsne_coordinates
198
+  }
199
+    
171 200
     colData(inSCE) = cbind(colData(inSCE), output)
172 201
   }, silent = TRUE)
173 202
 
... ...
@@ -177,8 +206,10 @@ runScrublet <- function(inSCE,
177 206
   }
178 207
   
179 208
   inSCE@metadata$runScrublet <- argsList[-1]
180
-  ## Add scrublet version
181
-  ##inSCE@metadata$runScrublet$packageVersion <- packageDescription("scrublet")$Version
209
+  
210
+  ## add scrublet version to metadata
211
+  version <- pkg_resources$require("scrublet")[[1]]
212
+  inSCE@metadata$scrublet$packageVersion <- version
182 213
   
183 214
   return(inSCE)
184 215
 }
... ...
@@ -55,7 +55,7 @@
55 55
 
56 56
 #' .rowNamesSCE
57 57
 #' Retrieves a list of genenames/rownames/featurenames from sce object
58
-#' @param sce sce object from which the genenames/rownames/featurenames should be extracted
58
+#' @param inSCE sce object from which the genenames/rownames/featurenames should be extracted
59 59
 #' @return list() of genenames/rownames/featurenames
60 60
 .rowNamesSCE <- function(inSCE) {
61 61
     return(rownames(inSCE))
... ...
@@ -209,7 +209,6 @@ seuratReductionPlot <- function(inSCE, useAssay, geneNamesSeurat, reduction) {
209 209
 #' @param seuratObject from which we have to copy the assay (copy from)
210 210
 #' @param assaySlotSCE the assay slot in sce object
211 211
 #' @param assaySlotSeurat the assay slot in seurat object
212
-#' @return
213 212
 .updateAssaySCE <- function(inSCE, geneNames, seuratObject, assaySlotSCE, assaySlotSeurat) {
214 213
     assay(inSCE, assaySlotSCE) <- NULL
215 214
     assay(inSCE, assaySlotSCE) <- methods::slot(seuratObject@assays$RNA, assaySlotSeurat)
... ...
@@ -223,9 +222,9 @@ seuratReductionPlot <- function(inSCE, useAssay, geneNamesSeurat, reduction) {
223 222
 #' @return inSCE output object
224 223
 #' @export
225 224
 convertSeuratToSCE <- function(seuratObject) {
226
-    inSCE <- as.SingleCellExperiment(seuratObject)
225
+    inSCE <- Seurat::as.SingleCellExperiment(seuratObject)
227 226
     assay(inSCE, "seuratNormalizedData") <- methods::slot(seuratObject@assays$RNA, "data")
228
-    if (length(slot(seuratObject, "assays")[["RNA"]]@scale.data) > 0) {
227
+    if (length(methods::slot(seuratObject, "assays")[["RNA"]]@scale.data) > 0) {
229 228
         assay(inSCE, "seuratScaledData") <- methods::slot(seuratObject@assays$RNA, "scale.data")
230 229
     }
231 230
     inSCE <- .addSeuratToMetaDataSCE(inSCE, seuratObject)
... ...
@@ -4,8 +4,10 @@
4 4
 \name{SEG}
5 5
 \alias{SEG}
6 6
 \title{Stably Expressed Gene (SEG) list obect, with SEG sets for human and mouse.}
7
-\format{list, with two entries `"human"` and `"mouse"`, each is a charactor
8
-array.}
7
+\format{
8
+list, with two entries `"human"` and `"mouse"`, each is a charactor
9
+array.
10
+}
9 11
 \source{
10 12
 `data('segList', package='scMerge')``
11 13
 }
... ...
@@ -8,7 +8,7 @@ Retrieves a list of genenames/rownames/featurenames from sce object}
8 8
 .rowNamesSCE(inSCE)
9 9
 }
10 10
 \arguments{
11
-\item{sce}{sce object from which the genenames/rownames/featurenames should be extracted}
11
+\item{inSCE}{sce object from which the genenames/rownames/featurenames should be extracted}
12 12
 }
13 13
 \value{
14 14
 list() of genenames/rownames/featurenames
... ...
@@ -17,9 +17,6 @@ Update/Modify/Add an assay in the provided sce object}
17 17
 \item{assaySlotSCE}{the assay slot in sce object}
18 18
 
19 19
 \item{assaySlotSeurat}{the assay slot in seurat object}
20
-}
21
-\value{
22
-
23 20
 }
24 21
 \description{
25 22
 .updateAssaySCE
... ...
@@ -4,7 +4,9 @@
4 4
 \name{emptyDropsSceExample}
5 5
 \alias{emptyDropsSceExample}
6 6
 \title{Example PBMC_1k_v3_33538x20 SingleCellExperiment Object}
7
-\format{A \link[SingleCellExperiment]{SingleCellExperiment} object.}
7
+\format{
8
+A \link[SingleCellExperiment]{SingleCellExperiment} object.
9
+}
8 10
 \usage{
9 11
 emptyDropsSceExample
10 12
 }
... ...
@@ -9,7 +9,7 @@ exportSCEtoAnnData(
9 9
   sce,
10 10
   useAssay = "counts",
11 11
   outputDir = "./",
12
-  sample = "sample",
12
+  prefix = "sample",
13 13
   overwrite = TRUE,
14 14
   compression = c("None", "lzf", "gzip"),
15 15
   compressionOpts = NULL,
... ...
@@ -18,21 +18,25 @@ exportSCEtoAnnData(
18 18
 }
19 19
 \arguments{
20 20
 \item{sce}{\link[SingleCellExperiment]{SingleCellExperiment} R object to be
21
- exported.
22
- @param useAssay Character, default `"counts"`. The name of assay of
23
-interests that will be set as the primary matrix of the output AnnData.}
21
+exported.}
24 22
 
25
-\item{outputDir}{Path to the directory where .h5ad outputs will be written}
23
+\item{useAssay}{Character. The name of assay of
24
+interests that will be set as the primary matrix of the output AnnData.
25
+Default \code{"counts"}.}
26
+
27
+\item{outputDir}{Path to the directory where .h5ad outputs will be written. Default is the current working directory.}
28
+
29
+\item{prefix}{Prefix to use for the name of the output file. Default \code{"sample"}.}
26 30
 
27 31
 \item{overwrite}{Boolean. Default \code{TRUE}.}
28 32
 
29
-\item{compression}{Default \code{None}.If output file compression is required, this variable accepts
30
-'gzip' or 'lzf' as inputs.}
33
+\item{compression}{If output file compression is required, this variable accepts
34
+'gzip' or 'lzf' as inputs. Default \code{None}.}
31 35
 
32
-\item{forceDense}{Default \code{False} Write sparse data as a dense matrix.
33
-Refer anndata.write_h5ad documentation for details}
36
+\item{compressionOpts}{Integer. Sets the compression level}
34 37
 
35
-\item{compression_opts}{Integer. Default \code{NULL} Sets the compression level}
38
+\item{forceDense}{Default \code{False} Write sparse data as a dense matrix.
39
+Refer \code{anndata.write_h5ad} documentation for details. Default \code{NULL}.}
36 40
 }
37 41
 \description{
38 42
 Writes all assays, colData, rowData, reducedDims, and altExps objects in a
... ...
@@ -42,7 +46,9 @@ are available as parameters to this export function and set to defaults. Default
42 46
 overridden at function call.
43 47
 }
44 48
 \examples{
49
+\dontrun{
45 50
 data(sce_chcl, package = "scds")
46 51
 exportSCEtoAnnData(sce=sce_chcl, compression="gzip")
52
+}
47 53
 
48 54
 }
... ...
@@ -17,7 +17,7 @@ exported.}
17 17
 
18 18
 \item{gzipped}{Boolean. \code{TRUE} if the output files are to be
19 19
 gzip compressed. \code{FALSE} otherwise. Default
20
-\code{TRUE} to save disk space.}
20
+\code{TRUE}.}
21 21
 }
22 22
 \description{
23 23
 Writes all assays, colData, rowData, reducedDims, and altExps objects in a
... ...
@@ -13,16 +13,17 @@ importDropEst(
13 13
 )
14 14
 }
15 15
 \arguments{
16
+\item{sampleDirs}{A path to the directory containing the data files. Default "./".}
17
+
18
+\item{dataType}{can be "filtered" or "raw". Default \code{"filtered"}.}
19
+
16 20
 \item{rdsFileName}{File name prefix of the DropEst RDS output. default is "cell.counts"}
17 21
 
22
+\item{sampleNames}{A User-defined sample name. This will be prepended to all cell barcode IDs.
23
+Default "sample".}
24
+
18 25
 \item{delayedArray}{Boolean. Whether to read the expression matrix as
19 26
 \link[DelayedArray]{DelayedArray} object or not. Default \code{TRUE}.}
20
-
21
-\item{sampleDir}{A path to the directory containing the data files. Default "./".}
22
-
23
-\item{sampleName}{A User-defined sample name. This will be prepended to all cell barcode IDs.
24
-Default "sample".
25
-@param dataType can be "filtered" or "raw". Default is "filtered"}
26 27
 }
27 28
 \value{
28 29
 A \code{SingleCellExperiment} object containing the count matrix,
... ...
@@ -44,12 +45,3 @@ subset to contain features from the filtered counts matrix alone.
44 45
 If any annotations of ("saturation_info","merge_targets","reads_per_umi_per_cell") are 
45 46
 found in the DropEst rds, they will be added to the SCE metadata field
46 47
 }
47
-\examples{
48
-Example
49
-Example DropEst outputs were downloaded from the DropEst Github 
50
-(http://pklab.med.harvard.edu/viktor/dropest_paper/dropest_0.8.5.zip). 
51
-To run the dropest import function with the example dataset, 
52
-set the sampleDirs variable to the example dropEst provided in SCTK as follows-
53
-sce <- importDropEst(sampleDirs = c('path/to/dropest/folder/'), 
54
-                     dataType='filtered', sampleNames=c('sample'))
55
-}
... ...
@@ -5,7 +5,9 @@
5 5
 \alias{mouseBrainSubsetSCE}
6 6
 \title{Example Single Cell RNA-Seq data in SCtkExperiment Object, GSE60361
7 7
 subset}
8
-\format{SCtkExperiment}
8
+\format{
9
+SCtkExperiment
10
+}
9 11
 \source{
10 12
 DOI: 10.1126/science.aaa1934
11 13
 }
... ...
@@ -9,7 +9,7 @@ runBarcodeRankDrops(
9 9
   sample = NULL,
10 10
   useAssay = "counts",
11 11
   lower = 100,
12
-  fit.bounds = NULL,
12
+  fitBounds = NULL,
13 13
   df = 20
14 14
 )
15 15
 }
... ...
@@ -19,11 +19,15 @@ Must contain a raw counts matrix before empty droplets have been removed.}
19 19
 
20 20
 \item{sample}{Character vector. Indicates which sample each cell belongs to
21 21
 \link[DropletUtils]{emptyDrops} will be run on cells from each sample separately.
22
-If NULL, then all cells will be processed together. Default NULL.}
22
+If NULL, then all cells will be processed together. Default \code{NULL}.}
23 23
 
24 24
 \item{useAssay}{A string specifying which assay in the SCE to use.}
25 25
 
26
-\item{...}{Additional arguments to pass to \link[DropletUtils]{barcodeRanks}.}
26
+\item{lower}{See \link[DropletUtils]{emptyDrops} for more information. Default \code{100}.}
27
+
28
+\item{fitBounds}{See \link[DropletUtils]{emptyDrops} for more information. Default \code{NULL}.}
29
+
30
+\item{df}{See \link[DropletUtils]{emptyDrops} for more information. Default \code{20}.}
27 31
 }
28 32
 \value{
29 33
 A \link[SingleCellExperiment]{SingleCellExperiment} object with the
... ...
@@ -28,7 +28,19 @@ Default NULL.}
28 28
 
29 29
 \item{seed}{Seed for the random number generator. Default 12345.}
30 30
 
31
-\item{...}{Additional arguments passed to \link[scds]{bcds}.}
31
+\item{ntop}{See \link[scds]{bcds} for more information. Default \code{500}.}
32
+
33
+\item{srat}{See \link[scds]{bcds} for more information. Default \code{1}.}
34
+
35
+\item{verb}{See \link[scds]{bcds} for more information. Default \code{FALSE}.}
36
+
37
+\item{retRes}{See \link[scds]{bcds} for more information. Default \code{FALSE}.}
38
+
39
+\item{nmax}{See \link[scds]{bcds} for more information. Default \code{"tune"}.}
40
+
41
+\item{varImp}{See \link[scds]{bcds} for more information. Default \code{FALSE}.}
42
+
43
+\item{estNdbl}{See \link[scds]{bcds} for more information. Default \code{FALSE}.}
32 44
 }
33 45
 \value{
34 46
 A \link[SingleCellExperiment]{SingleCellExperiment} object with
... ...
@@ -26,7 +26,15 @@ Default NULL.}
26 26
 
27 27
 \item{seed}{Seed for the random number generator. Default 12345.}
28 28
 
29
-\item{...}{Additional arguments passed to \link[scds]{cxds}.}
29
+\item{ntop}{See \link[scds]{cxds} for more information. Default \code{500}.}
30
+
31
+\item{binThresh}{See \link[scds]{cxds} for more information. Default \code{0}.}
32
+
33
+\item{verb}{See \link[scds]{cxds} for more information. Default \code{FALSE}.}
34
+
35
+\item{retRes}{See \link[scds]{cxds} for more information. Default \code{FALSE}.}
36
+
37
+\item{estNdbl}{See \link[scds]{cxds} for more information. Default \code{FALSE}.}
30 38
 }
31 39
 \value{
32 40
 A \link[SingleCellExperiment]{SingleCellExperiment} object with
... ...
@@ -8,8 +8,9 @@ runCxdsBcdsHybrid(
8 8
   inSCE,
9 9
   sample = NULL,
10 10
   seed = 12345,
11
-  cxdsArgs = NULL,
12
-  bcdsArgs = NULL,
11
+  nTop = 500,
12
+  cxdsArgs = list(),
13
+  bcdsArgs = list(),
13 14
   verb = FALSE,
14 15
   estNdbl = FALSE,
15 16
   force = FALSE
... ...
@@ -26,7 +27,18 @@ Default NULL.}
26 27
 
27 28
 \item{seed}{Seed for the random number generator. Default 12345.}
28 29
 
29
-\item{...}{Additional arguments passed to \link[scds]{cxds_bcds_hybrid}.}
30
+\item{nTop}{The number of top varialbe genes to consider. Used in both \code{csds}
31
+and \code{bcds}. Default \code{500}.}
32
+
33
+\item{cxdsArgs}{See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{NULL}.}
34
+
35
+\item{bcdsArgs}{See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{NULL}.}
36
+
37
+\item{verb}{See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{FALSE}.}
38
+
39
+\item{estNdbl}{See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{FALSE}.}
40
+
41
+\item{force}{See \link[scds]{cxds_bcds_hybrid} for more information. Default \code{FALSE}.}
30 42
 }
31 43
 \value{
32 44
 A \link[SingleCellExperiment]{SingleCellExperiment} object with
... ...
@@ -10,12 +10,12 @@ runEmptyDrops(
10 10
   useAssay = "counts",
11 11
   lower = 100,
12 12
   niters = 10000,
13
-  test.ambient = FALSE,
13
+  testAmbient = FALSE,
14 14
   ignore = NULL,
15 15
   alpha = NULL,
16 16
   retain = NULL,
17
-  barcode.args = list(),
18
-  BPPARAM = SerialParam()
17
+  barcodeArgs = list(),
18
+  BPPARAM = BiocParallel::SerialParam()
19 19
 )
20 20
 }
21 21
 \arguments{
... ...
@@ -28,8 +28,21 @@ If NULL, then all cells will be processed together. Default NULL.}
28 28
 
29 29
 \item{useAssay}{A string specifying which assay in the SCE to use.}
30 30
 
31
-\item{...}{Additional arguments to pass to \link[DropletUtils]{emptyDrops}.
32
-matrix.}
31
+\item{lower}{See \link[DropletUtils]{emptyDrops} for more information.}
32
+
33
+\item{niters}{See \link[DropletUtils]{emptyDrops} for more information.}
34
+
35
+\item{testAmbient}{See \link[DropletUtils]{emptyDrops} for more information.}
36
+
37
+\item{ignore}{See \link[DropletUtils]{emptyDrops} for more information.}
38
+
39
+\item{alpha}{See \link[DropletUtils]{emptyDrops} for more information.}
40
+
41
+\item{retain}{See \link[DropletUtils]{emptyDrops} for more information.}
42
+
43
+\item{barcodeArgs}{See \link[DropletUtils]{emptyDrops} for more information.}
44
+
45
+\item{BPPARAM}{See \link[DropletUtils]{emptyDrops} for more information.}
33 46
 }
34 47
 \value{
35 48
 A \link[SingleCellExperiment]{SingleCellExperiment} object with the
... ...
@@ -10,6 +10,7 @@ runScrublet(
10 10
   useAssay = "counts",
11 11
   simDoubletRatio = 2,
12 12
   nNeighbors = NULL,
13
+  minDist = NULL,
13 14
   expectedDoubletRate = 0.1,
14 15
   stdevDoubletRate = 0.02,
15 16
   syntheticDoubletUmiSubsampling = 1,
... ...
@@ -23,6 +24,8 @@ runScrublet(
23 24
   meanCenter = TRUE,
24 25
   normalizeVariance = TRUE,
25 26
   nPrinComps = 30L,
27
+  tsneAngle = NULL,
28
+  tsnePerplexity = NULL,
26 29
   verbose = TRUE,
27 30
   seed = 12345
28 31
 )
... ...
@@ -45,6 +48,9 @@ the number of observed transcriptomes. Default 2.0.}
45 48
 graph of observed transcriptomes and simulated doublets. If \code{NULL},
46 49
 this is set to \code{round(0.5 * sqrt(n_cells))}. Default \code{NULL}.}
47 50
 
51
+\item{minDist}{Float Determines how tightly UMAP packs points together. If \code{NULL},
52
+this is set to 0.1. Default \code{NULL}.}
53
+
48 54
 \item{expectedDoubletRate}{The estimated doublet rate for the experiment.
49 55
 Default 0.1.}
50 56
 
... ...
@@ -103,6 +109,13 @@ reduction, unless \code{meanCenter} is \code{TRUE}. Default \code{TRUE}.}
103 109
 the transcriptomes prior to k-nearest-neighbor graph construction.
104 110
 Default 30.}
105 111
 
112
+\item{tsneAngle}{Float. Determines angular size of a distant node as measured 
113
+from a point in the t-SNE plot. If default, it is set to 0.5 Default \code{NULL}.}
114
+
115
+\item{tsnePerplexity}{Integer. The number of nearest neighbors that
116
+is used in other manifold learning algorithms.
117
+If default, it is set to 30. Default \code{NULL}.}
118
+
106 119
 \item{verbose}{Boolean. If \code{TRUE}, print progress updates. Default
107 120
 \code{TRUE}.}
108 121
 
... ...
@@ -5,7 +5,9 @@
5 5
 \alias{sceBatches}
6 6
 \title{Example Single Cell RNA-Seq data in SingleCellExperiment object, with
7 7
 different batches annotated}
8
-\format{SingleCellExperiment}
8
+\format{
9
+SingleCellExperiment
10
+}
9 11
 \source{
10 12
 DOI: 10.2337/db16-0405 and 10.1016/j.cmet.2016.08.018
11 13
 }
... ...
@@ -20,8 +20,6 @@ sctkPythonInstallVirtualEnv(
20 20
 \item{selectEnvironment}{Boolean. Run \code{\link[singleCellTK]{selectSCTKVirtualEnvironment}} after installing all packages to select the virtual environment. Default TRUE.}
21 21
 
22 22
 \item{python}{The path to a Python interpreter, to be used with the created virtual environment. When NULL, the Python interpreter associated with the current session will be used. Default NULL.}
23
-
24
-\item{...}{Other parameters to pass to \code{\link[reticulate]{conda_install}}.}
25 23
 }
26 24
 \description{
27 25
 Install all Python packages used in the \code{\link{singleCellTK}} package