Skip to contents

wrapper for full resegmentation pipeline using internal reference profiles and cutoffs. This function first estimates proper reference profiles and cutoffs from the provided data and then use fastReseg_perFOV_full_process function to process each transcript data.frame.

Usage

fastReseg_full_pipeline(
  counts,
  clust = NULL,
  refProfiles = NULL,
  transDF_fileInfo = NULL,
  filepath_coln = "file_path",
  prefix_colns = c("slide", "fov"),
  fovOffset_colns = c("stage_X", "stage_Y"),
  pixel_size = 0.18,
  zstep_size = 0.8,
  transcript_df = NULL,
  transID_coln = NULL,
  transGene_coln = "target",
  cellID_coln = "CellId",
  spatLocs_colns = c("x", "y", "z"),
  extracellular_cellID = NULL,
  flagModel_TransNum_cutoff = 50,
  flagCell_lrtest_cutoff = 5,
  svmClass_score_cutoff = -2,
  svm_args = list(kernel = "radial", scale = FALSE, gamma = 0.4),
  molecular_distance_cutoff = 2.7,
  cellular_distance_cutoff = NULL,
  score_baseline = NULL,
  lowerCutoff_transNum = NULL,
  higherCutoff_transNum = NULL,
  imputeFlag_missingCTs = TRUE,
  groupTranscripts_method = c("dbscan", "delaunay"),
  spatialMergeCheck_method = c("leidenCut", "geometryDiff"),
  cutoff_spatialMerge = 0.5,
  leiden_config = list(objective_function = "CPM", resolution_parameter = 1, beta = 0.01,
    n_iterations = 200),
  config_spatNW_transcript = NULL,
  path_to_output = "reSeg_res",
  transDF_export_option = c(1, 2, 0),
  save_intermediates = TRUE,
  return_perCellData = TRUE,
  combine_extra = FALSE,
  ctrl_genes = NULL,
  seed_process = NULL,
  percentCores = 0.75
)

Arguments

counts

Counts matrix for entire dataset, cells X genes.

clust

Vector of cluster assignments for each cell in counts, when NULL to automatically assign the cell cluster for each cell based on maximum transcript score of given the provided refProfiles

refProfiles

A matrix of cluster profiles, genes X clusters, default = NULL to use external cluster assignments

transDF_fileInfo

a data.frame with each row for each individual file of per FOV transcript data.frame within which the coordinates and CellId are unique, columns include the file path of per FOV transcript data.frame file, annotation columns like slide and fov to be used as prefix when creating unique cell_ID across entire dataset; when NULL, use the provided transcript_df directly

filepath_coln

the column name of each individual file of per FOV transcript data.frame in transDF_fileInfo

prefix_colns

the column names of annotation in transDF_fileInfo, to be added to the CellId as prefix when creating unique cell_ID for entire dataset; set to NULL if use the original transID_coln or cellID_coln

fovOffset_colns

the column name of coordinate offsets in 1st and 2nd dimension for each per FOV transcript data.frame in transDF_fileInfo, unit in micron Notice that some assays like SMI has XY axes swapped between stage and each FOV such that fovOffset_colns should be c("stage_Y", "stage_X").

pixel_size

the micrometer size of image pixel listed in 1st and 2nd dimension of spatLocs_colns of each transcript_df

zstep_size

the micrometer size of z-step for the optional 3rd dimension of spatLocs_colns of each transcript_df

transcript_df

the data.frame of transcript level information with unique CellId, default = NULL to read from the transDF_fileInfo

transID_coln

the column name of transcript_ID in transcript_df, default = NULL to use row index of transcript in each transcript_df; when prefix_colns != NULL, unique transcript_id would be generated from prefix_colns and transID_coln in each transcript_df

transGene_coln

the column name of target or gene name in transcript_df

cellID_coln

the column name of cell_ID in transcript_df; when prefix_colns != NULL, unique cell_ID would be generated from prefix_colns and cellID_coln in each transcript_df

spatLocs_colns

column names for 1st, 2nd and optional 3rd dimension of spatial coordinates in transcript_df

extracellular_cellID

a vector of cell_ID for extracellular transcripts which would be removed from the resegmention pipeline (default = NULL)

flagModel_TransNum_cutoff

the cutoff of transcript number to do spatial modeling for identification of wrongly segmented cells (default = 50)

flagCell_lrtest_cutoff

