ExprsMat accepts various matrix objects, including DelayedArray and HDF5Array for out-of-memory computations. See vignette.

Cepo(
  exprsMat,
  cellTypes,
  minCells = 20,
  minCelltype = 3,
  exprsPct = NULL,
  prefilter_sd = NULL,
  prefilter_pzero = NULL,
  logfc = NULL,
  computePvalue = NULL,
  computeFastPvalue = TRUE,
  variability = "CV",
  method = "weightedMean",
  weight = c(0.5, 0.5),
  workers = 1L,
  block = NULL,
  ...
)

Arguments

exprsMat

Expression matrix where columns denote cells and rows denote genes

cellTypes

Vector of cell type labels

minCells

Integer indicating the minimum number of cells required within a cell type

minCelltype

Integer indicating the minimum number of cell types required in each batch

exprsPct

Percentage of lowly expressed genes to remove. Default to NULL to not remove any genes.

prefilter_sd

Numeric value indicating threshold relating to standard deviation of genes. Used with prefilter_zeros.

logfc

Numeric value indicating the threshold of log fold-change to use to filter genes.

computePvalue

Whether to compute p-values using bootstrap test. Default to NULL to not make computations. Set this to an integer to set the number of bootstraps needed (recommend to be at least 100).

computeFastPvalue

Logical vector indicating whether to perform a faster version of p-value calculation. Set to TRUE by default.

variability

A character indicating the stability measure (CV, IQR, MAD, SD). Default is set to CV.

method

Character indicating the method for integration the two stability measures. By default this is set to 'weightedMean' with equal weights.

weight

Vector of two values indicating the weights for each stability measure. By default this value is c(0.5, 0.5).

workers

Number of cores to use. Default to 1, which invokes BiocParallel::SerialParam. For workers greater than 1, see the workers argument in BiocParallel::MulticoreParam and BiocParallel::SnowParam.

block

Vector of batch labels

...

Additional arguments passed to BiocParallel::MulticoreParam and BiocParallel::SnowParam.

prefilter_pzeros

Numeric value indicating threshold relating to the percentage of zero expression of genes. Used with prefilter_sd.

Value

Returns a list of key genes.

Examples

library(SingleCellExperiment)
#> Loading required package: SummarizedExperiment
#> Loading required package: MatrixGenerics
#> Loading required package: matrixStats
#> 
#> Attaching package: ‘matrixStats’
#> The following objects are masked from ‘package:Biobase’:
#> 
#>     anyMissing, rowMedians
#> 
#> Attaching package: ‘MatrixGenerics’
#> The following objects are masked from ‘package:matrixStats’:
#> 
#>     colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
#>     colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
#>     colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
#>     colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
#>     colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
#>     colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
#>     colWeightedMeans, colWeightedMedians, colWeightedSds,
#>     colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
#>     rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
#>     rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
#>     rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
#>     rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
#>     rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
#>     rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
#>     rowWeightedSds, rowWeightedVars
#> The following object is masked from ‘package:Biobase’:
#> 
#>     rowMedians
#> Loading required package: GenomicRanges
#> Loading required package: GenomeInfoDb
data('cellbench', package = 'Cepo')
cellbench
#> class: SingleCellExperiment 
#> dim: 894 895 
#> metadata(3): scPipe Biomart log.exprs.offset
#> assays(2): counts logcounts
#> rownames(894): AP000902.1 TNNI3 ... SCMH1 IGF2BP2
#> rowData names(0):
#> colnames(895): CELL_000001 CELL_000003 ... CELL_000955 CELL_000965
#> colData names(17): unaligned aligned_unmapped ... sizeFactor celltype
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):
cepoOutput <- Cepo(logcounts(cellbench), cellbench$celltype)
cepoOutput
#> $stats
#> DataFrame with 889 rows and 3 columns
#>                H1975     H2228    HCC827
#>            <numeric> <numeric> <numeric>
#> AC092447.7  0.849162 -0.448045 -0.401117
#> CT45A3      0.831425 -0.406285 -0.425140
#> AL049870.3  0.811872 -0.463128 -0.348743
#> TDRD9       0.750559 -0.438966 -0.311592
#> TNNI3       0.745810 -0.357402 -0.388408
#> ...              ...       ...       ...
#> STK24      -0.654050  0.370391  0.283659
#> CPVL       -0.667877  0.138268  0.529609
#> BBOX1-AS1  -0.673324  0.437011  0.236313
#> COL4A2     -0.688128  0.397905  0.290223
#> KCNK1      -0.699022  0.330866  0.368156
#> 
#> $pvalues
#> NULL
#> 
#> attr(,"class")
#> [1] "Cepo" "list"