Browse code

Updated gsva() manual page.

Robert Castelo authored on 30/03/2021 13:25:12
Showing 1 changed files
... ...
@@ -196,13 +196,14 @@ Estimates GSVA enrichment scores.
196 196
 
197 197
 \details{
198 198
 GSVA assesses the relative enrichment of gene sets across samples using
199
-a non-parametric approach.  Conceptually, GSVA transforms a p-gene by n-sample
199
+a non-parametric approach. Conceptually, GSVA transforms a p-gene by n-sample
200 200
 gene expression matrix into a g-geneset by n-sample pathway enrichment matrix.
201 201
 This facilitates many forms of statistical analysis in the 'space' of pathways
202 202
 rather than genes, providing a higher level of interpretability.
203 203
 
204 204
 By default, \code{gsva()} will try to match the identifiers in \code{expr} to
205
-the identifiers in \code{gset.idx.list} just as they are, unless the \code{annotation} argument is set.
205
+the identifiers in \code{gset.idx.list} just as they are, unless the
206
+\code{annotation} argument is set.
206 207
 
207 208
 The \code{gsva()} function first maps the identifiers in the gene sets in
208 209
 \code{gset.idx.list} to the identifiers in the input expression data \code{expr}.
... ...
@@ -228,6 +229,9 @@ the relationships between the type of identifiers in \code{expr} and \code{gset.
228 229
 The collection of gene sets resulting from the previous identifier matching,
229 230
 can be further filtered to require a minimun and/or maximum size by using the
230 231
 arguments \code{min.sz} and \code{max.sz}.
232
+
233
+If you use GSVA in your research, please cite also the corresponding method as
234
+described in the \code{method} parameter.
231 235
 }
232 236
 \value{
233 237
 A gene-set by sample matrix (of \code{matrix} or \code{dgCMatrix} type, 
Browse code

added hdf5 support for plage method

pablo-rodr-bio2 authored on 20/11/2020 18:38:41
Showing 1 changed files
... ...
@@ -1,5 +1,6 @@
1 1
 \name{gsva}
2 2
 \alias{gsva}
3
+\alias{gsva,HDF5Array,list-method}
3 4
 \alias{gsva,SingleCellExperiment,list-method}
4 5
 \alias{gsva,dgCMatrix,list-method}
5 6
 \alias{gsva,SummarizedExperiment,list-method}
... ...
@@ -30,6 +31,18 @@ Estimates GSVA enrichment scores.
30 31
     ssgsea.norm=TRUE,
31 32
     verbose=TRUE,
32 33
     BPPARAM=SerialParam(progressbar=verbose))
34
+\S4method{gsva}{HDF5Array,list}(expr, gset.idx.list, annotation,
35
+    method=c("gsva", "ssgsea", "zscore", "plage"),
36
+    kcdf=c("Gaussian", "Poisson", "none"),
37
+    abs.ranking=FALSE,
38
+    min.sz=1,
39
+    max.sz=Inf,
40
+    parallel.sz=1L,
41
+    mx.diff=TRUE,
42
+    tau=switch(method, gsva=1, ssgsea=0.25, NA),
43
+    ssgsea.norm=TRUE,
44
+    verbose=TRUE,
45
+    BPPARAM=SerialParam(progressbar=verbose))
33 46
 \S4method{gsva}{dgCMatrix,list}(expr, gset.idx.list, annotation,
34 47
     method=c("gsva", "ssgsea", "zscore", "plage"),
35 48
     kcdf=c("Gaussian", "Poisson", "none"),
... ...
@@ -120,7 +133,8 @@ Estimates GSVA enrichment scores.
120 133
               \code{SummarizedExperiment}, \code{SingleCellExperiment}
121 134
               \code{ExpressionSet} object, or as a matrix of expression
122 135
               values where rows correspond to genes and columns correspond to samples.
123
-              This matrix can be also in a sparse format, as a \code{dgCMatrix}.}
136
+              This matrix can be also in a sparse format, as a \code{dgCMatrix}, or
137
+              as an on-disk backend representation, such as \code{HDF5Array} .}
124 138
   \item{gset.idx.list}{Gene sets provided either as a \code{list} object or as a
125 139
                        \code{GeneSetCollection} object.}
126 140
   \item{annotation}{In the case of calling \code{gsva()} on a
Browse code

adding dgCMatrix/list support

pablo-rodr-bio2 authored on 02/11/2020 18:20:08
Showing 1 changed files
... ...
@@ -1,6 +1,7 @@
1 1
 \name{gsva}
2 2
 \alias{gsva}
3 3
 \alias{gsva,SingleCellExperiment,list-method}
4
+\alias{gsva,dgCMatrix,list-method}
4 5
 \alias{gsva,SummarizedExperiment,list-method}
5 6
 \alias{gsva,SummarizedExperiment,GeneSetCollection-method}
6 7
 \alias{gsva,ExpressionSet,list-method}
... ...
@@ -29,6 +30,18 @@ Estimates GSVA enrichment scores.
29 30
     ssgsea.norm=TRUE,
30 31
     verbose=TRUE,
31 32
     BPPARAM=SerialParam(progressbar=verbose))
33
+\S4method{gsva}{dgCMatrix,list}(expr, gset.idx.list, annotation,
34
+    method=c("gsva", "ssgsea", "zscore", "plage"),
35
+    kcdf=c("Gaussian", "Poisson", "none"),
36
+    abs.ranking=FALSE,
37
+    min.sz=1,
38
+    max.sz=Inf,
39
+    parallel.sz=1L,
40
+    mx.diff=TRUE,
41
+    tau=switch(method, gsva=1, ssgsea=0.25, NA),
42
+    ssgsea.norm=TRUE,
43
+    verbose=TRUE,
44
+    BPPARAM=SerialParam(progressbar=verbose))
32 45
 \S4method{gsva}{SummarizedExperiment,GeneSetCollection}(expr, gset.idx.list, annotation,
33 46
     method=c("gsva", "ssgsea", "zscore", "plage"),
34 47
     kcdf=c("Gaussian", "Poisson", "none"),
... ...
@@ -106,7 +119,8 @@ Estimates GSVA enrichment scores.
106 119
   \item{expr}{Gene expression data which can be given either as a
107 120
               \code{SummarizedExperiment}, \code{SingleCellExperiment}
108 121
               \code{ExpressionSet} object, or as a matrix of expression
109
-              values where rows correspond to genes and columns correspond to samples.}
122
+              values where rows correspond to genes and columns correspond to samples.
123
+              This matrix can be also in a sparse format, as a \code{dgCMatrix}.}
110 124
   \item{gset.idx.list}{Gene sets provided either as a \code{list} object or as a
111 125
                        \code{GeneSetCollection} object.}
112 126
   \item{annotation}{In the case of calling \code{gsva()} on a
... ...
@@ -190,10 +204,11 @@ However, then the input gene sets in \code{gset.idx.list} is provided as a
190 204
 those identifiers to the type of identifier in the input expression data \code{expr}.
191 205
 Such an automatic conversion, however, will only occur in three scenarios: 1. when
192 206
 \code{expr} is an \code{ExpressionSet} object with an appropriately set
193
-\code{annotation} slot; 2. when \code{expr} is a \code{SummarizedExperiment} object
194
-with an appropriately set \code{annotation} slot in the metadata of \code{expr};
195
-3. when \code{expr} is a \code{matrix} and the \code{annotation} argument of the
196
-\code{gsva()} function is set to the name of the annotation package that provides
207
+\code{annotation} slot; 2. when \code{expr} is a \code{SummarizedExperiment} or a
208
+\code{SingleCellExperiment} object with an appropriately set \code{annotation} slot
209
+in the metadata of \code{expr}; 3. when \code{expr} is a \code{matrix} or a 
210
+\code{dgCMatrix} and the \code{annotation} argument of the \code{gsva()} function
211
+is set to the name of the annotation package that provides
197 212
 the relationships between the type of identifiers in \code{expr} and \code{gset.idx.list}.
198 213
 
199 214
 The collection of gene sets resulting from the previous identifier matching,
... ...
@@ -201,7 +216,8 @@ can be further filtered to require a minimun and/or maximum size by using the
201 216
 arguments \code{min.sz} and \code{max.sz}.
202 217
 }
203 218
 \value{
204
-A gene-set by sample matrix of GSVA enrichment scores.
219
+A gene-set by sample matrix (of \code{matrix} or \code{dgCMatrix} type, 
220
+depending on the input) of GSVA enrichment scores.
205 221
 }
206 222
 \references{
207 223
 Barbie, D.A. et al. Systematic RNA interference reveals that oncogenic KRAS-driven
Browse code

Fixed file encoding for man/gsva.Rd.

[rcastelo] authored on 02/11/2020 14:49:46
Showing 1 changed files
... ...
@@ -104,15 +104,15 @@ Estimates GSVA enrichment scores.
104 104
 }
105 105
 \arguments{
106 106
   \item{expr}{Gene expression data which can be given either as a
107
-              \code{SingleCellExperiment}, \code{SummarizedExperiment} or
108
-              \code{ExpressionSet} object, or as a matrix of expression 
107
+              \code{SummarizedExperiment}, \code{SingleCellExperiment}
108
+              \code{ExpressionSet} object, or as a matrix of expression
109 109
               values where rows correspond to genes and columns correspond to samples.}
110 110
   \item{gset.idx.list}{Gene sets provided either as a \code{list} object or as a
111 111
                        \code{GeneSetCollection} object.}
112
-  \item{annotation}{In the case of calling \code{gsva()} on a \code{SingleCellExperiment}
113
-                    or a \code{SummarizedExperiment} object, the \code{annotation}
114
-                    argument can be used to select the assay containing the
115
-                    molecular data we want as input to the \code{gsva()}
112
+  \item{annotation}{In the case of calling \code{gsva()} on a
113
+                    \code{SummarizedExperiment} or \code{SingleCellExperiment} object,
114
+                    the \code{annotation} argument can be used to select the assay
115
+                    containing the molecular data we want as input to the \code{gsva()}
116 116
                     function, otherwise the first assay is selected.
117 117
                     In the case of calling \code{gsva()} with expression data in
118 118
                     a \code{matrix} and gene sets as a \code{GeneSetCollection}
... ...
@@ -124,7 +124,7 @@ Estimates GSVA enrichment scores.
124 124
                     \code{ExpressionSet} object, the \code{annotation} argument
125 125
                     is ignored. See details information below.}
126 126
   \item{method}{Method to employ in the estimation of gene-set enrichment scores per sample. By default
127
-                this is set to \code{gsva} (\enc{H?nzelmann}{Hanzelmann} et al, 2013) and other options are
127
+                this is set to \code{gsva} (\enc{H�nzelmann}{Hanzelmann} et al, 2013) and other options are
128 128
                 \code{ssgsea} (Barbie et al, 2009), \code{zscore} (Lee et al, 2008) or \code{plage}
129 129
                 (Tomfohr et al, 2005). The latter two standardize first expression profiles into z-scores
130 130
                 over the samples and, in the case of \code{zscore}, it combines them together as their sum
... ...
@@ -155,7 +155,7 @@ Estimates GSVA enrichment scores.
155 155
                  is calculated as the magnitude difference between the largest positive
156 156
                  and negative random walk deviations.}
157 157
   \item{tau}{Exponent defining the weight of the tail in the random walk performed by both the \code{gsva}
158
-             (\enc{H?nzelmann}{Hanzelmann} et al., 2013) and the \code{ssgsea} (Barbie et al., 2009) methods. By default,
158
+             (\enc{H�nzelmann}{Hanzelmann} et al., 2013) and the \code{ssgsea} (Barbie et al., 2009) methods. By default,
159 159
              this \code{tau=1} when \code{method="gsva"} and \code{tau=0.25} when \code{method="ssgsea"} just
160 160
              as specified by Barbie et al. (2009) where this parameter is called \code{alpha}.}
161 161
   \item{ssgsea.norm}{Logical, set to \code{TRUE} (default) with \code{method="ssgsea"} runs the SSGSEA method
... ...
@@ -207,7 +207,7 @@ A gene-set by sample matrix of GSVA enrichment scores.
207 207
 Barbie, D.A. et al. Systematic RNA interference reveals that oncogenic KRAS-driven
208 208
 cancers require TBK1. \emph{Nature}, 462(5):108-112, 2009.
209 209
 
210
-\enc{H?nzelmann}{Hanzelmann}, S., Castelo, R. and Guinney, J.
210
+\enc{H�nzelmann}{Hanzelmann}, S., Castelo, R. and Guinney, J.
211 211
 GSVA: Gene set variation analysis for microarray and RNA-Seq data.
212 212
 \emph{BMC Bioinformatics}, 14:7, 2013.
213 213
 
Browse code

adding SingleCellExperiment support

pablo-rodr-bio2 authored on 29/10/2020 11:43:14
Showing 1 changed files
... ...
@@ -1,5 +1,6 @@
1 1
 \name{gsva}
2 2
 \alias{gsva}
3
+\alias{gsva,SingleCellExperiment,list-method}
3 4
 \alias{gsva,SummarizedExperiment,list-method}
4 5
 \alias{gsva,SummarizedExperiment,GeneSetCollection-method}
5 6
 \alias{gsva,ExpressionSet,list-method}
... ...
@@ -16,6 +17,18 @@ Gene Set Variation Analysis
16 17
 Estimates GSVA enrichment scores.
17 18
 }
18 19
 \usage{
20
+\S4method{gsva}{SingleCellExperiment,list}(expr, gset.idx.list, annotation,
21
+    method=c("gsva", "ssgsea", "zscore", "plage"),
22
+    kcdf=c("Gaussian", "Poisson", "none"),
23
+    abs.ranking=FALSE,
24
+    min.sz=1,
25
+    max.sz=Inf,
26
+    parallel.sz=1L,
27
+    mx.diff=TRUE,
28
+    tau=switch(method, gsva=1, ssgsea=0.25, NA),
29
+    ssgsea.norm=TRUE,
30
+    verbose=TRUE,
31
+    BPPARAM=SerialParam(progressbar=verbose))
19 32
 \S4method{gsva}{SummarizedExperiment,GeneSetCollection}(expr, gset.idx.list, annotation,
20 33
     method=c("gsva", "ssgsea", "zscore", "plage"),
21 34
     kcdf=c("Gaussian", "Poisson", "none"),
... ...
@@ -91,13 +104,13 @@ Estimates GSVA enrichment scores.
91 104
 }
92 105
 \arguments{
93 106
   \item{expr}{Gene expression data which can be given either as a
94
-              \code{SummarizedExperiment} or \code{ExpressionSet} object,
95
-              or as a matrix of expression values where rows correspond to genes
96
-              and columns correspond to samples.}
107
+              \code{SingleCellExperiment}, \code{SummarizedExperiment} or
108
+              \code{ExpressionSet} object, or as a matrix of expression 
109
+              values where rows correspond to genes and columns correspond to samples.}
97 110
   \item{gset.idx.list}{Gene sets provided either as a \code{list} object or as a
98 111
                        \code{GeneSetCollection} object.}
99
-  \item{annotation}{In the case of calling \code{gsva()} on a
100
-                    \code{SummarizedExperiment} object, the \code{annotation}
112
+  \item{annotation}{In the case of calling \code{gsva()} on a \code{SingleCellExperiment}
113
+                    or a \code{SummarizedExperiment} object, the \code{annotation}
101 114
                     argument can be used to select the assay containing the
102 115
                     molecular data we want as input to the \code{gsva()}
103 116
                     function, otherwise the first assay is selected.
... ...
@@ -111,7 +124,7 @@ Estimates GSVA enrichment scores.
111 124
                     \code{ExpressionSet} object, the \code{annotation} argument
112 125
                     is ignored. See details information below.}
113 126
   \item{method}{Method to employ in the estimation of gene-set enrichment scores per sample. By default
114
-                this is set to \code{gsva} (\enc{H�nzelmann}{Hanzelmann} et al, 2013) and other options are
127
+                this is set to \code{gsva} (\enc{H?nzelmann}{Hanzelmann} et al, 2013) and other options are
115 128
                 \code{ssgsea} (Barbie et al, 2009), \code{zscore} (Lee et al, 2008) or \code{plage}
116 129
                 (Tomfohr et al, 2005). The latter two standardize first expression profiles into z-scores
117 130
                 over the samples and, in the case of \code{zscore}, it combines them together as their sum
... ...
@@ -142,7 +155,7 @@ Estimates GSVA enrichment scores.
142 155
                  is calculated as the magnitude difference between the largest positive
143 156
                  and negative random walk deviations.}
144 157
   \item{tau}{Exponent defining the weight of the tail in the random walk performed by both the \code{gsva}
145
-             (\enc{H�nzelmann}{Hanzelmann} et al., 2013) and the \code{ssgsea} (Barbie et al., 2009) methods. By default,
158
+             (\enc{H?nzelmann}{Hanzelmann} et al., 2013) and the \code{ssgsea} (Barbie et al., 2009) methods. By default,
146 159
              this \code{tau=1} when \code{method="gsva"} and \code{tau=0.25} when \code{method="ssgsea"} just
147 160
              as specified by Barbie et al. (2009) where this parameter is called \code{alpha}.}
148 161
   \item{ssgsea.norm}{Logical, set to \code{TRUE} (default) with \code{method="ssgsea"} runs the SSGSEA method
... ...
@@ -194,7 +207,7 @@ A gene-set by sample matrix of GSVA enrichment scores.
194 207
 Barbie, D.A. et al. Systematic RNA interference reveals that oncogenic KRAS-driven
195 208
 cancers require TBK1. \emph{Nature}, 462(5):108-112, 2009.
196 209
 
197
-\enc{H�nzelmann}{Hanzelmann}, S., Castelo, R. and Guinney, J.
210
+\enc{H?nzelmann}{Hanzelmann}, S., Castelo, R. and Guinney, J.
198 211
 GSVA: Gene set variation analysis for microarray and RNA-Seq data.
199 212
 \emph{BMC Bioinformatics}, 14:7, 2013.
200 213
 
Browse code

Bugfix when input data is a SummarizedExperiment. Corresponding unit test added.

Robert Castelo authored on 29/05/2020 15:47:09
Showing 1 changed files
... ...
@@ -150,7 +150,7 @@ Estimates GSVA enrichment scores.
150 150
                      the minimum and the maximum, as described in their paper. When \code{ssgsea.norm=FALSE}
151 151
                      this last normalization step is skipped.}
152 152
   \item{verbose}{Gives information about each calculation step. Default: \code{FALSE}.}
153
-  \item{BPPARAM}{An object of class \code{\link[BiocParallel]{BiocParallelParam}} specifiying parameters related to the parallel execution of some of the tasks and calculations within this function.}
153
+  \item{BPPARAM}{An object of class \code{\link{BiocParallelParam}} specifiying parameters related to the parallel execution of some of the tasks and calculations within this function.}
154 154
 }
155 155
 
156 156
 \details{
Browse code

Added methods to take expression data in a SummarizedExperiment object.

Robert Castelo authored on 16/12/2019 11:46:25
Showing 1 changed files
... ...
@@ -1,5 +1,7 @@
1 1
 \name{gsva}
2 2
 \alias{gsva}
3
+\alias{gsva,SummarizedExperiment,list-method}
4
+\alias{gsva,SummarizedExperiment,GeneSetCollection-method}
3 5
 \alias{gsva,ExpressionSet,list-method}
4 6
 \alias{gsva,ExpressionSet,GeneSetCollection-method}
5 7
 \alias{gsva,matrix,GeneSetCollection-method}
... ...
@@ -14,6 +16,30 @@ Gene Set Variation Analysis
14 16
 Estimates GSVA enrichment scores.
15 17
 }
16 18
 \usage{
19
+\S4method{gsva}{SummarizedExperiment,GeneSetCollection}(expr, gset.idx.list, annotation,
20
+    method=c("gsva", "ssgsea", "zscore", "plage"),
21
+    kcdf=c("Gaussian", "Poisson", "none"),
22
+    abs.ranking=FALSE,
23
+    min.sz=1,
24
+    max.sz=Inf,
25
+    parallel.sz=1L,
26
+    mx.diff=TRUE,
27
+    tau=switch(method, gsva=1, ssgsea=0.25, NA),
28
+    ssgsea.norm=TRUE,
29
+    verbose=TRUE,
30
+    BPPARAM=SerialParam(progressbar=verbose))
31
+\S4method{gsva}{SummarizedExperiment,list}(expr, gset.idx.list, annotation,
32
+    method=c("gsva", "ssgsea", "zscore", "plage"),
33
+    kcdf=c("Gaussian", "Poisson", "none"),
34
+    abs.ranking=FALSE,
35
+    min.sz=1,
36
+    max.sz=Inf,
37
+    parallel.sz=1L,
38
+    mx.diff=TRUE,
39
+    tau=switch(method, gsva=1, ssgsea=0.25, NA),
40
+    ssgsea.norm=TRUE,
41
+    verbose=TRUE,
42
+    BPPARAM=SerialParam(progressbar=verbose))
17 43
 \S4method{gsva}{ExpressionSet,list}(expr, gset.idx.list, annotation,
18 44
     method=c("gsva", "ssgsea", "zscore", "plage"),
19 45
     kcdf=c("Gaussian", "Poisson", "none"),
... ...
@@ -64,18 +90,26 @@ Estimates GSVA enrichment scores.
64 90
     BPPARAM=SerialParam(progressbar=verbose))
65 91
 }
66 92
 \arguments{
67
-  \item{expr}{Gene expression data which can be given either as an \code{ExpressionSet}
68
-              object or as a matrix of expression values where rows correspond
69
-              to genes and columns correspond to samples.}
93
+  \item{expr}{Gene expression data which can be given either as a
94
+              \code{SummarizedExperiment} or \code{ExpressionSet} object,
95
+              or as a matrix of expression values where rows correspond to genes
96
+              and columns correspond to samples.}
70 97
   \item{gset.idx.list}{Gene sets provided either as a \code{list} object or as a
71 98
                        \code{GeneSetCollection} object.}
72
-  \item{annotation}{In the case of calling \code{gsva()} with expression data in a \code{matrix}
73
-                    and gene sets as a \code{GeneSetCollection} object, the \code{annotation} argument
74
-                    can be used to supply the name of the Bioconductor package that contains
75
-                    annotations for the class of gene identifiers occurring in the row names of
76
-                    the expression data matrix. By default \code{gsva()} will try to match the
77
-                    identifiers in \code{expr} to the identifiers in \code{gset.idx.list} just as
78
-                    they are, unless the \code{annotation} argument is set.}
99
+  \item{annotation}{In the case of calling \code{gsva()} on a
100
+                    \code{SummarizedExperiment} object, the \code{annotation}
101
+                    argument can be used to select the assay containing the
102
+                    molecular data we want as input to the \code{gsva()}
103
+                    function, otherwise the first assay is selected.
104
+                    In the case of calling \code{gsva()} with expression data in
105
+                    a \code{matrix} and gene sets as a \code{GeneSetCollection}
106
+                    object, the \code{annotation} argument can be used to supply
107
+                    the name of the Bioconductor package that contains
108
+                    annotations for the class of gene identifiers occurring in
109
+                    the row names of the expression data matrix.
110
+                    In the case of calling \code{gsva()} on a
111
+                    \code{ExpressionSet} object, the \code{annotation} argument
112
+                    is ignored. See details information below.}
79 113
   \item{method}{Method to employ in the estimation of gene-set enrichment scores per sample. By default
80 114
                 this is set to \code{gsva} (\enc{H�nzelmann}{Hanzelmann} et al, 2013) and other options are
81 115
                 \code{ssgsea} (Barbie et al, 2009), \code{zscore} (Lee et al, 2008) or \code{plage}
... ...
@@ -126,11 +160,32 @@ gene expression matrix into a g-geneset by n-sample pathway enrichment matrix.
126 160
 This facilitates many forms of statistical analysis in the 'space' of pathways
127 161
 rather than genes, providing a higher level of interpretability.
128 162
 
129
-The \code{gsva()} function first maps the identifiers in the gene sets to the
130
-identifiers in the input expression data leading to a filtered collection of
131
-gene sets. This collection can be further filtered to require a minimun and/or
132
-maximum size of the gene sets for which we want to calculate GSVA enrichment
133
-scores, by using the arguments \code{min.sz} and \code{max.sz}.
163
+By default, \code{gsva()} will try to match the identifiers in \code{expr} to
164
+the identifiers in \code{gset.idx.list} just as they are, unless the \code{annotation} argument is set.
165
+
166
+The \code{gsva()} function first maps the identifiers in the gene sets in
167
+\code{gset.idx.list} to the identifiers in the input expression data \code{expr}.
168
+When the input gene sets in \code{gset.idx.list} is provided as a \code{list}
169
+object, \code{gsva()} will try to match the identifiers in \code{expr} directly
170
+to the identifiers in \code{gset.idx.list} just as they are. Because unmatching
171
+identifiers will be discarded in both, \code{expr} and \code{gset.idx.list},
172
+\code{gsva()} may prompt an error if no identifiers can be matched as in the case
173
+of different types of identifiers (e.g., gene symbols vs Entrez identitifers).
174
+
175
+However, then the input gene sets in \code{gset.idx.list} is provided as a
176
+\code{GeneSetCollection} object, \code{gsva()} will try to automatically convert
177
+those identifiers to the type of identifier in the input expression data \code{expr}.
178
+Such an automatic conversion, however, will only occur in three scenarios: 1. when
179
+\code{expr} is an \code{ExpressionSet} object with an appropriately set
180
+\code{annotation} slot; 2. when \code{expr} is a \code{SummarizedExperiment} object
181
+with an appropriately set \code{annotation} slot in the metadata of \code{expr};
182
+3. when \code{expr} is a \code{matrix} and the \code{annotation} argument of the
183
+\code{gsva()} function is set to the name of the annotation package that provides
184
+the relationships between the type of identifiers in \code{expr} and \code{gset.idx.list}.
185
+
186
+The collection of gene sets resulting from the previous identifier matching,
187
+can be further filtered to require a minimun and/or maximum size by using the
188
+arguments \code{min.sz} and \code{max.sz}.
134 189
 }
135 190
 \value{
136 191
 A gene-set by sample matrix of GSVA enrichment scores.
Browse code

Removed the parallel.type argument from gsva(). Updated manual page.

Robert Castelo authored on 10/12/2019 13:09:53
Showing 1 changed files
... ...
@@ -21,7 +21,6 @@ Estimates GSVA enrichment scores.
21 21
     min.sz=1,
22 22
     max.sz=Inf,
23 23
     parallel.sz=1L,
24
-    parallel.type="SOCK",
25 24
     mx.diff=TRUE,
26 25
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
27 26
     ssgsea.norm=TRUE,
... ...
@@ -34,7 +33,6 @@ Estimates GSVA enrichment scores.
34 33
     min.sz=1,
35 34
     max.sz=Inf,
36 35
     parallel.sz=1L,
37
-    parallel.type="SOCK",
38 36
     mx.diff=TRUE,
39 37
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
40 38
     ssgsea.norm=TRUE,
... ...
@@ -47,7 +45,6 @@ Estimates GSVA enrichment scores.
47 45
     min.sz=1,
48 46
     max.sz=Inf,
49 47
     parallel.sz=1L,
50
-    parallel.type="SOCK",
51 48
     mx.diff=TRUE,
52 49
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
53 50
     ssgsea.norm=TRUE,
... ...
@@ -60,7 +57,6 @@ Estimates GSVA enrichment scores.
60 57
     min.sz=1,
61 58
     max.sz=Inf,
62 59
     parallel.sz=1L,
63
-    parallel.type="SOCK",
64 60
     mx.diff=TRUE,
65 61
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
66 62
     ssgsea.norm=TRUE,
... ...
@@ -106,7 +102,6 @@ Estimates GSVA enrichment scores.
106 102
   \item{parallel.sz}{Number of threads of execution to use when doing the calculations in parallel.
107 103
                      The argument \code{BPPARAM} allows one to set the parallel back-end and fine
108 104
                      tune its configuration.}
109
-  \item{parallel.type}{Type of cluster architecture when using \code{snow}.}
110 105
   \item{mx.diff}{Offers two approaches to calculate the enrichment statistic (ES)
111 106
                  from the KS random walk statistic. \code{mx.diff=FALSE}: ES is calculated as
112 107
                  the maximum distance of the random walk from 0. \code{mx.diff=TRUE} (default): ES
Browse code

Added the possibility of doing the ECDF estimation using parallel calculations.

Robert Castelo authored on 29/11/2019 12:12:34
Showing 1 changed files
... ...
@@ -20,48 +20,52 @@ Estimates GSVA enrichment scores.
20 20
     abs.ranking=FALSE,
21 21
     min.sz=1,
22 22
     max.sz=Inf,
23
-    parallel.sz=0,
23
+    parallel.sz=1L,
24 24
     parallel.type="SOCK",
25 25
     mx.diff=TRUE,
26 26
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
27 27
     ssgsea.norm=TRUE,
28
-    verbose=TRUE)
28
+    verbose=TRUE,
29
+    BPPARAM=SerialParam(progressbar=verbose))
29 30
 \S4method{gsva}{ExpressionSet,GeneSetCollection}(expr, gset.idx.list, annotation,
30 31
     method=c("gsva", "ssgsea", "zscore", "plage"),
31 32
     kcdf=c("Gaussian", "Poisson", "none"),
32 33
     abs.ranking=FALSE,
33 34
     min.sz=1,
34 35
     max.sz=Inf,
35
-    parallel.sz=0,
36
+    parallel.sz=1L,
36 37
     parallel.type="SOCK",
37 38
     mx.diff=TRUE,
38 39
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
39 40
     ssgsea.norm=TRUE,
40
-    verbose=TRUE)
41
+    verbose=TRUE,
42
+    BPPARAM=SerialParam(progressbar=verbose))
41 43
 \S4method{gsva}{matrix,GeneSetCollection}(expr, gset.idx.list, annotation,
42 44
     method=c("gsva", "ssgsea", "zscore", "plage"),
43 45
     kcdf=c("Gaussian", "Poisson", "none"),
44 46
     abs.ranking=FALSE,
45 47
     min.sz=1,
46 48
     max.sz=Inf,
47
-    parallel.sz=0,
49
+    parallel.sz=1L,
48 50
     parallel.type="SOCK",
49 51
     mx.diff=TRUE,
50 52
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
51 53
     ssgsea.norm=TRUE,
52
-    verbose=TRUE)
54
+    verbose=TRUE,
55
+    BPPARAM=SerialParam(progressbar=verbose))
53 56
 \S4method{gsva}{matrix,list}(expr, gset.idx.list, annotation,
54 57
     method=c("gsva", "ssgsea", "zscore", "plage"),
55 58
     kcdf=c("Gaussian", "Poisson", "none"),
56 59
     abs.ranking=FALSE,
57 60
     min.sz=1,
58 61
     max.sz=Inf,
59
-    parallel.sz=0,
62
+    parallel.sz=1L,
60 63
     parallel.type="SOCK",
61 64
     mx.diff=TRUE,
62 65
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
63 66
     ssgsea.norm=TRUE,
64
-    verbose=TRUE)
67
+    verbose=TRUE,
68
+    BPPARAM=SerialParam(progressbar=verbose))
65 69
 }
66 70
 \arguments{
67 71
   \item{expr}{Gene expression data which can be given either as an \code{ExpressionSet}
... ...
@@ -99,14 +103,9 @@ Estimates GSVA enrichment scores.
99 103
             enriched on either extreme (high or low) will be regarded as 'highly' activated.}
100 104
   \item{min.sz}{Minimum size of the resulting gene sets.}
101 105
   \item{max.sz}{Maximum size of the resulting gene sets.}
102
-  \item{parallel.sz}{Number of processors to use when doing the calculations in parallel.
103
-                     This requires to previously load either the \code{parallel} or the
104
-                     \code{snow} library. If \code{parallel} is loaded and this argument
105
-                     is left with its default value (\code{parallel.sz=0}) then it will use
106
-                     all available core processors unless we set this argument with a
107
-                     smaller number. If \code{snow} is loaded then we must set this argument
108
-                     to a positive integer number that specifies the number of processors to
109
-                     employ in the parallel calculation.}
106
+  \item{parallel.sz}{Number of threads of execution to use when doing the calculations in parallel.
107
+                     The argument \code{BPPARAM} allows one to set the parallel back-end and fine
108
+                     tune its configuration.}
110 109
   \item{parallel.type}{Type of cluster architecture when using \code{snow}.}
111 110
   \item{mx.diff}{Offers two approaches to calculate the enrichment statistic (ES)
112 111
                  from the KS random walk statistic. \code{mx.diff=FALSE}: ES is calculated as
... ...
@@ -122,6 +121,7 @@ Estimates GSVA enrichment scores.
122 121
                      the minimum and the maximum, as described in their paper. When \code{ssgsea.norm=FALSE}
123 122
                      this last normalization step is skipped.}
124 123
   \item{verbose}{Gives information about each calculation step. Default: \code{FALSE}.}
124
+  \item{BPPARAM}{An object of class \code{\link[BiocParallel]{BiocParallelParam}} specifiying parameters related to the parallel execution of some of the tasks and calculations within this function.}
125 125
 }
126 126
 
127 127
 \details{
Browse code

Deprecated functions become defunct.

Robert Castelo authored on 16/03/2018 07:36:20
Showing 1 changed files
... ...
@@ -17,71 +17,51 @@ Estimates GSVA enrichment scores.
17 17
 \S4method{gsva}{ExpressionSet,list}(expr, gset.idx.list, annotation,
18 18
     method=c("gsva", "ssgsea", "zscore", "plage"),
19 19
     kcdf=c("Gaussian", "Poisson", "none"),
20
-    rnaseq=FALSE,
21 20
     abs.ranking=FALSE,
22 21
     min.sz=1,
23 22
     max.sz=Inf,
24
-    no.bootstraps=0,
25
-    bootstrap.percent = .632,
26 23
     parallel.sz=0,
27 24
     parallel.type="SOCK",
28 25
     mx.diff=TRUE,
29 26
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
30
-    kernel=TRUE,
31 27
     ssgsea.norm=TRUE,
32
-    verbose=TRUE,
33
-    return.old.value=FALSE)
28
+    verbose=TRUE)
34 29
 \S4method{gsva}{ExpressionSet,GeneSetCollection}(expr, gset.idx.list, annotation,
35 30
     method=c("gsva", "ssgsea", "zscore", "plage"),
36 31
     kcdf=c("Gaussian", "Poisson", "none"),
37
-    rnaseq=FALSE,
38 32
     abs.ranking=FALSE,
39 33
     min.sz=1,
40 34
     max.sz=Inf,
41
-    no.bootstraps=0,
42
-    bootstrap.percent = .632,
43 35
     parallel.sz=0,
44 36
     parallel.type="SOCK",
45 37
     mx.diff=TRUE,
46 38
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
47
-    kernel=TRUE,
48 39
     ssgsea.norm=TRUE,
49
-    verbose=TRUE,
50
-    return.old.value=FALSE)
40
+    verbose=TRUE)
51 41
 \S4method{gsva}{matrix,GeneSetCollection}(expr, gset.idx.list, annotation,
52 42
     method=c("gsva", "ssgsea", "zscore", "plage"),
53 43
     kcdf=c("Gaussian", "Poisson", "none"),
54
-    rnaseq=FALSE,
55 44
     abs.ranking=FALSE,
56 45
     min.sz=1,
57 46
     max.sz=Inf,
58
-    no.bootstraps=0,
59
-    bootstrap.percent = .632,
60 47
     parallel.sz=0,
61 48
     parallel.type="SOCK",
62 49
     mx.diff=TRUE,
63 50
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
64
-    kernel=TRUE,
65 51
     ssgsea.norm=TRUE,
66
-    verbose=TRUE,
67
-    return.old.value=FALSE)
52
+    verbose=TRUE)
68 53
 \S4method{gsva}{matrix,list}(expr, gset.idx.list, annotation,
69 54
     method=c("gsva", "ssgsea", "zscore", "plage"),
70 55
     kcdf=c("Gaussian", "Poisson", "none"),
71
-    rnaseq=FALSE,
72 56
     abs.ranking=FALSE,
73 57
     min.sz=1,
74 58
     max.sz=Inf,
75
-    no.bootstraps=0,
76
-    bootstrap.percent = .632,
77 59
     parallel.sz=0,
78 60
     parallel.type="SOCK",
79 61
     mx.diff=TRUE,
80 62
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
81
-    kernel=TRUE,
82 63
     ssgsea.norm=TRUE,
83
-    verbose=TRUE,
84
-    return.old.value=FALSE)
64
+    verbose=TRUE)
85 65
 }