the cutoff of lrtest_nlog10P to identify putative wrongly segemented cells with strong spatial dependency in transcript score profile

svmClass_score_cutoff

the cutoff of transcript score to separate between high and low score transcripts in SVM (default = -2)

svm_args

a list of arguments to pass to svm function for identifying low-score transcript groups in space, typically involve kernel, gamma, scale

molecular_distance_cutoff

maximum molecule-to-molecule distance within connected transcript group, unit in micron (default = 2.7 micron). If set to NULL, the pipeline would first randomly choose no more than 2500 cells from up to 10 random picked ROIs with search radius to be 5 times of cellular_distance_cutoff, and then calculate the minimal molecular distance between picked cells. The pipeline would further use the 5 times of 90% quantile of minimal molecular distance as molecular_distance_cutoff. This calculation is slow and is not recommended for large transcript data.frame.

cellular_distance_cutoff

maximum cell-to-cell distance in x, y between the center of query cells to the center of neighbor cells with direct contact, unit in micron. Default = NULL to use the 2 times of average 2D cell diameter.

score_baseline

a named vector of score baseline under each cell type listed in refProfiles such that per cell transcript score higher than the baseline is required to call a cell type of high enough confidence; default = NULL to calculate from counts and refProfiles

lowerCutoff_transNum

a named vector of transcript number cutoff under each cell type such that higher than the cutoff is required to keep query cell as it is; default = NULL to calculate from counts and refProfiles

higherCutoff_transNum

a named vector of transcript number cutoff under each cell type such that lower than the cutoff is required to keep query cell as it is when there is neighbor cell of consistent cell type; default = NULL to calculate from counts and refProfiles

imputeFlag_missingCTs

flag to impute score_baseline, lowerCutoff_transNum,higherCutoff_transNum for cell types present in refProfiles but missing in the provided transcript data files or the provided baseline and cutoffs; when TRUE, the median values of existing cell types would be used as the values for missing cell types.

groupTranscripts_method

use either "dbscan" or "delaunay method" to group transcripts in space (default = "dbscan")

spatialMergeCheck_method

use either "leidenCut" (in 2D or 3D) or "geometryDiff" (in 2D only) method to determine whether a cell pair merging event is allowed in space (default = "leidenCut")

cutoff_spatialMerge

spatial constraint on a valid merging event between two source transcript groups, default = 0.5 for 50% cutoff, set to 0 to skip spatial constraint evaluation for merging. For spatialMergeCheck_method = "leidenCut", this is the minimal percentage of transcripts shared membership between query cell and neighbor cells in leiden clustering results for a valid merging event. For spatialMergeCheck_method = "geometryDiff", this is the maximum percentage of white space change upon merging of query cell and neighbor cell for a valid merging event.

leiden_config

(leidenCut) a list of configuration to pass to reticulate and igraph::cluster_leiden function, including objective_function, resolution_parameter, beta, n_iterations.

config_spatNW_transcript

configuration list to create spatial network at transcript level, see manual for createSpatialDelaunayNW_from_spatLocs for more details, set to NULL to use default config (default = NULL)

path_to_output

the file path to output folder where the resegmentation data is saved; directory would be created by function if not exists; transcript data.frame updated_transDF is saved as individual csv files for each FOV, while cell data of all FOVs, updated_perCellDT and updated_perCellExprs, are combined to save as .rds object.

transDF_export_option

option on how to export updated transcript_df, 0 for no export, 1 for write to path_to_output in disk as csv for each FOV, 2 for return to function as list (default = 1)

save_intermediates

flag to save intermediate outputs into output folder, including data.frame for spatial modeling statistics of each cell,

return_perCellData

flag to return for gene x cell count matrix and per cell DF with updated mean spatial coordinates and new cell type, also export to output folder in disk when transDF_export_option = 1.

combine_extra

flag to combine original extracellular transcripts and trimmed transcripts back to the updated transcript data.frame, slow process if many transcript in each FOV file. (default = FALSE)

ctrl_genes

a vector of control genes that are present in input transcript data.frame but not in refProfiles and expect no cell type dependency, e.g. negative control probes; the ctrl_genes would be included in FastReseg analysis. (default = NULL)

seed_process

seed for per FOV processing, used in transcript error detection and correction steps, default = NULL to skip the seed

percentCores

percent of cores to use for parallel processing (0-1] (default = 0.75)

