DaparToolshed-aggregate | R Documentation |
This function aggregates the quantitative features of an assay,
applying a summarization function (fun
) to sets of features.
The fcol
variable name points to a rowData column that defines
how to group the features during aggregate. This variable can
either be a vector (we then refer to an aggregation by vector)
or an adjacency matrix (aggregation by matrix).
The quantitative metadata are aggregated with a function (fun.qmeta
).
The list of agregation methods can be obtained with aggregateMethods()
. This function
compiles both methods from the packages DaparToolshed
and QFeatures
.
xxx
## S4 method for signature 'QFeatures' aggregateFeatures4Prostar( object, i, fcol, name = "newAssay", fun = MsCoreUtils::robustSummary, ... ) ## S4 method for signature 'SummarizedExperiment' aggregateFeatures4Prostar( object, fcol, fun = MsCoreUtils::robustSummary, conds, ... ) aggQmetadata(qMeta, X, level, conds) aggregateMethods()
object |
An instance of class QFeatures or SummarizedExperiment. |
i |
The index or name of the assay which features will be aggregated the create the new assay. |
fcol |
A |
name |
A |
fun |
A function used for quantitative feature aggregation. See Details for examples. |
... |
Additional parameters passed the |
conds |
A |
qMeta |
An object of class 'SummarizedExperiment' |
X |
xxxx |
level |
A |
fun.qmeta |
A function used for quantitative metadata aggregation. See Details for examples. |
A QFeatures
object with an additional assay or a
SummarizedExperiment
object (or subclass thereof).
xxxxx
xxxxxx xxxxx
xxxxxx xxxx
The function to aggregate the quantitative metadata is
aggQmetadat()
xxxxx
The QFeatures vignette provides an extended example and the Aggregation vignette, for a complete quantitative proteomics data processing pipeline.
## --------------------------------------- ## An example QFeatures with PSM-level data ## --------------------------------------- data(ft) ft ## Aggregate peptides into proteins ## using the adjacency matrix ft <- ft <- aggregateFeatures4Prostar(object = ft, i = 1, name = 'aggregated', fcol = 'adjacencyMatrix', fun = colSumsMat, fun.qmeta = aggQmeta) feat1 assay(feat1[[1]]) assay(feat1[[2]]) aggcounts(feat1[[2]]) assay(feat1[[3]]) aggcounts(feat1[[3]]) rowData(ft[[2]]) data(ft) qMeta <- qMetadata(ft, 1) X <- adjacencyMatrix(ft, 1) level <- typeDataset(ft, 1) conds <- colData(ft)$Condition aggQmeta <- aggQmetadata(qMeta, X, level, conds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.