Perform differential expression analysis on expression set object
getDE.Rd
This function is used to perform the differential expression analysis on sparse eset object. It supports there methods: "limma
", "wilcoxon
", and "t.test
".
Arguments
- input_eset
The expression set object that filtered, normalized and log-transformed
- group_by
Character, name of the column for grouping, usually the column of cell types or clusters. Default: "
clusterID
".- g1
A vector of character defining the fore-ground group or
NULL
. Default:NULL
.- g0
A vector of character defining the back-ground group or
NULL
. Default:NULL
.- use_method
Character, method used for differential analysis: "
limma
" (the default), "wilcoxon
", and "t.test
".
Examples
data(pbmc14k_expression.eset)
## 1. To perform differential expression analysis in a 1-vs-rest manner for all groups in "clusterID" column
de_res <- getDE(input_eset = pbmc14k_expression.eset,
group_by = "clusterID",
use_method = "limma")
#> 7 groups were found in group_by column [ clusterID ].
#> Since no group was specified, the differential analysis will be conducted among all groups in the group_by column [ clusterID ] in the 1-vs-rest manner.
#> 1 / 7 : group 1 ( 1 ) vs the rest...
#> 634 cells were found for g1.
#> 2866 cells were found for g0.
#> 2 / 7 : group 1 ( 2 ) vs the rest...
#> 514 cells were found for g1.
#> 2986 cells were found for g0.
#> 3 / 7 : group 1 ( 3 ) vs the rest...
#> 508 cells were found for g1.
#> 2992 cells were found for g0.
#> 4 / 7 : group 1 ( 4 ) vs the rest...
#> 492 cells were found for g1.
#> 3008 cells were found for g0.
#> 5 / 7 : group 1 ( 5 ) vs the rest...
#> 501 cells were found for g1.
#> 2999 cells were found for g0.
#> 6 / 7 : group 1 ( 6 ) vs the rest...
#> 486 cells were found for g1.
#> 3014 cells were found for g0.
#> 7 / 7 : group 1 ( 7 ) vs the rest...
#> 365 cells were found for g1.
#> 3135 cells were found for g0.
## 2. To perform differential expression analysis in a 1-vs-rest manner for one specific group in "clusterID" column
de_res <- getDE(input_eset = pbmc14k_expression.eset,
group_by = "clusterID",
g1 = c("1"),
use_method = "limma")
#> 7 groups were found in group_by column [ clusterID ].
#> Since g1 was specified but g0 was not, all the other cells except those of g1 will be defined as g0.
#> 1 / 1 : group 1 ( 1 ) vs group 0 ( 2, 3, 4, 5, 6, 7 ) ...
#> 634 cells were found for g1.
#> 2866 cells were found for g0.
## 3. To perform differential expression analysis in a rest-vs-1 manner for one specific group in "clusterID" column
de_res <- getDE(input_eset = pbmc14k_expression.eset,
group_by = "clusterID",
g0 = c("1"),
use_method = "limma")
#> 7 groups were found in group_by column [ clusterID ].
#> Since g0 was specified but g1 was not, all the other cells except those of g0 will be defined as g1.
#> 1 / 1 : group 1 ( 2, 3, 4, 5, 6, 7 ) vs group 0 ( 1 ) ...
#> 2866 cells were found for g1.
#> 634 cells were found for g0.
## 4. To perform differential expression analysis in a 1-vs-1 manner for groups in "clusterID" column
de_res <- getDE(input_eset = pbmc14k_expression.eset,
group_by = "clusterID",
g1 = c("1"),
g0 = c("3"),
use_method = "limma")
#> 7 groups were found in group_by column [ clusterID ].
#> 1 / 1 : group 1 ( 1 ) vs group 0 ( 3 ) ...
#> 634 cells were found for g1.
#> 508 cells were found for g0.
#> Warning: Zero sample variances detected, have been offset away from zero