Skip to contents

AggregateRlm

AggregateRlm

Value

An R6 class generator.

Details

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

Super class

prolfqua::AggregatorBase -> AggregateRlm

Methods

Inherited methods


Method aggregate()

run robust regression aggregation

Usage

AggregateRlm$aggregate()

Returns

LFQData


Method 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()
#> creating sampleName from file_name column
#> completing cases
#> completing cases done
#> setup done
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
#> Column added : log2_abundance
#> data is : TRUE
#> Joining with `by = join_by(sampleName, isotopeLabel, protein_Id, peptide_Id)`

agg <- AggregateRlm$new(lfqTrans, "protein")
agg$aggregate()
#> starting aggregation
#> completing cases
p <- agg$plot()
p$plots[[1]]
#> Warning: Removed 7 rows containing missing values or values outside the scale range
#> (`geom_point()`).
#> Warning: Removed 4 rows containing missing values or values outside the scale range
#> (`geom_line()`).