Value

a list

refProfiles

a genes X clusters matrix of cluster-specific reference profiles used in resegmenation pipeline

baselineData

a list of two matrice in cluster X percentile format for the cluster-specific percentile distribution of per cell value; span_score is for the average per molecule transcript tLLR score of each cell, span_transNum is for the transcript number of each cell.

cutoffs_list

a list of cutoffs used in resegmentation pipeline, including, score_baseline, lowerCutoff_transNum, higherCutoff_transNum, cellular_distance_cutoff, molecular_distance_cutoff

ctrl_genes

a vector of control genes whose transcript scores are set to fixed value for all cell types, return when ctrl_genes is not NULL.

updated_perCellDT

a per cell data.table with mean spatial coordinates, new cell type and resegmentation action after resegmentation, return when return_perCellData = TRUE

updated_perCellExprs

a gene x cell count sparse matrix for updated transcript data.frame after resegmentation, return when return_perCellData = TRUE

reseg_actions

a list of 4 elements describing how the resegmenation would be performed on original transcript_df by the group assignment of transcripts listed in groupDF_ToFlagTrans, output of decide_ReSegment_Operations function, return when save_intermediates = TRUE

updated_transDF_list

a list of per-FOV transcript data.frame with updated cell segmenation in updated_cellID and updated_celltype columns, return when transDF_export_option = 2

Details

The pipeline would first estimate mean profile for each cell cluster based on the provided cell x gene count matrix and cluster assignment for entire data set. And then, the pipeline would use the estimated cluster-specific profile as reference profiles and calculate suitable cutoff for distance search, transcript number and score in first provided per FOV transcript data frame when those cutoffs are not provided. When transcript data.frame is provided as multiple file paths in transDF_fileInfo data.frame, the pipeline would further perform resegmentation on individual transcript data.frame using the baseline and cutoff defined globally. For each transcript data.frame, the pipeline would score each transcript based on the provided cell type-specific reference profiles, evaluate the goodness-of-fit of each transcript within original cell segment, identify the low-score transcript groups within cells that has strong spatial dependency in transcript score profile, evaluate the neighborhood environment of low-score transcript groups and perform resegmentation actions including triming to extracellular space, merging to neighbor cell or labeling as new cell.

To account for genes missing in refProfiles but present in input transcript data.frame, genes in ctrl_genes would be assigned with goodness-of-fit score equal to svmClass_score_cutoff for all cell types to minimize the impact of those genes on the identification of low-score transcript groups via SVM. To avoid significant interference from those ctrl_genes, it's recommended to have total counts of those genes below 1% of total counts of all genes in each cell.

The pipeline would save the each per FOV output as individual file in path_to_output directory; updated_transDF would be saved as csv file. When save_intermediates = TRUE, all intermediate files and resegmenation outputs of each FOV would be saved as single .rds object which is a list containing the following elements:

modStats_ToFlagCells

a data.frame for spatial modeling statistics of each cell, output of score_cell_segmentation_error function, save when save_intermediates = TRUE

groupDF_ToFlagTrans

data.frame for the group assignment of transcripts within putative wrongly segmented cells, merged output of flag_bad_transcripts and groupTranscripts_Delaunay or groupTranscripts_dbscan functions, save when save_intermediates = TRUE

neighborhoodDF_ToReseg

a data.frame for neighborhood environment of low-score transcript groups, output of get_neighborhood_content function, save when save_intermediates = TRUE

reseg_actions

a list of 4 elements describing how the resegmenation would be performed on original transcript_df by the group assignment of transcripts listed in groupDF_ToFlagTrans, output of decide_ReSegment_Operations function, save when save_intermediates = TRUE

updated_transDF

the updated transcript_df with updated_cellID and updated_celltype column based on reseg_full_converter, write to disk when transDF_export_option =1

updated_perCellDT

a per cell data.table with mean spatial coordinates, new cell type and resegmentation action after resegmentation, return when return_perCellData = TRUE

updated_perCellExprs

a gene x cell count sparse matrix for updated transcript data.frame after resegmentation, return when return_perCellData = TRUE

The pipeline would also combine per cell data for all FOVs and return the combined data when return_perCellData = TRUE; updated_perCellDT and updated_perCellExprs would also be saved in a list as single .rds object in path_to_output directory when transDF_export_option = 1.