86 66
 \arguments{
87 67
   \item{expr}{Gene expression data which can be given either as an \code{ExpressionSet}
... ...
@@ -110,10 +90,7 @@ Estimates GSVA enrichment scores.
110 90
               By default, \code{kcdf="Gaussian"} which is suitable when input expression values are continuous,
111 91
               such as microarray fluorescent units in logarithmic scale, RNA-seq log-CPMs, log-RPKMs or log-TPMs.
112 92
               When input expression values are integer counts, such as those derived from RNA-seq experiments,
113
-              then this argument should be set to \code{kcdf="Poisson"}. This argument supersedes arguments
114
-              \code{rnaseq} and \code{kernel}, which are deprecated and will be removed in the next release.}
115
-  \item{rnaseq}{This argument has been deprecated and will be removed in the next release. Please use the
116
-                argument \code{kcdf} instead.}
93
+              then this argument should be set to \code{kcdf="Poisson"}.}
117 94
   \item{abs.ranking}{Flag used only when \code{mx.diff=TRUE}. When \code{abs.ranking=FALSE} (default)
118 95
             a modified Kuiper statistic is used to calculate enrichment scores, taking the magnitude
119 96
             difference between the largest positive and negative random walk deviations. When
... ...
@@ -122,10 +99,6 @@ Estimates GSVA enrichment scores.
122 99
             enriched on either extreme (high or low) will be regarded as 'highly' activated.}
