Aggregates e.g. protein abundances from peptide abundances

estimate_intensity(data, config, .func)

Arguments

func

- a function working on a matrix of intensities for each protein.

Value

returns list with data (data.frame) and config (AnalysisConfiguration)

Examples


dd <- prolfqua::sim_lfq_data_peptide_config()
#> creating sampleName from fileName column
#> Warning: no nr_children column specified in the data, adding column nr_children and setting to 1.
#> completing cases
config <- dd$config
data <- dd$data
data <- prolfqua::transform_work_intensity(data, config, log2)
#> Column added : log2_abundance
bbMed <- estimate_intensity(data, config, .func = medpolish_estimate_dfconfig)
#> starting aggregation
bbRob <- estimate_intensity(data, config, .func = rlm_estimate_dfconfig)
#> starting aggregation
#> Warning: 'rlm' failed to converge in 20 steps
#> Warning: 'rlm' failed to converge in 20 steps
nrow(bbMed$data)
#> [1] 116
nrow(bbRob$data)
#> [1] 116
length(bbMed$data$medpolish)
#> [1] 116
length(bbRob$data$lmrob)
#> [1] 116
xt <- dplyr::inner_join(bbMed$data, bbRob$data)
#> Joining with `by = join_by(protein_Id, sampleName, group_, sample,
#> isotopeLabel, nr_protein_Id)`
plot(xt$medpolish, xt$lmrob, log="xy", pch="*")
abline(0,1, col=2)