updated_perCellDT

a per cell data.table with mean spatial coordinates, new cell type and resegmentation action after resegmentation, return when return_perCellData = TRUE

updated_perCellExprs

a gene x cell count sparse matrix for updated transcript data.frame after resegmentation, return when return_perCellData = TRUE

Examples

# get example based on example dataset
data("mini_transcriptDF")
data("ori_RawExprs")
data("example_refProfiles")
data("example_baselineCT")
# cell_ID for extracellualr transcripts
extracellular_cellID <- mini_transcriptDF[which(mini_transcriptDF$CellId ==0), 'cell_ID'] 

# case #'1: provide `transcript_df` directly,
# do auto-calculation of distance cutoff from data while using the provided 
# cutoffs for score and transcript numbers.
res1 <- fastReseg_full_pipeline(counts = ori_RawExprs,
                                clust = NULL,
                                refProfiles = example_refProfiles,
                                pixel_size = 1,
                                zstep_size = 1,
                                transcript_df = mini_transcriptDF,
                                transID_coln = "UMI_transID",
                                transGene_coln = "target",
                                cellID_coln = "UMI_cellID",
                                spatLocs_colns = c("x","y","z"),
                                extracellular_cellID = extracellular_cellID,
                                molecular_distance_cutoff = NULL,
                                cellular_distance_cutoff = NULL,
                                score_baseline = example_baselineCT[['score_baseline']],
                                lowerCutoff_transNum = example_baselineCT[['lowerCutoff_transNum']],
                                higherCutoff_transNum= example_baselineCT[['higherCutoff_transNum']],
                                imputeFlag_missingCTs = TRUE,
                                path_to_output = "res1_directDF")
#> Per-FOV transcript data.frame with updated cell segmentation would be exported to disk at `path_to_output = 'res1_directDF'`.
#> The intermediate results and per cell data would be exported to output directory at `path_to_output`.
#> Found 960 common genes among `refProfiles` and `counts`. 
#> No common cell types/clusters found between `clust` and `refProfiles`.
#> Perform cluster assignment based on maximum transcript score given the provided `refProfiles`.
#> Extract distance cutoff from first input transcript data.
#> 3 Dimension of spaital coordinates are provided.
#> A single `transcript_df` is provided with unique `cellID_coln` = UMI_cellID and `transID_coln` = UMI_transID (use row idx if NULL).
#> Use 2 times of average 2D cell diameter as cellular_distance_cutoff = 24.2375 for searching of neighbor cells.
#> Identified 3D coordinates with variance. 
#> Distribution of minimal molecular distance between 1375 cells: 0, 0.08, 0.14, 0.21, 0.3, 0.4, 0.51, 0.63, 0.78, 0.86, 3.92, at quantile = 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%.
#> Use 5 times of 90% quantile of minimal 3D molecular distance between picked cells as `molecular_distance_cutoff` = 4.2790 for defining direct neighbor cells.
#> Use `molecular_distance_cutoff` = 4.2790 for defining direct neighbor cells based on molecule-to-molecule distance.
#> Use cellular_distance_cutoff = 24.2375 for searching of neighbor cells.
#> 
#> ##############
#> Processing file `1`: NA
#> 
#> 
#> ##------ Fri May 24 15:58:52 2024 ------##
#> 3 Dimension of spaital coordinates are provided.
#> Perform leiden clustering at resolution_parameter = 1.000.
#> Create Delanay network when config$method is NULL.
#> Name the spatial network based on method as `Delaunay_network` when config$name is NULL.
#> Use cellular_distance_cutoff = 24.2375 for searching of neighbor cells.
#> Use `molecular_distance_cutoff` = 4.2790 for defining direct neighbor cells based on molecule-to-molecule distance.
#> 960 unique genes are found in `transcript_df`.
#> 960 unique genes are shared by the provided `score_GeneMatrix` that contains cluster profiles of 960 genes for 22 clusters.
#> Found 756783 transcript records and 1375 cells in input `transcript_df`.
#> Use the providied `molecular_distance_cutoff` = 4.2790 for defining direct neighbor cells based on molecule-to-molecule distance.
#> Use the providied `cellular_distance_cutoff` = 24.2375 for searching of neighbor cells.
#> Found 960 common genes among transcript_df and score_GeneMatrix. 
#> Found 1375 cells and assigned cell type based on the provided `refProfiles` cluster profiles.
#> Run linear regreassion in 3 Dimension.
#> Warning: Below model_cutoff = 50, skip 37 cells with fewer transcripts. Move forward with remaining 1338 cells.
#> 373 cells, 0.2788 of all evaluated cells, are flagged for resegmentation with lrtest_nlog10P > 5.0.
#> Run SVM in 3 Dimension.
#> Found 373 common cells and 960 common genes among chosen_cells, transcript_df, and score_GeneMatrix. 
#> Warning: Below model_cutoff = 50, skip 0 cells with fewer transcripts. Move forward with remaining 373 cells.
#> Warning: Skip 0 cells with all transcripts in same class given `score_cutoff = -2`. Move forward with remaining 373 cells.
#> Remove 0 cells with raw transcript score all in same class based on cutoff -2.00 when running spatial SVM model.
#> Do spatial network analysis in 3 Dimension.
#> 10652 chosen_transcripts are found in common cells.
#> SVM spatial model further identified 17 cells with transcript score all in same class, exclude from transcript group analysis.
#> Found 960 common genes among transcript_df and score_GeneMatrix. 
#> Perform leiden clustering at resolution_parameter = 1.000.
#> Use neighbor_distance_xy = 24.2375 for searching of neighbor cells.
#> Use distance_cutoff = 4.2790 for defining direct neighbor cells based on molecule-to-molecule distance.
#> Use first 2D for searching cell neighborhood, but all 3 Dimension to identify direct neighbors based on molecular distance.
#> Found 1998 common cells and 960 common genes among transcript_df, cell_networkDT, and score_GeneMatrix. 
#> 623 chosen_cells are found in common cells.
#> Use `leidenCut` method to evaluate putative merging event in space. 
#> Perform leiden clustering at resolution_parameter = 1.000.
#> A valid merging event must have query cell with 0.500 transcript shared same membership as neighbor cell of consistent cell type. 
#> Run delanuay network in 3 Dimension.
#> Perform ledien clustering on 28 potential merging events. 
#> (`c_1_2_1731_g2`, `c_1_2_1792_g5`) cell pair with all 5 transcripts in same z plane, run 2D network analysis.
#> (`c_1_2_1792_g5`, `c_1_2_1731_g2`) cell pair with all 5 transcripts in same z plane, run 2D network analysis.
#> Found 623 common cells and 960 common genes among `names(reseg_full_converter)`, `transcript_df`, and `score_GeneMatrix`. 
#> 
#> 
#> Trim 5626 transcripts during resegmentation, 0.0074 of all intracellular molecules.
#> Warning: object 'transcript_df' not found

