Description Usage Arguments Details Value Author(s) See Also Examples

Calculate the average count for each feature after normalizing observations using per-cell size factors.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
calculateAverage(x, ...)
## S4 method for signature 'ANY'
calculateAverage(
x,
size.factors = NULL,
subset.row = NULL,
BPPARAM = SerialParam(),
size_factors = NULL,
subset_row = NULL
)
## S4 method for signature 'SummarizedExperiment'
calculateAverage(x, ..., assay.type = "counts", exprs_values = NULL)
## S4 method for signature 'SingleCellExperiment'
calculateAverage(x, size.factors = NULL, ...)
``` |

`x` |
A numeric matrix of counts where features are rows and columns are cells. Alternatively, a SummarizedExperiment or a SingleCellExperiment containing such counts. |

`...` |
For the generic, arguments to pass to specific methods. For the SummarizedExperiment method, further arguments to pass to the ANY method. For the SingleCellExperiment method, further arguments to pass to the SummarizedExperiment method. |

`size.factors` |
A numeric vector containing size factors.
If |

`subset.row` |
A vector specifying the subset of rows of |

`BPPARAM` |
A BiocParallelParam object specifying whether the calculations should be parallelized.
Only relevant for parallelized |

`size_factors, subset_row, exprs_values` |
Soft-deprecated counterparts to the arguments above. |

`assay.type` |
A string specifying the assay of |

The size factor-adjusted average count is defined by dividing each count by the size factor and taking the average across cells. All size factors are scaled so that the mean is 1 across all cells, to ensure that the averages are interpretable on the same scale of the raw counts.

If no size factors are supplied, they are determined automatically:

For count matrices and SummarizedExperiment inputs, the sum of counts for each cell is used to compute a size factor via the

`librarySizeFactors`

function.For SingleCellExperiment instances, the function searches for

`sizeFactors`

from`x`

. If none are available, it defaults to library size-derived size factors.

If `size_factors`

are supplied, they will override any size factors present in `x`

.

A numeric vector of average count values with same length as number of features
(or the number of features in `subset_row`

if supplied).

Aaron Lun

`librarySizeFactors`

, for the default calculation of size factors.

`logNormCounts`

, for the calculation of normalized expression values.

1 2 3 | ```
example_sce <- mockSCE()
ave_counts <- calculateAverage(example_sce)
summary(ave_counts)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.