scale_with_subset_by_factors: Scale using a subset of the data, within factor levels (e.g....

View source: R/tidyMS_R6_TransitionCorrelations.R

scale_with_subset_by_factorsR Documentation

Scale using a subset of the data, within factor levels (e.g. use for pulldown data)

Description

This method reduces the variance within the group.

Usage

scale_with_subset_by_factors(data, subset, config, preserveMean = FALSE)

Arguments

data

tibble with data

subset

tibble with subset of the data which will be used to derive scaling parameters

config

configuration

preserveMean

default FALSE then set mean to 0

See Also

Other preprocessing: INTERNAL_FUNCTIONS_BY_FAMILY, apply_to_response_matrix(), filter_proteins_by_peptide_count(), get_robscales(), normalize_log2_robscale(), robust_scale(), scale_with_subset()

Examples



bb <- prolfqua_data('data_ionstar')$filtered()
bb$config <- old2new(bb$config)
stopifnot(nrow(bb$data) == 25780)
conf <- bb$config$clone(deep=TRUE)
sample_analysis <- bb$data
conf$table$workIntensity <- "peptide.intensity"

res <- transform_work_intensity(sample_analysis, conf, log2)
res <- scale_with_subset_by_factors(res, res, conf)



wolski/prolfqua documentation built on May 12, 2024, 10:16 p.m.