Description Usage Arguments Details Value Examples
View source: R/correlate_windows.R
Calculates pairwise correlations between all features each window against all features in the reference window.
1 | correlate_windows(dataset, n_random = 3, ...)
|
dataset |
A data frame containing all the binned genes. Usually the output of |
n_random |
Number of top window randomization to serve as a negative control. Default to 3. |
... |
Additional arguments to be passed to |
This function:
correlates each feature in each window to each feature in the top window.
randomize the top window by shuffling expression value, and
correlate each gene in each window to the randomized top window.
This negative control is repeated as many time as specified by
the n_random
parameter.
The input of this function is usually the output of the bin_scdata
function.
A tibble
containing correlation values.
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(magrittr)
expMat <- matrix(
c(1, 1, 5,
1, 2, 3,
0, 1, 4,
0, 0, 2),
ncol = 3, byrow = TRUE, dimnames = list(paste("gene", 1:4), paste("cell", 1:3))
)
calculate_cvs(expMat) %>%
define_top_genes(window_size = 2) %>%
bin_scdata(window_number = 1) %>%
correlate_windows
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.