Browse code

Merge branch 'master' of github.com:compbiomed/singleCellTK

Yusuke Koga authored on 16/10/2020 00:27:01
Showing 33 changed files

... ...
@@ -10,7 +10,7 @@
10 10
   # Patch delayed decorator.
11 11
   if (! is.null({pretty_patched = attr(decorator, 'calls')}))
12 12
     pretty_decorators = c(pretty_patched, pretty_decorators[-1])
13
-  
13
+
14 14
   # Handle operator precedence so that we can chain decorators.
15 15
   if (inherits(f, 'decorator'))
16 16
     .delayed_decorate(decorator, f, pretty_decorators)
... ...
@@ -29,7 +29,7 @@ print.decorated = function (x, useSource = TRUE, ...) {
29 29
     attr(bare, 'decorators') = NULL
30 30
     bare
31 31
   }
32
-  
32
+
33 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')
... ...
@@ -54,11 +54,12 @@ pretty_code = function (f) {
54 54
 .delayed_decorate = function (d1, d2, decorator_calls)
55 55
   structure(decorator(function (f) d1(d2(f))), calls = decorator_calls)
56 56
 
57
-#' 
57
+#'
58 58
 #' @name simpleLog
59 59
 #' @title A decorator that prints the arguments to the decorated function
60 60
 #' @param f A function to decorate
61
-#' 
61
+#' @return Prints message
62
+#'
62 63
 simpleLog <- decorator %@% function(f) {
63 64
   function(...) {
64 65
     message(deparse(match.call()))
... ...
@@ -18,6 +18,7 @@
18 18
 #' @param compressionOpts Integer. Sets the compression level
19 19
 #' @param forceDense Default \code{False} Write sparse data as a dense matrix.
20 20
 #' Refer \code{anndata.write_h5ad} documentation for details. Default \code{NULL}.
21
+#' @return Generates a Python anndata object containing data from \code{inSCE}.
21 22
 #' @examples
22 23
 #' data(sce_chcl, package = "scds")
23 24
 #' exportSCEtoAnnData(sce=sce_chcl, compression="gzip")
... ...
@@ -11,6 +11,7 @@
11 11
 #'  gzip compressed. \code{FALSE} otherwise. Default
12 12
 #'  \code{TRUE}.
13 13
 #' @param sample Name of the sample. It will be used as the prefix of file names.
14
+#' @return Generates text files containing data from \code{inSCE}.
14 15
 #' @examples
15 16
 #' data(sce_chcl, package = "scds")
16 17
 #' exportSCEtoFlatFile(sce_chcl, "sce_chcl")
... ...
@@ -37,6 +37,7 @@
37 37
 #'  68,579 peripheral blood mononuclear cells (PBMCs) from 10X Genomics.}
38 38
 #' }
39 39
 #' @author Joshua D. Campbell, David Jenkins
40
+#' @return The specified \link[SingleCellExperiment]{SingleCellExperiment} object.
40 41
 #' @examples
41 42
 #' sce <- importExampleData("pbmc3k")
42 43
 #' @export
... ...
@@ -35,6 +35,9 @@
35 35
 #' \link{importGeneSetsFromCollection} for importing from
36 36
 #' \linkS4class{GeneSetCollection} objects, and
37 37
 #' \link{importGeneSetsFromMSigDB} for importing MSigDB gene sets.
38
+#' @return A \link[SingleCellExperiment]{SingleCellExperiment} object
39
+#'  with gene set from \code{collectionName} output stored to the
40
+#'  \link[SummarizedExperiment]{metadata} slot.
38 41
 #' @examples
39 42
 #' data(scExample)
40 43
 #'
... ...
@@ -87,6 +90,9 @@ importGeneSetsFromGMT <- function(inSCE, file,
87 90
 #' can point to different locations within \code{inSCE}. See
88 91
 #' \link{featureIndex} for more information.
89 92
 #' Default \code{"rownames"}.
93
+#' @return A \link[SingleCellExperiment]{SingleCellExperiment} object
94
+#' with gene set from \code{collectionName} output stored to the
95
+#' \link[SummarizedExperiment]{metadata} slot.
90 96
 #' @details The gene identifiers in gene sets in \code{geneSetList} will be
91 97
 #' mapped to the rownames of \code{inSCE} using the \code{by} parameter and
92 98
 #' stored in a \linkS4class{GeneSetCollection} object from package
... ...
@@ -182,6 +188,9 @@ importGeneSetsFromList <- function(inSCE, geneSetList,
182 188
 #' in the \code{GeneSetCollection}.
183 189
 #' See \link{featureIndex} for more information.
184 190
 #' Default \code{"rownames"}.
191
+#' @return A \link[SingleCellExperiment]{SingleCellExperiment} object
192
+#' with gene set from \code{collectionName} output stored to the
193
+#' \link[SummarizedExperiment]{metadata} slot.
185 194
 #' @details The gene identifiers in gene sets in the
186 195
 #' \code{GeneSetCollection} will be mapped to the rownames of
187 196
 #' \code{inSCE} using the \code{by} parameter and
... ...
@@ -304,6 +313,9 @@ importGeneSetsFromCollection <- function(inSCE, geneSetCollection,
304 313
 #' of \code{inSCE}. See \link{featureIndex} for more information.
305 314
 #' Default \code{"rownames"}.
306 315
 #' @param verbose Boolean. Whether to display progress. Default \code{TRUE}.
316
+#' @return A \link[SingleCellExperiment]{SingleCellExperiment} object
317
+#' with gene set from \code{collectionName} output stored to the
318
+#' \link[SummarizedExperiment]{metadata} slot.
307 319
 #' @details The gene identifiers in gene sets from MSigDB will be retrieved
308 320
 #' using the \code{\link{msigdbr}} package. They will be mapped to the IDs in
309 321
 #' \code{inSCE} using the \code{by} parameter and
... ...
@@ -420,6 +432,7 @@ importGeneSetsFromMSigDB <- function(inSCE, categoryIDs,
420 432
 #' @description Returns a vector of GeneSetCollections that have been
421 433
 #' imported and stored in \code{metadata(inSCE)$sctk$genesets}.
422 434
 #' @param inSCE A \link[SingleCellExperiment]{SingleCellExperiment} object.
435
+#' @return Character vector.
423 436
 #' @author Joshua D. Campbell
424 437
 #' @seealso \link{importGeneSetsFromList} for importing from lists,
425 438
 #' \link{importGeneSetsFromGMT} for importing from GMT files,
... ...
@@ -456,6 +469,7 @@ sctkListGeneSetCollections <- function(inSCE) {
456 469
 #' @description Returns a data.frame that shows MSigDB categories and
457 470
 #' subcategories as well as descriptions for each. The entries in the ID
458 471
 #' column in this table can be used as input for \link{importGeneSetsFromMSigDB}.
472
+#' @return data.frame, containing MSigDB categories
459 473
 #' @author Joshua D. Campbell
460 474
 #' @seealso \link{importGeneSetsFromMSigDB} for importing MSigDB gene sets.
461 475
 #' @export
... ...
@@ -6,6 +6,7 @@
6 6
 #' used when running a differential expression analysis function.
7 7
 #' @param labelBy A single character for a column of \code{rowData(inSCE)} as
8 8
 #' where to search for the labeling text. Default \code{NULL}.
9
+#' @return Stop point if found
9 10
 .checkDiffExpResultExists <- function(inSCE, useResult, labelBy = NULL){
10 11
   if(!inherits(inSCE, 'SingleCellExperiment')){
11 12
     stop('Given object is not a valid SingleCellExperiment object.')
... ...
@@ -43,6 +43,7 @@
43 43
 #' @param rowIndexLocation Character. For Optimus output, The path to the
44 44
 #'  feature (gene) index .npy file. Used only if \code{file} has .npz extension.
45 45
 #'  Default \code{NULL}.
46
+#' @return A \link[DelayedArray]{DelayedArray} object or matrix.
46 47
 #' @examples
47 48
 #' mat <- readSingleCellMatrix(system.file("extdata/hgmm_1k_v3_20x20/outs/",
48 49
 #'     "filtered_feature_bc_matrix/matrix.mtx.gz", package = "singleCellTK"))
... ...
@@ -44,6 +44,7 @@ ad <- NULL
44 44
 #'        to install via pip due to compilation requirements).
45 45
 #' @param pythonVersion Passed to \code{python_version} variable in \code{\link[reticulate]{conda_install}}. Default NULL.
46 46
 #' @param ... Other parameters to pass to \code{\link[reticulate]{conda_install}}.
47
+#' @return None. Installation of Conda environment.
47 48
 #' @examples
48 49
 #' \dontrun{
49 50
 #' sctkPythonInstallConda(envname = "sctk-reticulate")
... ...
@@ -93,6 +94,7 @@ sctkPythonInstallConda <- function(envname = "sctk-reticulate",
93 94
 #' @param packages Character Vector. List of packages to install.
94 95
 #' @param selectEnvironment Boolean. Run \code{\link[singleCellTK]{selectSCTKVirtualEnvironment}} after installing all packages to select the virtual environment. Default TRUE.
95 96
 #' @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
+#' @return None. Installation of virtual environment.
96 98
 #' @examples
97 99
 #' \dontrun{
98 100
 #' sctkPythonInstallVirtualEnv(envname = "sctk-reticulate")
... ...
@@ -124,6 +126,7 @@ sctkPythonInstallVirtualEnv <- function(envname = "sctk-reticulate",
124 126
 #' @title Selects a Conda environment
125 127
 #' @description Selects a Conda environment with Python packages used in \code{\link{singleCellTK}}.
126 128
 #' @param envname Character. Name of the conda environment to activate.
129
+#' @return None. Selects Conda environment.
127 130
 #' @examples
128 131
 #' \dontrun{
129 132
 #' sctkPythonInstallConda(envname = "sctk-reticulate", selectConda = FALSE)
... ...
@@ -157,6 +160,7 @@ selectSCTKConda <- function(envname = "sctk-reticulate") {
157 160
 #' @title Selects a virtual environment
158 161
 #' @description Selects a virtual environment with Python packages used in \code{\link{singleCellTK}}
159 162
 #' @param envname Character. Name of the virtual environment to activate.
163
+#' @return None. Selects virtual environment.
160 164
 #' @examples
161 165
 #' \dontrun{
162 166
 #' sctkPythonInstallVirtualEnv(envname = "sctk-reticulate", selectEnvironment = FALSE)
... ...
@@ -106,16 +106,19 @@
106 106
     return(df)
107 107
 }
108 108
 
109
-#' @title Plot table of SCTK QC outputs.
110
-#' @description Plot QC metrics generated from QC algorithms via either kable or csv file.
109
+#' @title Generate table of SCTK QC outputs.
110
+#' @description  Creates a table of QC metrics generated from
111
+#'  QC algorithms via either kable or csv file.
111 112
 #' @param inSCE Input \linkS4class{SingleCellExperiment} object with saved
112
-#' dimension reduction components or a variable with saved results. Required
113
+#' \link[SummarizedExperiment]{assay} data and/or
114
+#' \link[SummarizedExperiment]{colData} data. Required.
113 115
 #' @param sample Character vector. Indicates which sample each cell belongs to.
114 116
 #' @param useAssay  A string specifying which assay in the SCE to use. Default
115 117
 #'  'counts'.
116 118
 #' @param simple Boolean. Indicates whether to generate a table of only
117 119
 #' basic QC stats (ex. library size), or to generate a summary table of all
118 120
 #' QC stats stored in the inSCE.
121
+#' @return A matrix/array object.
119 122
 #' @examples
120 123
 #' data(scExample, package = "singleCellTK")
121 124
 #' sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
... ...
@@ -9,6 +9,7 @@
9 9
 #' @param directory Output directory. Default is './'.
10 10
 #' @param format The format of output. It currently supports flat files, rds files
11 11
 #' and python h5 files. It can output multiple formats. Default: c("SCE", "AnnData", "FlatFile", "HTAN").
12
+#' @return Generates a file containing data from \code{inSCE} as \code{format}.
12 13
 #' @examples
13 14
 #' exportSCE(mouseBrainSubsetSCE, format = "SCE")
14 15
 #' @export
... ...
@@ -190,6 +191,7 @@ generateMeta <- function(dropletSCE = NULL,
190 191
 #' @param samplename The sample name of the \link[SingleCellExperiment]{SingleCellExperiment} objects.
191 192
 #' @param writeYAML Whether output yaml file to store parameters. Default if TRUE. If FALSE,
192 193
 #' return character object.
194
+#' @return If \code{writeYAML} TRUE, a yaml object will be generated. If FALSE, character object.
193 195
 #' @export
194 196
 getSceParams <- function(inSCE,
195 197
                          skip = c("scrublet", "runDecontX","runBarcodeRanksMetaOutput"),
... ...
@@ -493,6 +493,8 @@ seuratHeatmapPlot <- function(plotObject, dims, ncol, labels) {
493 493
 #' @param assaySlotSCE Selected assay to update in the input SingleCellExperiment object
494 494
 #' @param seuratDataSlot Selected data slot from the Seurat object. Default \code{"counts"}.
495 495
 #' @param seuratAssaySlot Selected assay from Seurat object. Default \code{"RNA"}.
496
+#' @return A \link[SingleCellExperiment]{SingleCellExperiment} object with
497
+#'  data from Seurat object appended to the \link[SummarizedExperiment]{assay} slot.
496 498
 #' @importFrom SummarizedExperiment assay<-
497 499
 .updateAssaySCE <- function(inSCE, seuratObject, assaySlotSCE, seuratDataSlot = "counts", seuratAssaySlot = "RNA") {
498 500
   assay(inSCE, assaySlotSCE) <- NULL
... ...
@@ -17,6 +17,9 @@ used when running a differential expression analysis function.}
17 17
 \item{labelBy}{A single character for a column of \code{rowData(inSCE)} as
18 18
 where to search for the labeling text. Default \code{NULL}.}
19 19
 }
20
+\value{
21
+Stop point if found
22
+}
20 23
 \description{
21 24
 Check if the specified MAST result in SingleCellExperiment object is
22 25
 complete. But does not garantee the biological correctness.
... ...
@@ -24,6 +24,10 @@ Update/Modify/Add an assay in the provided SingleCellExperiment object from a Se
24 24
 
25 25
 \item{seuratAssaySlot}{Selected assay from Seurat object. Default \code{"RNA"}.}
26 26
 }
27
+\value{
28
+A \link[SingleCellExperiment]{SingleCellExperiment} object with
29
+ data from Seurat object appended to the \link[SummarizedExperiment]{assay} slot.
30
+}
27 31
 \description{
28 32
 .updateAssaySCE
29 33
 Update/Modify/Add an assay in the provided SingleCellExperiment object from a Seurat object
... ...
@@ -28,6 +28,9 @@ It can be 'Droplets'(raw droplets matrix) or 'Cells' (cells matrix).}
28 28
 \item{format}{The format of output. It currently supports flat files, rds files
29 29
 and python h5 files. It can output multiple formats. Default: c("SCE", "AnnData", "FlatFile", "HTAN").}
30 30
 }
31
+\value{
32
+Generates a file containing data from \code{inSCE} as \code{format}.
33
+}
31 34
 \description{
32 35
 Export data in SingleCellExperiment object
33 36
 }
... ...
@@ -38,6 +38,9 @@ Default \code{"counts"}.}
38 38
 \item{forceDense}{Default \code{False} Write sparse data as a dense matrix.
39 39
 Refer \code{anndata.write_h5ad} documentation for details. Default \code{NULL}.}
40 40
 }
41
+\value{
42
+Generates a Python anndata object containing data from \code{inSCE}.
43
+}
41 44
 \description{
42 45
 Writes all assays, colData, rowData, reducedDims, and altExps objects in a
43 46
 \link[SingleCellExperiment]{SingleCellExperiment} to a Python annData object in the .h5ad format
... ...
@@ -27,6 +27,9 @@ gzip compressed. \code{FALSE} otherwise. Default
27 27
 
28 28
 \item{sample}{Name of the sample. It will be used as the prefix of file names.}
29 29
 }
30
+\value{
31
+Generates text files containing data from \code{inSCE}.
32
+}
30 33
 \description{
31 34
 Writes all assays, colData, rowData, reducedDims, and altExps objects in a
32 35
 \link[SingleCellExperiment]{SingleCellExperiment} to text files.
... ...
@@ -6,6 +6,9 @@
6 6
 \usage{
7 7
 getMSigDBTable()
8 8
 }
9
+\value{
10
+data.frame, containing MSigDB categories
11
+}
9 12
 \description{
10 13
 Returns a data.frame that shows MSigDB categories and
11 14
 subcategories as well as descriptions for each. The entries in the ID
... ...
@@ -28,6 +28,9 @@ getSceParams(
28 28
 \item{writeYAML}{Whether output yaml file to store parameters. Default if TRUE. If FALSE,
29 29
 return character object.}
30 30
 }
31
+\value{
32
+If \code{writeYAML} TRUE, a yaml object will be generated. If FALSE, character object.
33
+}
31 34
 \description{
32 35
 Extract QC parameters from the SingleCellExperiment object
33 36
 }
... ...
@@ -18,6 +18,9 @@ will store the data as a sparse matrix from package \link{Matrix} while
18 18
 \item{delayedArray}{Boolean. Whether to read the expression matrix as
19 19
 \link[DelayedArray]{DelayedArray} object or not. Default \code{FALSE}.}
20 20
 }
21
+\value{
22
+The specified \link[SingleCellExperiment]{SingleCellExperiment} object.
23
+}
21 24
 \description{
22 25
 Retrieves published example datasets stored in
23 26
 \link[SingleCellExperiment]{SingleCellExperiment} using the
... ...
@@ -37,6 +37,11 @@ in the \code{GeneSetCollection}.
37 37
 See \link{featureIndex} for more information.
38 38
 Default \code{"rownames"}.}
39 39
 }
40
+\value{
41
+A \link[SingleCellExperiment]{SingleCellExperiment} object
42
+with gene set from \code{collectionName} output stored to the
43
+\link[SummarizedExperiment]{metadata} slot.
44
+}
40 45
 \description{
41 46
 Converts a list of gene sets stored in a
42 47
 \linkS4class{GeneSetCollection} object and stores it in the metadata of the
... ...
@@ -39,6 +39,11 @@ Default \code{"rownames"}.}
39 39
 
40 40
 \item{sep}{Character. Delimiter of the GMT file. Default \code{"\t"}.}
41 41
 }
42
+\value{
43
+A \link[SingleCellExperiment]{SingleCellExperiment} object
44
+ with gene set from \code{collectionName} output stored to the
45
+ \link[SummarizedExperiment]{metadata} slot.
46
+}
42 47
 \description{
43 48
 Converts a list of gene sets stored in a GMT file into a
44 49
 \linkS4class{GeneSetCollection} and stores it in the metadata of the
... ...
@@ -36,6 +36,11 @@ can point to different locations within \code{inSCE}. See
36 36
 \link{featureIndex} for more information.
37 37
 Default \code{"rownames"}.}
38 38
 }
39
+\value{
40
+A \link[SingleCellExperiment]{SingleCellExperiment} object
41
+with gene set from \code{collectionName} output stored to the
42
+\link[SummarizedExperiment]{metadata} slot.
43
+}
39 44
 \description{
40 45
 Converts a list of gene sets into a
41 46
 \linkS4class{GeneSetCollection} and stores it in the metadata of the
... ...
@@ -39,6 +39,11 @@ Default \code{"rownames"}.}
39 39
 
40 40
 \item{verbose}{Boolean. Whether to display progress. Default \code{TRUE}.}
41 41
 }
42
+\value{
43
+A \link[SingleCellExperiment]{SingleCellExperiment} object
44
+with gene set from \code{collectionName} output stored to the
45
+\link[SummarizedExperiment]{metadata} slot.
46
+}
42 47
 \description{
43 48
 Gets a list of MSigDB gene sets stores it in the metadata of the
44 49
 \linkS4class{SingleCellExperiment} object. These gene sets can be used in
... ...
@@ -33,6 +33,9 @@ Default \code{NULL}.}
33 33
 feature (gene) index .npy file. Used only if \code{file} has .npz extension.
34 34
 Default \code{NULL}.}
35 35
 }
36
+\value{
37
+A \link[DelayedArray]{DelayedArray} object or matrix.
38
+}
36 39
 \description{
37 40
 Automatically detact the format of the input file and read
38 41
  the file.
... ...
@@ -2,13 +2,14 @@
2 2
 % Please edit documentation in R/sampleSummaryStats.R
3 3
 \name{sampleSummaryStats}
4 4
 \alias{sampleSummaryStats}
5
-\title{Plot table of SCTK QC outputs.}
5
+\title{Generate table of SCTK QC outputs.}
6 6
 \usage{
7 7
 sampleSummaryStats(inSCE, sample = NULL, useAssay = "counts", simple = TRUE)
8 8
 }
9 9
 \arguments{
10 10
 \item{inSCE}{Input \linkS4class{SingleCellExperiment} object with saved
11
-dimension reduction components or a variable with saved results. Required}
11
+\link[SummarizedExperiment]{assay} data and/or
12
+\link[SummarizedExperiment]{colData} data. Required.}
12 13
 
13 14
 \item{sample}{Character vector. Indicates which sample each cell belongs to.}
14 15
 
... ...
@@ -19,8 +20,12 @@ dimension reduction components or a variable with saved results. Required}
19 20
 basic QC stats (ex. library size), or to generate a summary table of all
20 21
 QC stats stored in the inSCE.}
21 22
 }
23
+\value{
24
+A matrix/array object.
25
+}
22 26
 \description{
23
-Plot QC metrics generated from QC algorithms via either kable or csv file.
27
+Creates a table of QC metrics generated from
28
+ QC algorithms via either kable or csv file.
24 29
 }
25 30
 \examples{
26 31
 data(scExample, package = "singleCellTK")
... ...
@@ -9,6 +9,9 @@ sctkListGeneSetCollections(inSCE)
9 9
 \arguments{
10 10
 \item{inSCE}{A \link[SingleCellExperiment]{SingleCellExperiment} object.}
11 11
 }
12
+\value{
13
+Character vector.
14
+}
12 15
 \description{
13 16
 Returns a vector of GeneSetCollections that have been
14 17
 imported and stored in \code{metadata(inSCE)$sctk$genesets}.
... ...
@@ -37,6 +37,9 @@ to install via pip due to compilation requirements).}
37 37
 
38 38
 \item{...}{Other parameters to pass to \code{\link[reticulate]{conda_install}}.}
39 39
 }
40
+\value{
41
+None. Installation of Conda environment.
42
+}
40 43
 \description{
41 44
 Install all Python packages used in the \code{\link{singleCellTK}} package
42 45
 using \code{\link[reticulate]{conda_install}} from package \code{\link{reticulate}}. This
... ...
@@ -21,6 +21,9 @@ sctkPythonInstallVirtualEnv(
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 23
 }
24
+\value{
25
+None. Installation of virtual environment.
26
+}
24 27
 \description{
25 28
 Install all Python packages used in the \code{\link{singleCellTK}} package
26 29
 using \code{\link[reticulate]{virtualenv_install}} from package \code{\link{reticulate}}. This
... ...
@@ -9,6 +9,9 @@ selectSCTKConda(envname = "sctk-reticulate")
9 9
 \arguments{
10 10
 \item{envname}{Character. Name of the conda environment to activate.}
11 11
 }
12
+\value{
13
+None. Selects Conda environment.
14
+}
12 15
 \description{
13 16
 Selects a Conda environment with Python packages used in \code{\link{singleCellTK}}.
14 17
 }
... ...
@@ -9,6 +9,9 @@ selectSCTKVirtualEnvironment(envname = "sctk-reticulate")
9 9
 \arguments{
10 10
 \item{envname}{Character. Name of the virtual environment to activate.}
11 11
 }
12
+\value{
13
+None. Selects virtual environment.
14
+}
12 15
 \description{
13 16
 Selects a virtual environment with Python packages used in \code{\link{singleCellTK}}
14 17
 }
... ...
@@ -9,6 +9,9 @@ simpleLog(f)
9 9
 \arguments{
10 10
 \item{f}{A function to decorate}
11 11
 }
12
+\value{
13
+Prints message
14
+}
12 15
 \description{
13 16
 A decorator that prints the arguments to the decorated function
14 17
 }
... ...
@@ -25,10 +25,14 @@ then \code{"x < 5"} will return all columns with x less than 5.
25 25
 Single quotes should be used for character strings. For example,
26 26
 \code{"y == 'yes'"} will return all columns where y is "yes".
27 27
 Multiple expressions can be evaluated by placing them in a vector.
28
-For example \code{c("x < 5", "y =='yes'")} will apply both operations for 
28
+For example \code{c("x < 5", "y =='yes'")} will apply both operations for
29 29
 subsetting. If \code{NULL}, this will not be used for subsetting.
30 30
 Default \code{NULL}.}
31 31
 }
32
+\value{
33
+A \link[SingleCellExperiment]{SingleCellExperiment} object that has
34
+been subsetted by colData.
35
+}
32 36
 \description{
33 37
 Used to peform subsetting of a
34 38
 \linkS4class{SingleCellExperiment} object using a variety of methods that
... ...
@@ -38,7 +42,7 @@ with one another.
38 42
 }
39 43
 \examples{
40 44
 data(scExample)
41
-sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")                          
45
+sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
42 46
 }
43 47
 \author{
44 48
 Joshua D. Campbell
... ...
@@ -29,14 +29,14 @@ for subsetting. Default \code{NULL}.}
29 29
 \item{rowData}{Character. An expression that will identify a subset of rows
30 30
 using variables found in the \code{rowData} of \code{inSCE}. For example,
31 31
 if \code{x} is a numeric vector in \code{rowData}, then \code{"x < 5"} will
32
-return all rows with x less than 5. Single quotes should be used for 
32
+return all rows with x less than 5. Single quotes should be used for
33 33
 character strings. For example, \code{"y == 'yes'"} will return all
34 34
 rows where y is "yes". Multiple expressions can be evaluated by placing them
35 35
 in a vector. For example \code{c("x < 5", "y =='yes'")} will apply both
36 36
 operations for subsetting. If \code{NULL}, this will not be used for
37 37
 subsetting. Default \code{NULL}.}
38 38
 
39
-\item{returnAsAltExp}{Boolean. If \code{TRUE}, the subsetted 
39
+\item{returnAsAltExp}{Boolean. If \code{TRUE}, the subsetted
40 40
 \linkS4class{SingleCellExperiment} object will be returned in the
41 41
 \code{altExp} slot of \code{inSCE}. If \code{FALSE}, the subsetted
42 42
 \linkS4class{SingleCellExperiment} object will be directly returned.}
... ...
@@ -48,6 +48,10 @@ add if \code{returnAsAltExp = TRUE}. Default \code{subset}.}
48 48
 be added to the beginning of the assay names in the \code{altExp} object.
49 49
 This is only utilized if \code{returnAsAltExp = TRUE}. Default \code{TRUE}.}
50 50
 }
51
+\value{
52
+A \link[SingleCellExperiment]{SingleCellExperiment} object that has
53
+been subsetted by rowData.
54
+}
51 55
 \description{
52 56
 Used to peform subsetting of a
53 57
 \linkS4class{SingleCellExperiment} object using a variety of methods that
... ...
@@ -64,7 +68,7 @@ data(scExample)
64 68
 # Set a variable up in the rowData indicating mitochondrial genes
65 69
 rowData(sce)$isMito <- ifelse(grepl("^MT-", rowData(sce)$feature_name),
66 70
                               "yes", "no")
67
-sce <- subsetSCERows(sce, rowData = "isMito == 'yes'")                          
71
+sce <- subsetSCERows(sce, rowData = "isMito == 'yes'")
68 72
 }
69 73
 \author{
70 74
 Joshua D. Campbell