View source: R/CrossExpression.R
bullseye_scores | R Documentation |
Calculates bullseye statistics for ALL gene pairs. Counts the number of cells with gene B in those with gene A And in their neighbors Neighbor scores are cumulative and normalized by window size.
bullseye_scores(
data,
locations,
window_sizes = 1:5,
ratio_to_co = FALSE,
log_2 = FALSE,
output_matrix = FALSE
)
data |
A cells by genes expression matrix. |
locations |
A cells by coordinates (x-y or higher dimensions) matrix. |
window_sizes |
Vector of window sizes. |
ratio_to_co |
If TRUE, results are normalized by co-expressing cells. |
log_2 |
If TRUE, results are transformed by log2. |
output_matrix |
If TRUE, results are provided in matrix form. |
Returns a dataframe with each row representing a gene pair and each column representing the bullseye score for that pair in each window size. output_matrix = TRUE presents a matrix for each window size.
data("locations")
data("expression")
locations = as.matrix(locations)
expression = as.matrix(expression)
expression = expression[,1:5]
results = bullseye_scores(data = expression, locations = locations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.