123 100
   \item{min.sz}{Minimum size of the resulting gene sets.}
124 101
   \item{max.sz}{Maximum size of the resulting gene sets.}
125
-  \item{no.bootstraps}{Number of bootstrap iterations to perform. This argument has been deprecated and will
126
-                       be removed in the next release.}
127
-  \item{bootstrap.percent}{.632 is the ideal percent samples bootstrapped. This argument has been deprecated and
128
-                           will be removed in the next release.}
129 102
   \item{parallel.sz}{Number of processors to use when doing the calculations in parallel.
130 103
                      This requires to previously load either the \code{parallel} or the
131 104
                      \code{snow} library. If \code{parallel} is loaded and this argument
... ...
@@ -144,18 +117,11 @@ Estimates GSVA enrichment scores.
144 117
              (\enc{H�nzelmann}{Hanzelmann} et al., 2013) and the \code{ssgsea} (Barbie et al., 2009) methods. By default,
145 118
              this \code{tau=1} when \code{method="gsva"} and \code{tau=0.25} when \code{method="ssgsea"} just
146 119
              as specified by Barbie et al. (2009) where this parameter is called \code{alpha}.}
147
-  \item{kernel}{This argument has been deprecated and will be removed in the next release. Please use the
148
-                argument \code{kcdf} instead.}
149 120
   \item{ssgsea.norm}{Logical, set to \code{TRUE} (default) with \code{method="ssgsea"} runs the SSGSEA method
150 121
                      from Barbie et al. (2009) normalizing the scores by the absolute difference between
151 122
                      the minimum and the maximum, as described in their paper. When \code{ssgsea.norm=FALSE}
152 123
                      this last normalization step is skipped.}
