Skip to contents

This function aggregate both quantitative and rowdata from the last assay contained in a QFeatures. Note that the function assumes that the intensities in the QFeatures are already log-transformed.

Usage

RunAggregation(
  qf,
  includeSharedPeptides = "Yes_As_Specific",
  operator = "Mean",
  considerPeptides = "allPeptides",
  adjMatrix = "adjacencyMatrix",
  ponderation = "Global",
  n = NULL,
  aggregated_col = NULL,
  max_iter = 500
)

Arguments

qf

An instance of class QFeatures. The last assay contained in qf will be aggregated. Intensities are assumed to already be log-transformed.

includeSharedPeptides

How shared peptides are handled. Either Yes_As_Specific (default), Yes_Iterative_Redistribution, Yes_Simple_Redistribution or No. See below for details.

operator

A function used for quantitative feature aggregation. Available functions are Sum, Mean, Median, medianPolish or robustSummary. See below for details.

considerPeptides

A character(1) defining what peptide to consider. Available values are allPeptides (default) and topN.

adjMatrix

A character(1) naming a rowdata variable from the last assay of qf containing an adjacency matrix.

ponderation

A character(1) defining what to consider to create the coefficient for redistribution of shared peptides. Available values are Global (default), Condition or Sample.

n

If topN, specify the number of peptides to use for each protein.

aggregated_col

A character() of column names from rowdata to be aggregated.

max_iter

A numeric(1) setting the maximum number of iteration.

Value

A QFeatures with an aggregated assay added.

Details

Aggregation of quantitative data is performed using aggregateFeatures, or inner.aggregate.iter if Yes_Iterative_Redistribution or Yes_Simple_Redistribution is selected.

The handling of shared peptide is as follow :

  • Yes_As_Specific : Shared peptides are used multiple times. Each peptide is duplicated as many times as the number of proteins in which they are present, and thus are considered as if they are specific to each protein.

  • Yes_Simple_Redistribution : Intensity of shared peptides are redistributed proportionally to each protein. See inner.aggregate.iter for more information.

  • Yes_Iterative_Redistribution : Intensity of shared peptides are redistributed proportionally to each protein. See inner.aggregate.iter for more information.

  • No : No shared peptides are used. If a peptide contained only shared peptides, its intensity is set as 0 for every sample.

Available functions are :

Author

Samuel Wieczorek, Manon Gaudin

Examples

if (FALSE) { # \dontrun{
data(Exp1_R25_pept, package="DaparToolshedData")
ft <- Exp1_R25_pept[1:100]
obj.agg <- RunAggregation(ft, "Yes_As_Specific", "Sum", "allPeptides", aggregated_col = colnames(SummarizedExperiment::rowData(ft[[length(ft)]])))
obj.agg <- RunAggregation(ft, "Yes_As_Specific", "Mean", "allPeptides", aggregated_col = colnames(SummarizedExperiment::rowData(ft[[length(ft)]])))
obj.agg <- RunAggregation(ft, "Yes_As_Specific", "Sum", "topN", n = 4, aggregated_col = colnames(SummarizedExperiment::rowData(ft[[length(ft)]])))
obj.agg <- RunAggregation(ft, "Yes_As_Specific", "Mean", "topN", n = 4, aggregated_col = colnames(SummarizedExperiment::rowData(ft[[length(ft)]])))

obj.agg <- RunAggregation(ft, "No", "Sum", "allPeptides")
obj.agg <- RunAggregation(ft, "No", "Sum", "topN", n = 4)

obj.agg <- RunAggregation(ft, "Yes_Redistribution", "Sum", "allPeptides", aggregated_col = colnames(SummarizedExperiment::rowData(ft[[length(ft)]])))
obj.agg <- RunAggregation(ft, "Yes_Redistribution", "Sum", "topN", n = 4, aggregated_col = colnames(SummarizedExperiment::rowData(ft[[length(ft)]])))
} # }