The method calculates either the euclidean distance between samples or proteins taking into account the missing values and the associated uncertainty. Because with missing value no single deterministic distance can be calculated two objects are returned: the mean and the associated standard deviation of the distance estimates.

# S4 method for proDAFit
dist_approx(object, by_sample = TRUE,
  blind = TRUE)

# S4 method for SummarizedExperiment
dist_approx(object, by_sample = TRUE,
  blind = TRUE, ...)

# S4 method for ANY
dist_approx(object, by_sample = TRUE, blind = TRUE,
  ...)

Arguments

object

the 'proDAFit' object for which we calculate the distance or a matrix like object for which 'proDAFit' is created internally

by_sample

a boolean that indicates if the distances is calculated between the samples (`by_sample = TRUE`) or between the proteins (`by_sample = FALSE`). Default: `TRUE`

blind

fit an intercept model for the missing values to make sure that the results are not biased for the expected result. Default: `TRUE`

...

additional arguments to proDA() in case object is a SummarizedExperiment or a matrix

Value

a list with two elements: `mean` and `sd` both are formally of class "dist"

Examples

syn_data <- generate_synthetic_data(n_proteins = 10) fit <- proDA(syn_data$Y, design = syn_data$groups) dist_approx(fit)
#> $mean #> Condition_1-1 Condition_1-2 Condition_1-3 Condition_2-1 #> Condition_1-2 1.2614914 #> Condition_1-3 1.6110766 1.0339449 #> Condition_2-1 1.3363061 1.1169807 1.3232710 #> Condition_2-2 1.1440841 1.1504494 1.5303490 0.8213760 #> Condition_2-3 1.8384305 1.3043910 1.4120349 0.8771074 #> Condition_2-2 #> Condition_1-2 #> Condition_1-3 #> Condition_2-1 #> Condition_2-2 #> Condition_2-3 1.2686123 #> #> $sd #> Condition_1-1 Condition_1-2 Condition_1-3 Condition_2-1 #> Condition_1-2 0.23213632 #> Condition_1-3 0.19907003 0.11545470 #> Condition_2-1 0.21904456 0.10778416 0.08917388 #> Condition_2-2 0.10700289 0.10893890 0.08067709 0.15235000 #> Condition_2-3 0.04613067 0.13383849 0.12178759 0.19598264 #> Condition_2-2 #> Condition_1-2 #> Condition_1-3 #> Condition_2-1 #> Condition_2-2 #> Condition_2-3 0.05927223 #>