153 124
   \item{verbose}{Gives information about each calculation step. Default: \code{FALSE}.}
154
-  \item{return.old.value}{Logical, set to \code{FALSE} (default) has no effect but when \code{return.old.value=TRUE},
155
-                          then the return value takes form of a \code{list} object as in previous versions of
156
-                          GSVA. This argument will be present only in this release for backward compability
157
-                          purposes during the deprecation of the arguments \code{no.bootstraps} and \code{bootstrap.percent}
158
-                          and will dissappear in the next release.}
159 125
 }
160 126
 
161 127
 \details{
Browse code

Deprecate arguments no.bootstraps and bootstrap.percent, simplify return value to the object storing the enrichment scores and add argument return.old.value to provide backward compability for the return value during the next release.

[rcastelo] authored on 06/09/2017 15:00:02
Showing 1 changed files
... ...
@@ -29,7 +29,8 @@ Estimates GSVA enrichment scores.
29 29
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
30 30
     kernel=TRUE,
31 31
     ssgsea.norm=TRUE,
32
-    verbose=TRUE)
32
+    verbose=TRUE,
33
+    return.old.value=FALSE)
33 34
 \S4method{gsva}{ExpressionSet,GeneSetCollection}(expr, gset.idx.list, annotation,
34 35
     method=c("gsva", "ssgsea", "zscore", "plage"),
35 36
     kcdf=c("Gaussian", "Poisson", "none"),
... ...
@@ -45,7 +46,8 @@ Estimates GSVA enrichment scores.
45 46
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
46 47
     kernel=TRUE,
47 48
     ssgsea.norm=TRUE,
48
-    verbose=TRUE)
49
+    verbose=TRUE,
50
+    return.old.value=FALSE)
49 51
 \S4method{gsva}{matrix,GeneSetCollection}(expr, gset.idx.list, annotation,
50 52
     method=c("gsva", "ssgsea", "zscore", "plage"),
51 53
     kcdf=c("Gaussian", "Poisson", "none"),
... ...
@@ -61,7 +63,8 @@ Estimates GSVA enrichment scores.
61 63
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
62 64
     kernel=TRUE,
63 65
     ssgsea.norm=TRUE,
64
-    verbose=TRUE)
66
+    verbose=TRUE,
67
+    return.old.value=FALSE)
65 68
 \S4method{gsva}{matrix,list}(expr, gset.idx.list, annotation,
66 69
     method=c("gsva", "ssgsea", "zscore", "plage"),
67 70
     kcdf=c("Gaussian", "Poisson", "none"),
... ...
@@ -77,7 +80,8 @@ Estimates GSVA enrichment scores.
77 80
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
78 81
     kernel=TRUE,
79 82
     ssgsea.norm=TRUE,
80
-    verbose=TRUE)
83
+    verbose=TRUE,
84
+    return.old.value=FALSE)
81 85
 }
