Skip to contents

Aggregates peptide intensities to protein level using robust regression (rlm). Works best with variance-stabilized (log-transformed) intensities.

Value

An R6 class generator.

Super class

AggregatorBase -> AggregateRlm

Public fields

control

convergence controls of MASS::rlm: maxit (default 20) and acc (default 1e-4, relative change of the IRLS residuals)

Methods

Inherited methods


AggregateRlm$new()

initialize

Usage

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

Arguments

lfq

LFQData

prefix

default protein

control

named list merged over the defaults; convergence controls of MASS::rlm: maxit (default 20) and acc (default 1e-4, relative change of the IRLS residuals)


AggregateRlm$aggregate()

run robust regression aggregation

Usage

AggregateRlm$aggregate()

Returns

LFQData


AggregateRlm$clone()

The objects of this class are cloneable with this method.

Usage

AggregateRlm$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 <- AggregateRlm$new(lfqTrans, "protein")
agg$aggregate()
p <- agg$plot()
p$plots[[1]]