Learn R Programming

gsdensity (version 0.1.2)

compute.spatial.kld.df: This function is to calculate how likely the cells relevant to multiple gene sets are randomly distributed spatially

Description

This function is to calculate how likely the cells relevant to multiple gene sets are randomly distributed spatially

Usage

# S3 method for spatial.kld.df
compute(spatial.coords, weight_df, n = 10, n.times = 20)

Value

spatial kl-divergence for multiple gene sets

Arguments

spatial.coords

a data frame with each row as a cell and each column as a spatial coordinate (usually 2: x and y)

weight_df

output of run.rwr.list

n

split the spatial map for local density estimation; n is the number of split for each dimension; for n = 10, the spatial map is split to n * n = 100 grids for the density estimation

n.times

the same as n.times in function 'compute.spatial.kld'

Examples

Run this code

compute.spatial.kld.df(spatial.coords = coords.df, weight_df = weight_df)

Run the code above in your browser using DataLab