82 86
 \arguments{
83 87
   \item{expr}{Gene expression data which can be given either as an \code{ExpressionSet}
... ...
@@ -118,8 +122,10 @@ Estimates GSVA enrichment scores.
118 122
             enriched on either extreme (high or low) will be regarded as 'highly' activated.}
119 123
   \item{min.sz}{Minimum size of the resulting gene sets.}
120 124
   \item{max.sz}{Maximum size of the resulting gene sets.}
121
-  \item{no.bootstraps}{Number of bootstrap iterations to perform.}
122
-  \item{bootstrap.percent}{.632 is the ideal percent samples bootstrapped.}
125
+  \item{no.bootstraps}{Number of bootstrap iterations to perform. This argument has been deprecated and will
126
+                       be removed in the next release.}
127
+  \item{bootstrap.percent}{.632 is the ideal percent samples bootstrapped. This argument has been deprecated and
128
+                           will be removed in the next release.}
123 129
   \item{parallel.sz}{Number of processors to use when doing the calculations in parallel.
124 130
                      This requires to previously load either the \code{parallel} or the
125 131
                      \code{snow} library. If \code{parallel} is loaded and this argument
... ...
@@ -145,6 +151,11 @@ Estimates GSVA enrichment scores.
145 151
                      the minimum and the maximum, as described in their paper. When \code{ssgsea.norm=FALSE}
146 152
                      this last normalization step is skipped.}
147 153
   \item{verbose}{Gives information about each calculation step. Default: \code{FALSE}.}
154
+  \item{return.old.value}{Logical, set to \code{FALSE} (default) has no effect but when \code{return.old.value=TRUE},
155
+                          then the return value takes form of a \code{list} object as in previous versions of
156
+                          GSVA. This argument will be present only in this release for backward compability
157
+                          purposes during the deprecation of the arguments \code{no.bootstraps} and \code{bootstrap.percent}
158
+                          and will dissappear in the next release.}
148 159
 }
