cor.gene_expr: Compute correlation between sample and reference data

View source: R/cor_gene_expr.R

cor.gene_exprR Documentation

Compute correlation between sample and reference data

Description

Computes the correlation between the gene expressions of the sample and the reference data using the cor function ; default correlation index is spearman.

Usage

cor.gene_expr(samp, refdata, cor.method = "spearman")

Arguments

samp

the sample matrix, gene as rows, individuals as columns

refdata

the reference time series matrix, same format as samp

cor.method

method parameter passed on to the cor function

Value

a matrix of correlation scores with samples as columns, refdata as rows

Examples

X <- matrix(stats::rnorm(5000), ncol = 5)
Y <- X + stats::rnorm(5000, sd = .1)
rownames(X) <- as.character(1:1000) -> rownames(Y)

cc <- cor.gene_expr(X, Y)


LBMC/wormAge documentation built on April 6, 2023, 3:52 a.m.