Skip to contents

Pipeline wrapper

Wrapper function to process multi-FOV dataset or per-FOV data

fastReseg_flag_all_errors()
fastReseg_flag_all_errors
fastReseg_full_pipeline()
fastReseg_full_pipeline
fastReseg_perFOV_full_process()
fastReseg_perFOV_full_process

Preprocessing

Functions to prepare input data and get baseline

runPreprocess()
runPreprocess
get_baselineCT()
get_baselineCT
choose_distance_cutoff()
choose_distance_cutoff
estimate_MeanProfile()
estimate_MeanProfile
scoreGenesInRef()
scoreGenesInRef
getCellType_maxScore()
getCellType_maxScore
getScoreCellType_gene()
getScoreCellType_gene

Example data

Example data to use with tutorial

example_CellGeneExpr
per cell gene expression matrix based on raw transcript data files generated by SMI
example_baselineCT
Percentile profile for single cell distribution of transcript number and average tLLR score from example dataset for spatial transcriptional profiling of tissue
example_clust
Cluster assignment for cells based on per cell gene expression profile and reference profiles in example data set
example_refProfiles
Data for cell type specific reference profiles
mini_transcriptDF
Transcript level data frame from Example dataset for spatial transcriptional profiling of tissue
ori_CellStatsDF
Cell level data frame from Example dataset for spatial transcriptional profiling of tissue
ori_RawExprs
Cell x Gene expression matrix from Example dataset for spatial transcriptional profiling of tissue

Modular functions of pipeline

Functions to perform individual tasks for each FOV

runPreprocess()
runPreprocess
runSegErrorEvaluation()
runSegErrorEvaluation
runTranscriptErrorDetection()
runTranscriptErrorDetection
runSegRefinement()
runSegRefinement

Flag poor fitted cells

Functions to detect cell segmentation errors

runSegErrorEvaluation()
runSegErrorEvaluation
score_cell_segmentation_error()
score_cell_segmentation_error

Flag poor fitted transcripts

Functions to identify wrongly segmented transcript groups

runTranscriptErrorDetection()
runTranscriptErrorDetection
flag_bad_transcripts()
flag_bad_transcripts
groupTranscripts_dbscan()
groupTranscripts_dbscan
groupTranscripts_Delaunay()
groupTranscripts_Delaunay
createSpatialDelaunayNW_from_spatLocs()
createSpatialDelaunayNW_from_spatLocs
flagTranscripts_LDA_hyperplane()
flagTranscripts_LDA_hyperplane

Segmentation refinement

Functions to evaluate neighborhood of flagged transcript groups and perform refinement

runSegRefinement()
runSegRefinement
prepResegDF()
prepResegDF
get_neighborhood_content()
get_neighborhood_content
getNeighbors_transDF()
getNeighbors_transDF
decide_ReSegment_Operations()
decide_ReSegment_Operations
update_transDF_ResegActions()
update_transDF_ResegActions
transDF_to_perCell_data()
transDF_to_perCell_data

Visualization

Auxillary function to visualize spatial pattern of transcript-level information of multiple cells

plotSpatialScoreMultiCells()
plotSpatialScoreMultiCells

Ultilties

Auxillary function to set parallel processing and digesting input files

numCores()
Get number of cores for parallelized operations
checkTransFileInputsAndLoadFirst()
checkTransFileInputsAndLoadFirst
prepare_perFOV_transDF()
prepare_perFOV_transDF
myFun_fov_load()
myFun_fov_load

Miscellaneous

Supporting functions of various purposes

check_config_leiden()
check_config_leiden
check_config_spatialNW()
check_config_spatialNW
checkAndPrepInputs_perFOV()
checkAndPrepInputs_perFOV
checkTypeLengthValue()
checkTypeLengthValue
compartment_and_add_extra()
compartment_and_add_extra
initializeAllSegRes()
initializeAllSegRes
makeDummyOuts_perFOV()
makeDummyOuts_perFOV
myFun_3point_singleCell()
myFun_3point_singleCell