correlateGenes: Examine Gene-Gene Correlations in Datamatrix

correlateGenesR Documentation

Examine Gene-Gene Correlations in Datamatrix

Description

Provides a quick way to check for the range of correlations in a given data matrix. If no limits are supplied, will return a histogram of all correlation present. When limits are supplied, a data frame is returned detailing all gene pair correlations that are more negatively correlated than the lower limit and more positively correlated than the upper limit.

Usage

correlateGenes(data, limits = NULL, nbreaks = 20, method = "pearson",
  NA.handling = "pairwise.complete.obs")

Arguments

data

numeric data matrix with samples/observations in the columns and genes/variables in the rows

limits

vector of two numbers, giving the lower and upper bounds of the returned correlations. If NULL (the default) will return a histogram of all correlations in the data. When limits are provided, correlations below the lower limit and above the upper limit will be returned.

nbreaks

number of breaks for the histogram if limits is set to NULL

method

method to be used to calculate the correlation. Accepts values to be passed to cor() such as "pearson" (default), "spearman", and "kendall".

NA.handling

how missing values should be handled in the case of correlations, passed to the "use" argument of cor()

Value

If limits are not provided, returns a plot histogram. If limits are provided, returns a data frame with three columns where the first two columns indicate the gene pair and the third column gives the correlation between them.

Author(s)

~~Alison Moss~~

See Also

See Also as corrs2Gene for comparisons against a single gene of interest

Examples


##initiate parameters
initiate_params()

##histogram showing range of gene correlations
correlateGenes(RAGP_norm)

##return correlation pairs above lower limit and above upper limit
cors <- correlateGenes(RAGP_norm, limits=c(-0.5, 0.85))
head(cors)


axm323/dataVisEasy documentation built on Feb. 1, 2024, 11:53 p.m.