aggregateFeaturesOverAssays: Aggregate features over multiple assays

Description Usage Arguments Value See Also Examples

View source: R/utils.R

Description

This function is a wrapper function around QFeatures::aggregateFeatures. It allows the user to provide multiple assays for which aggregateFeatures will be applied sequentially.

Usage

1
aggregateFeaturesOverAssays(obj, i, fcol, name, fun, ...)

Arguments

obj

A QFeatures object

i

A numeric(1) or character(1) indicating which assay to transfer the colData to.

fcol

The feature variables for each assays i defining how to summarise the QFeatures. If fcol has length 1, the variable name is assumed to be the same for all assays

name

A character() naming the new assay. name must have the same length as i. Note that the function will fail if of the names in name is already present.

fun

A function used for quantitative feature aggregation.

...

Additional parameters passed the fun.

Value

A QFeatures object

See Also

QFeatures::aggregateFeatures

Examples

1
2
3
4
5
6
7
8
data("scp1")
scp1 <- aggregateFeaturesOverAssays(scp1, 
                                    i = 1:3,
                                    fcol = "peptide",
                                    name = paste0("peptides", 1:3),
                                    fun = colMeans,
                                    na.rm = TRUE)
scp1

scp documentation built on Nov. 8, 2020, 8:20 p.m.