149 160
 
150 161
 \details{
... ...
@@ -216,7 +227,7 @@ fit <- eBayes(fit)
216 227
 topTable(fit, coef="sampleGroup2vs1")
217 228
 
218 229
 ## estimate GSVA enrichment scores for the three sets
219
-gsva_es <- gsva(y, geneSets, mx.diff=1)$es.obs
230
+gsva_es <- gsva(y, geneSets, mx.diff=1)
220 231
 
221 232
 ## fit the same linear model now to the GSVA enrichment scores
222 233
 fit <- lmFit(gsva_es, design)
Browse code

Arguments rnaseq and kernel deprecated and replaced by new argument kcdf.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GSVA@131287 bc3139a8-67e5-0310-9ffc-ced21a209358

Robert Castelo authored on 17/07/2017 17:11:21
Showing 1 changed files
... ...
@@ -16,6 +16,7 @@ Estimates GSVA enrichment scores.
16 16
 \usage{
17 17
 \S4method{gsva}{ExpressionSet,list}(expr, gset.idx.list, annotation,
18 18
     method=c("gsva", "ssgsea", "zscore", "plage"),
19
+    kcdf=c("Gaussian", "Poisson", "none"),
19 20
     rnaseq=FALSE,
20 21
     abs.ranking=FALSE,
21 22
     min.sz=1,
... ...
@@ -31,6 +32,7 @@ Estimates GSVA enrichment scores.
31 32
     verbose=TRUE)
32 33
 \S4method{gsva}{ExpressionSet,GeneSetCollection}(expr, gset.idx.list, annotation,
33 34
     method=c("gsva", "ssgsea", "zscore", "plage"),
35
+    kcdf=c("Gaussian", "Poisson", "none"),
34 36
     rnaseq=FALSE,
35 37
     abs.ranking=FALSE,
36 38
     min.sz=1,
... ...
@@ -46,6 +48,7 @@ Estimates GSVA enrichment scores.
46 48
     verbose=TRUE)
47 49
 \S4method{gsva}{matrix,GeneSetCollection}(expr, gset.idx.list, annotation,
48 50
     method=c("gsva", "ssgsea", "zscore", "plage"),
51
+    kcdf=c("Gaussian", "Poisson", "none"),
49 52
     rnaseq=FALSE,
50 53
     abs.ranking=FALSE,
51 54
     min.sz=1,
... ...
@@ -61,6 +64,7 @@ Estimates GSVA enrichment scores.
61 64
     verbose=TRUE)
62 65
 \S4method{gsva}{matrix,list}(expr, gset.idx.list, annotation,
63 66
     method=c("gsva", "ssgsea", "zscore", "plage"),
67
+    kcdf=c("Gaussian", "Poisson", "none"),
64 68
     rnaseq=FALSE,
65 69
     abs.ranking=FALSE,
66 70
     min.sz=1,
... ...
@@ -97,12 +101,15 @@ Estimates GSVA enrichment scores.
97 101
                 while in the case of \code{plage} they are used to calculate the singular value decomposition
98 102
                 (SVD) over the genes in the gene set and use the coefficients of the first right-singular vector
99 103
                 as pathway activity profile.}
100
-  \item{rnaseq}{Logical flag set by default to \code{rnaseq=FALSE} to inform whether the input gene
101
-                expression data are continues values, such as fluorescent units in logarithmic scale
102
-                from microarray experiments or some other kind of continuous value derived from
103
-                RNA-seq counts such as log-CPMs, log-RPKMs or log-TPMs. This flag should be set to
104
-                \code{rnaseq=TRUE} only when the values of the input gene expression data are integer
105
-                counts.}
104
+  \item{kcdf}{Character string denoting the kernel to use during the non-parametric estimation of the
105
+              cumulative distribution function of expression levels across samples when \code{method="gsva"}.
106
+              By default, \code{kcdf="Gaussian"} which is suitable when input expression values are continuous,
107
+              such as microarray fluorescent units in logarithmic scale, RNA-seq log-CPMs, log-RPKMs or log-TPMs.
108
+              When input expression values are integer counts, such as those derived from RNA-seq experiments,
109
+              then this argument should be set to \code{kcdf="Poisson"}. This argument supersedes arguments
110
+              \code{rnaseq} and \code{kernel}, which are deprecated and will be removed in the next release.}
111
+  \item{rnaseq}{This argument has been deprecated and will be removed in the next release. Please use the
112
+                argument \code{kcdf} instead.}
106 113
   \item{abs.ranking}{Flag used only when \code{mx.diff=TRUE}. When \code{abs.ranking=FALSE} (default)
107 114
             a modified Kuiper statistic is used to calculate enrichment scores, taking the magnitude
108 115
             difference between the largest positive and negative random walk deviations. When
... ...
@@ -131,10 +138,8 @@ Estimates GSVA enrichment scores.
131 138
              (\enc{H�nzelmann}{Hanzelmann} et al., 2013) and the \code{ssgsea} (Barbie et al., 2009) methods. By default,
132 139
              this \code{tau=1} when \code{method="gsva"} and \code{tau=0.25} when \code{method="ssgsea"} just
133 140
              as specified by Barbie et al. (2009) where this parameter is called \code{alpha}.}
134
-  \item{kernel}{Logical, set to \code{TRUE} when the GSVA method employes a kernel non-parametric
135
-                estimation of the empirical cumulative distribution function (default) and \code{FALSE}
136
-                when this function is directly estimated from the observed data. This last option is
137
-                justified in the limit of the size of the sample by the so-called Glivenko-Cantelli theorem.}
141
+  \item{kernel}{This argument has been deprecated and will be removed in the next release. Please use the
142
+                argument \code{kcdf} instead.}
138 143
   \item{ssgsea.norm}{Logical, set to \code{TRUE} (default) with \code{method="ssgsea"} runs the SSGSEA method
139 144
                      from Barbie et al. (2009) normalizing the scores by the absolute difference between
140 145
                      the minimum and the maximum, as described in their paper. When \code{ssgsea.norm=FALSE}
... ...
@@ -154,16 +159,6 @@ identifiers in the input expression data leading to a filtered collection of
154 159
 gene sets. This collection can be further filtered to require a minimun and/or
155 160
 maximum size of the gene sets for which we want to calculate GSVA enrichment
156 161
 scores, by using the arguments \code{min.sz} and \code{max.sz}.
157
-
158
-The name of the argument \code{rnaseq} can be misleading. When set to \code{rnaseq=FALSE}, the
159
-nonparametric estimation of the cumulative density function of the expression profile of
160
-each gene across samples is done using Gaussian kernels suited for continuous values. These were
161
-initially thought to be only microarray fluorescent units in logarithmic scale but nowadays these
162
-may also correspond to continuous values derived from RNA-seq experiments such as log-CPMs,
163
-log-RPKMs or log-TPMs. When \code{rnaseq=TRUE}, Poisson kernels are used instead and therefore,
164
-this option is only suitable when the input gene expression matrix is formed by integer counts.
165
-This implies that \code{rnaseq=FALSE} may also be used even when the expression data comes from
166
-a RNA-seq experiment. The name of this argument may change in the future to avoid this confusion.
167 162
 }
168 163
 \value{
169 164
 A gene-set by sample matrix of GSVA enrichment scores.
Browse code

Updated implementation of the option abs.ranking=TRUE to use the original Kuiper statistic.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GSVA@130527 bc3139a8-67e5-0310-9ffc-ced21a209358

Robert Castelo authored on 19/06/2017 14:35:29
Showing 1 changed files
... ...
@@ -103,10 +103,12 @@ Estimates GSVA enrichment scores.
103 103
                 RNA-seq counts such as log-CPMs, log-RPKMs or log-TPMs. This flag should be set to
104 104
                 \code{rnaseq=TRUE} only when the values of the input gene expression data are integer
105 105
                 counts.}
106
-  \item{abs.ranking}{Flag to determine whether genes should be ranked according to 
107
-  					their sign (\code{abs.ranking=FALSE}) or by absolute value (\code{abs.ranking=TRUE}). 
108
-  					In the latter, pathways with genes enriched on either extreme
109
-  					(high or low) will be regarded as 'highly' activated. }
106
+  \item{abs.ranking}{Flag used only when \code{mx.diff=TRUE}. When \code{abs.ranking=FALSE} (default)
107
+            a modified Kuiper statistic is used to calculate enrichment scores, taking the magnitude
108
+            difference between the largest positive and negative random walk deviations. When
109
+            \code{abs.ranking=TRUE} the original Kuiper statistic that sums the largest positive and
110
+            negative random walk deviations, is used. In this latter case, gene sets with genes
111
+            enriched on either extreme (high or low) will be regarded as 'highly' activated.}
110 112
   \item{min.sz}{Minimum size of the resulting gene sets.}
111 113
   \item{max.sz}{Maximum size of the resulting gene sets.}
112 114
   \item{no.bootstraps}{Number of bootstrap iterations to perform.}
... ...
@@ -203,7 +205,7 @@ geneSets <- list(set1=paste("g", 1:3, sep=""),
203 205
 y <- matrix(rnorm(n*p), nrow=p, ncol=n,
204 206
             dimnames=list(paste("g", 1:p, sep="") , paste("s", 1:n, sep="")))
205 207
 
206
-## genes in set1 are expressed at higher levels in the last 10 samples
208
+## genes in set1 are expressed at higher levels in the last 'nGrp1+1' to 'n' samples
207 209
 y[geneSets$set1, (nGrp1+1):n] <- y[geneSets$set1, (nGrp1+1):n] + 2
208 210
 
209 211
 ## build design matrix
Browse code

Fixed NAMESPACE and updated documentation on the rnaseq argument of the main function gsva().

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GSVA@128904 bc3139a8-67e5-0310-9ffc-ced21a209358

Robert Castelo authored on 19/04/2017 20:44:29
Showing 1 changed files
... ...
@@ -97,8 +97,12 @@ Estimates GSVA enrichment scores.
97 97
                 while in the case of \code{plage} they are used to calculate the singular value decomposition
98 98
                 (SVD) over the genes in the gene set and use the coefficients of the first right-singular vector
99 99
                 as pathway activity profile.}
100
-  \item{rnaseq}{Flag to inform whether the input gene expression data comes from microarray
101
-                (\code{rnaseq=FALSE}, default) or RNA-Seq (\code{rnaseq=TRUE}) experiments.}
100
+  \item{rnaseq}{Logical flag set by default to \code{rnaseq=FALSE} to inform whether the input gene
101
+                expression data are continues values, such as fluorescent units in logarithmic scale
102
+                from microarray experiments or some other kind of continuous value derived from
103
+                RNA-seq counts such as log-CPMs, log-RPKMs or log-TPMs. This flag should be set to
104
+                \code{rnaseq=TRUE} only when the values of the input gene expression data are integer
105
+                counts.}
102 106
   \item{abs.ranking}{Flag to determine whether genes should be ranked according to 
103 107
   					their sign (\code{abs.ranking=FALSE}) or by absolute value (\code{abs.ranking=TRUE}). 
104 108
   					In the latter, pathways with genes enriched on either extreme
... ...
@@ -148,6 +152,16 @@ identifiers in the input expression data leading to a filtered collection of
148 152
 gene sets. This collection can be further filtered to require a minimun and/or
149 153
 maximum size of the gene sets for which we want to calculate GSVA enrichment
150 154
 scores, by using the arguments \code{min.sz} and \code{max.sz}.
155
+
156
+The name of the argument \code{rnaseq} can be misleading. When set to \code{rnaseq=FALSE}, the
157
+nonparametric estimation of the cumulative density function of the expression profile of
158
+each gene across samples is done using Gaussian kernels suited for continuous values. These were
159
+initially thought to be only microarray fluorescent units in logarithmic scale but nowadays these
160
+may also correspond to continuous values derived from RNA-seq experiments such as log-CPMs,
161
+log-RPKMs or log-TPMs. When \code{rnaseq=TRUE}, Poisson kernels are used instead and therefore,
162
+this option is only suitable when the input gene expression matrix is formed by integer counts.
163
+This implies that \code{rnaseq=FALSE} may also be used even when the expression data comes from
164
+a RNA-seq experiment. The name of this argument may change in the future to avoid this confusion.
151 165
 }
152 166
 \value{
153 167
 A gene-set by sample matrix of GSVA enrichment scores.
Browse code

Fixed error handling when no genes in gene sets match genes in expression data.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GSVA@96422 bc3139a8-67e5-0310-9ffc-ced21a209358

Robert Castelo authored on 04/11/2014 13:13:04
Showing 1 changed files
... ...
@@ -1,9 +1,9 @@
1 1
 \name{gsva}
2 2
 \alias{gsva}
3
-\alias{gsva,ExpressionSet,list,missing-method}
4
-\alias{gsva,ExpressionSet,GeneSetCollection,missing-method}
5
-\alias{gsva,matrix,GeneSetCollection,character-method}
6
-\alias{gsva,matrix,list,missing-method}
3
+\alias{gsva,ExpressionSet,list-method}
4
+\alias{gsva,ExpressionSet,GeneSetCollection-method}
5
+\alias{gsva,matrix,GeneSetCollection-method}
6
+\alias{gsva,matrix,list-method}
7 7
 
8 8
 \encoding{latin1}
9 9
 
... ...
@@ -14,7 +14,7 @@ Gene Set Variation Analysis
14 14
 Estimates GSVA enrichment scores.
15 15
 }
16 16
 \usage{
17
-\S4method{gsva}{ExpressionSet,list,missing}(expr, gset.idx.list, annotation=NULL,
17
+\S4method{gsva}{ExpressionSet,list}(expr, gset.idx.list, annotation,
18 18
     method=c("gsva", "ssgsea", "zscore", "plage"),
19 19
     rnaseq=FALSE,
20 20
     abs.ranking=FALSE,
... ...
@@ -27,8 +27,9 @@ Estimates GSVA enrichment scores.
27 27
     mx.diff=TRUE,
28 28
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
29 29
     kernel=TRUE,
30
+    ssgsea.norm=TRUE,
30 31
     verbose=TRUE)
31
-\S4method{gsva}{ExpressionSet,GeneSetCollection,missing}(expr, gset.idx.list, annotation=NULL,
32
+\S4method{gsva}{ExpressionSet,GeneSetCollection}(expr, gset.idx.list, annotation,
32 33
     method=c("gsva", "ssgsea", "zscore", "plage"),
33 34
     rnaseq=FALSE,
34 35
     abs.ranking=FALSE,
... ...
@@ -41,8 +42,9 @@ Estimates GSVA enrichment scores.
41 42
     mx.diff=TRUE,
42 43
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
43 44
     kernel=TRUE,
45
+    ssgsea.norm=TRUE,
44 46
     verbose=TRUE)
45
-\S4method{gsva}{matrix,GeneSetCollection,character}(expr, gset.idx.list, annotation=NA,
47
+\S4method{gsva}{matrix,GeneSetCollection}(expr, gset.idx.list, annotation,
46 48
     method=c("gsva", "ssgsea", "zscore", "plage"),
47 49
     rnaseq=FALSE,
48 50
     abs.ranking=FALSE,
... ...
@@ -55,8 +57,9 @@ Estimates GSVA enrichment scores.
55 57
     mx.diff=TRUE,
56 58
     tau=switch(method, gsva=1, ssgsea=0.25, NA),
57 59
     kernel=TRUE,
60
+    ssgsea.norm=TRUE,
58 61
     verbose=TRUE)
59
-\S4method{gsva}{matrix,list,missing}(expr, gset.idx.list, annotation=NULL,
62
+\S4method{gsva}{matrix,list}(expr, gset.idx.list, annotation,
60 63
     method=c("gsva", "ssgsea", "zscore", "plage"),
61 64
     rnaseq=FALSE,
62 65
     abs.ranking=FALSE,
... ...
@@ -69,6 +72,7 @@ Estimates GSVA enrichment scores.
69 72
     mx.diff=TRUE,
70 73
     tau=switch(method, gsva=1, ssgsea=0.25,