correlate: Calculate correlations against top window.

Description Usage Arguments Details Value

Description

Calculates correlations of each window against the top, and stores them in a vector.

Usage

1
correlate(dataset, cor_method)

Arguments

dataset

A data frame containing all the binned genes.

cor_method

A string indicating the type of correlation to use.

Details

The input of this function is usually the output of the bin_scdata function.

The correlation vector for each window is generated by iterating the genes in the top window and correlating them to every other window. As a result, there will be as many correlation values in the vector as genes in the top window. Consequently, top window size greatly impacts the computational efficiency of the process.

The correlation method argument is passed on to the cor function, in the stats package, and therefore, the same options as this function provides are available. However, it is adviseable to use pearson correlation, since it presents the most advantageous balance of result quality and computational efficiency.

Value

A list containing, on a separate element, the vectors of correlations for every window against the top.


angelesarzalluz/scfilters documentation built on May 10, 2019, 11:46 a.m.