associate: Cross Correlation Wrapper

View source: R/associate.R

associateR Documentation

Cross Correlation Wrapper

Description

Cross-correlate columns of the input matrices.

Usage

associate(
  x,
  y = NULL,
  method = "spearman",
  p.adj.threshold = Inf,
  cth = NULL,
  order = FALSE,
  n.signif = 0,
  mode = "table",
  p.adj.method = "fdr",
  verbose = FALSE,
  filter.self.correlations = FALSE
)

Arguments

x

matrix (samples x features if annotation matrix)

y

matrix (samples x features if cross-correlated with annotations)

method

association method ('pearson', or 'spearman' for continuous)

p.adj.threshold

q-value threshold to include features

cth

correlation threshold to include features

order

order the results

n.signif

minimum number of significant correlations for each element

mode

Specify output format ('table' or 'matrix')

p.adj.method

p-value multiple testing correction method. One of the methods in p.adjust function ('BH' and others; see help(p.adjust)). Default: 'fdr'

verbose

verbose

filter.self.correlations

Filter out correlations between identical items.

Details

The p-values in the output table depend on the method. For the spearman and pearson correlation values, the p-values are provided by the default method in the cor.test function.

Value

List with cor, pval, pval.adjusted

Author(s)

Contact: Leo Lahti microbiome-admin@googlegroups.com

References

See citation('microbiome')

Examples

data(peerj32)
d1 <- peerj32$microbes[1:20, 1:10]
d2 <- peerj32$lipids[1:20,1:10]
cc <- associate(d1, d2, method='pearson')

microbiome/microbiome documentation built on Aug. 22, 2023, 7:12 a.m.