Calculate spatial correlations in both univariate and bivariate settings.
Details
1) when mode = "univariate", set `item` as NULL or a gene vector. if NULL: test genome-wide genes else: test the genes you input
2) when mode = "univariate", set `item` as NULL or a two-column matrix. if NULL: test all ligand-receptor pair stored in our package else: test the gene pairs you input
Examples
genes <- c("TGFB1","TGFB2","TGFB3","TGFBR1","TGFBR2","TGFBR3")
genePairs <- data.frame(c("TGFB1","TGFB1"), c("TGFBR1","TGFBR2"))
SpaCET_obj <- SpaCET.SpatialCorrelation(SpaCET_obj, mode="univariate", item=genes, W, nPermutation=1000)
SpaCET_obj <- SpaCET.SpatialCorrelation(SpaCET_obj, mode="bivariate", item=genePairs, W, nPermutation=1000)
SpaCET_obj <- SpaCET.SpatialCorrelation(SpaCET_obj, mode="pairwise", W)