calculate_autocorrelation: Calculate the autocorrelation for each protein between a pair...

Description Usage Arguments Details Value

View source: R/calculate_autocorrelation.R

Description

For a given protein, the correlation coefficient to all other proteins in the first condition is calculated, yielding a vector of correlation coefficients. The same procedure is repeated for the second condition, and the two vectors of correlation coefficients are themselves correlated, yielding a metric whereby higher values reflect proteins with unchanging interaction profiles between conditions, while lower values reflect proteins with substantially changing interaction profiles.

Usage

1
2
3
4
5
6
7
8
calculate_autocorrelation(
  profile1,
  profile2,
  cor_method = c("pearson", "spearman", "kendall"),
  min_replicates = 1,
  min_fractions = 1,
  min_pairs = 0
)

Arguments

profile1

a numeric matrix or data frame with proteins in rows and fractions in columns, or a MSnSet object, representing the first co-elution condition

profile2

a numeric matrix or data frame with proteins in rows and fractions in columns, or a MSnSet object, representing the second co-elution condition

cor_method

the correlation method to use; one of "pearson", "spearman", or "kendall").

min_fractions

filter proteins not quantified in at least this many fractions

min_pairs

remove correlations between protein pairs not co-occuring in at least this many fractions from the autocorrelation calculation

Details

Note that all of zero, NA, NaN, and infinite values are all treated equivalently as missing values when applying the min_fractions and min_pairs filters, but different handling of missing values will produce different autocorrelation scores.

Value

a named vector of autocorrelation scores for all proteins found in both matrices.


fosterlab/PrInCE-R documentation built on Dec. 11, 2020, 3:51 p.m.