# case #'2: provide file paths to per FOV transcript data files and specify 
# the spatial offset for each FOV,
# do auto-calculation of score and transcript number cutoffs from gene 
# expression matrix, `counts`, and cluster assignment of each cell, `clust`,
# do auto-calculation of distance cutoff from the 1st per FOV transcript data.
data("example_CellGeneExpr")
data("example_clust")

# the example individual transcript files are stored under `data` directory of this package
# update your path accordingly
# Notice that some assays like SMI has XY axes swapped between stage and each FOV;
# coordinates for each FOV should have units in micron
dataDir <- system.file("extdata", package = "FastReseg")
fileInfo_DF <- data.frame(
  file_path = fs::path(dataDir,  
                       c("Run4104_FOV001__complete_code_cell_target_call_coord.csv",
                         "Run4104_FOV002__complete_code_cell_target_call_coord.csv")),
  slide = c(1, 1),
  fov = c(1,2),
  stage_X = 1000*c(5.13, -2.701),
  stage_Y = 1000*c(-0.452, 0.081))

res2 <- fastReseg_full_pipeline(counts = example_CellGeneExpr,
                                clust = example_clust,
                                refProfiles = NULL,
                                transDF_fileInfo =fileInfo_DF,
                                filepath_coln = 'file_path',
                                prefix_colns = c('slide','fov'),
                                
                                # match XY axes between stage and each FOV
                                fovOffset_colns = c('stage_Y','stage_X'), 
                                # 0.18 micron per pixel in transcript data
                                pixel_size = 0.18, 
                                # 0.8 micron per z step in transcript data
                                zstep_size = 0.8, 
                                
                                transcript_df = NULL,
                                
                                # row index as transcript_id
                                transID_coln = NULL, 
                                
                                transGene_coln = "target",
                                cellID_coln = "CellId",
                                spatLocs_colns = c("x","y","z"),
                                
                                # CellId = 0 means extracelluar transcripts in raw data
                                extracellular_cellID = c(0), 
                                
                                molecular_distance_cutoff = NULL,
                                cellular_distance_cutoff = NULL,
                                score_baseline = NULL,
                                lowerCutoff_transNum = NULL,
                                higherCutoff_transNum= NULL,
                                imputeFlag_missingCTs = TRUE,
                                path_to_output = "res2_multiFiles")
