Description Usage Arguments Details Value
View source: R/calculate_autocorrelation.R
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.
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
)
|
profile1 |
a numeric matrix or data frame with proteins in rows and
fractions in columns, or a |
profile2 |
a numeric matrix or data frame with proteins in rows and
fractions in columns, or a |
cor_method |
the correlation method to use; one of |
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 |
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.
a named vector of autocorrelation scores for all proteins found in both matrices.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.