Skip to contents

Aggregates peptide intensities to protein level using median polish. Works best with variance-stabilized (log-transformed) intensities.

Value

An R6 class generator.

Super class

AggregatorBase -> AggregateMedpolish

Public fields

control

convergence controls of stats::medpolish: maxiter (default 10) and eps (default 0.01; the polish stops when the sum of absolute residuals changes by less than eps times that sum)

Methods

Inherited methods


AggregateMedpolish$new()

initialize

Usage

AggregateMedpolish$new(lfq, prefix = "protein", control = list())

Arguments

lfq

LFQData

prefix

default protein

control

named list merged over the defaults; convergence controls of stats::medpolish: maxiter (default 10) and eps (default 0.01; the polish stops when the sum of absolute residuals changes by less than eps times that sum)


AggregateMedpolish$aggregate()

run median polish aggregation

Usage

AggregateMedpolish$aggregate()

Returns

LFQData


AggregateMedpolish$clone()

The objects of this class are cloneable with this method.

Usage

AggregateMedpolish$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

istar <- prolfqua::sim_lfq_data_peptide_config()
#> `protein_Id`: columns `proteinID`, `idtype2` united with separator '~'.
#> creating sampleName from file_name column
#> setup_analysis: dropped 6 unconfigured columns: average_prot_abundance, sd, mean, N, avg_peptide_abd, Replicate.
#> setup_analysis: added 36 rows with NA response for feature and sample combinations absent from the input.
data <- istar$data |> dplyr::filter(protein_Id %in% sample(protein_Id, 100))
lfqdata <- LFQData$new(data, istar$config)
lfqTrans <- lfqdata$clone()$get_Transformer()$log2()$robscale()$lfq
#> Transformed response column added: log2_abundance

agg <- AggregateMedpolish$new(lfqTrans, "protein")
agg$aggregate()
p <- agg$plot()
p$plots[[1]]