#> Per-FOV transcript data.frame with updated cell segmentation would be exported to disk at `path_to_output = 'res2_multiFiles'`.
#> The intermediate results and per cell data would be exported to output directory at `path_to_output`.
#> Found 960 common genes among `refProfiles` and `counts`. 
#> Extract distance cutoff from first input transcript data.
#> 3 Dimension of spaital coordinates are provided.
#> 2 individual per FOV files are provided in `transDF_fileInfo`, use the 1st file to calculate distance cutoffs
#> `transID_coln` and `cellID_coln` of each per FOV transcript_df would be re-named based on `prefix_colns` = `slide`,`fov`.
#> Use 2 times of average 2D cell diameter as cellular_distance_cutoff = 19.1980 for searching of neighbor cells.
#> Identified 3D coordinates with variance. 
#> Distribution of minimal molecular distance between 385 cells: 0, 0.16, 0.22, 0.29, 0.36, 0.44, 0.52, 0.63, 0.76, 0.84, 8.01, at quantile = 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%.
#> Use 5 times of 90% quantile of minimal 3D molecular distance between picked cells as `molecular_distance_cutoff` = 4.2191 for defining direct neighbor cells.
#> Use `molecular_distance_cutoff` = 4.2191 for defining direct neighbor cells based on molecule-to-molecule distance.
#> Use cellular_distance_cutoff = 19.1980 for searching of neighbor cells.

# case #'3: provide file paths to per FOV transcript data files and specify 
# the spatial offset for each FOV,
# do auto-calculation of score and transcript number cutoffs from gene 
# expression matrix, `counts`, and cluster-specific reference profiles, `refProfiles`,
# use the provided distance cutoff for `molecular_distance_cutoff` but 
# calculate the `cellular_distance_cutoff`
res3 <- fastReseg_full_pipeline(counts = example_CellGeneExpr,
                                clust = NULL,
                                refProfiles = example_refProfiles,
                                transDF_fileInfo =fileInfo_DF,
                                filepath_coln = 'file_path',
                                prefix_colns = c('slide','fov'),
                                fovOffset_colns = c('stage_Y','stage_X'), 
                                pixel_size = 0.18, 
                                zstep_size = 0.8, 
                                transcript_df = NULL,
                                transID_coln = NULL, 
                                transGene_coln = "target",
                                cellID_coln = "CellId",
                                spatLocs_colns = c("x","y","z"),
                                extracellular_cellID = c(0), 
                                molecular_distance_cutoff = 2.7,
                                cellular_distance_cutoff = NULL,
                                score_baseline = NULL,
                                lowerCutoff_transNum = NULL,
                                higherCutoff_transNum= NULL,
                                imputeFlag_missingCTs = TRUE,
                                path_to_output = "res3_multiFiles")
#> Per-FOV transcript data.frame with updated cell segmentation would be exported to disk at `path_to_output = 'res3_multiFiles'`.
#> The intermediate results and per cell data would be exported to output directory at `path_to_output`.
#> Found 960 common genes among `refProfiles` and `counts`. 
#> No common cell types/clusters found between `clust` and `refProfiles`.
#> Perform cluster assignment based on maximum transcript score given the provided `refProfiles`.
#> Extract distance cutoff from first input transcript data.
#> 3 Dimension of spaital coordinates are provided.
#> 2 individual per FOV files are provided in `transDF_fileInfo`, use the 1st file to calculate distance cutoffs
#> `transID_coln` and `cellID_coln` of each per FOV transcript_df would be re-named based on `prefix_colns` = `slide`,`fov`.
#> Use 2 times of average 2D cell diameter as cellular_distance_cutoff = 19.1980 for searching of neighbor cells.
#> Use `cellular_distance_cutoff` = 19.1980 for searching of neighbor cells.