dot-missigness_impute_interactions: Compute interaction averages and impute data using mean of...

.missigness_impute_interactionsR Documentation

Compute interaction averages and impute data using mean of lowest 0.1 (default)

Description

used in Acetylation project p2916

Usage

.missigness_impute_interactions(
  pdata,
  config,
  factors = config$table$factor_keys_depth(),
  probs = 0.1,
  global = TRUE
)

Arguments

pdata

data.frame

config

AnalysisConfiguration

factors

factor to include (default up to factor depth)

probs

quantile to take average from (default 0.1)

global

global min value

Value

function with parameter 'value' 'c("long", "nrReplicates", "nrMeasured", "meanAbundance", "imputed", "allWide", "all")'

function

Examples


istar <- sim_lfq_data_peptide_config(Nprot = 20,weight_missing = 2)
config <- istar$config
analysis <- istar$data
xx <- complete_cases(analysis, config)
nrPepTimesDilution <- length(unique(paste0(xx$protein_Id, xx$peptide_Id))) *
    length(unique(xx$group_))
funx <- .missigness_impute_interactions(xx, config)
long <- funx("long")
alldata <- funx("all")
stopifnot(length(names(alldata)) == 5)

imputed <- funx("imputed")
stopifnot(nrow(imputed) == length(unique(paste0(xx$protein_Id, xx$peptide_Id))))
missing <- funx("nrMeasured")
stopifnot(nrow(missing) == length(unique(paste0(xx$protein_Id, xx$peptide_Id))))

 meanAbundance <- funx("mean")
stopifnot(nrow(meanAbundance) == length(unique(paste0(xx$protein_Id, xx$peptide_Id))))
 stopifnot(sum(is.na(imputed$mean.imp.group_A))==0)


wolski/prolfqua documentation built on April 27, 2024, 4:09 p.m.