This function analyzes the data that came up from permutationClustering script with spatial transcriptomics data. The function integrates CSS with a score, which is related to the beloging cluster identity of a cell with respect to the other 6 cell neighborhood that surround it.

spatialAnalysis2(
  group = c("sudo", "docker"),
  scratch.folder,
  file,
  nCluster,
  separator,
  tissuePosition,
  Sp = 0.8,
  percentageIncrease = 10
)

Arguments

group,

a character string. Two options: sudo or docker, depending to which group the user belongs

scratch.folder,

a character string indicating the path of the scratch folder

file,

a character string indicating the path of the file, with file name and extension included

nCluster,

Last number of cluster that has to be analyzed

separator,

separator used in count file, e.g. '\t', ','

tissuePosition,

file with tissue position name with extension

Sp,

Threshold to assign the plus score. 1 mean that all 6 cells, sorrounding the central cell, belong to the same cluster of the central cell. 0.8 out mean 5 out of 6 are of the same cluster of the central cell, 0.6 mean 4 out of 6 are of the same cluster of the central cell. We do not suggest to go below these three value.

percentageIncrease,

percentage of the CSS score that has to be increased if the Threshold condition is satisfied.

Value

stability plot for each nCluster,two files with score information for each cell for each permutation.

Author

Luca Alessandri , alessandri [dot] luca1991 [at] gmail [dot] com, University of Torino

Examples

if (FALSE) {
spatialAnalysis2(group=c("sudo"), scratch.folder="/home/lucastormreig/temp/", file="/home/lucastormreig/test/spatialAnalysis/spatial/HLNrevised.csv",nCluster=5,separator=",",tissuePosition="/home/lucastormreig/test/spatialAnalysis/spatial/Results/tissue_positions_list.csv",Sp=0.8,percentageIncrease=10)
}