Skip to contents

Object Creation

Create CoPro objects from spatial transcriptomics data

newCoProSingle()
Function to create a new object
newCoProMulti()
Create a new CoProMulti object for Multi-Slide Analysis
CreateCoPro()
Create a CoPro object, automatically choosing Single vs Multi and splitting large slices.
CoPro-class
CoPro object of spatial transcriptomics data
subsetData()
subsetData
show(<CoPro>)
Show method for CoPro objects

Core Pipeline

The main CoPro analysis workflow

computePCA()
Compute PCA on Integrated Multi-Slide Data
computePCA(<CoProSingle>) computePCA(<CoProMulti>)
Compute PCA on Single-Slide Data
computeDistance()
computeDistance between pairs of cell types
computeKernelMatrix()
Compute Kernel Matrix for CoPro
runSkrCCA()
runSkrCCA
computeNormalizedCorrelation()
Compute Normalized Correlation (approximation)
computeGeneAndCellScores()
computeGeneAndCellScores
computeRegressionGeneScores()
Compute regression-based gene scores

Results Access

Retrieve analysis results

getCellScores()
Get cell scores from CoPro object
getCellScoresInSitu()
Get cell score and location information as a data.frame
getNormCorr()
Get normalized correlation vs Sigma squared values
getCorrOneType()
Retrieve the Correlation within one cell types
getCorrTwoTypes()
Retrieve the Correlation between two cell types
getDistMat()
Get Distance Matrix
getSelfDistMat()
Get Self-Distance Matrix
getKernelMatrix()
Get Kernel Matrix
getSelfKernelMatrix()
Get Self-Kernel Matrix
getColocScores()
Compute Colocalization Scores for All Cell Type Pairs
getSlideID()
Get slide IDs from CoPro object
getSlideList()
Get slide list from CoPro object
isMultiSlide()
Check if object is multi-slide

Score Transfer

Transfer learned patterns to new slides or datasets

getTransferCellScores()
Get cell score by transferring gene weights from another slide By default, quantile normalization is used to ensure distribution match
getTransferNormCorr()
Compute Normalized Correlation from Transferred Cell Scores
getTransferBidirCorr()
Compute Bidirectional Correlation from Transferred Cell Scores
getTransferSelfBidirCorr()
Compute Self-Bidirectional Correlation from Transferred Cell Scores
quantile_normalize()
quantile normalize data
transfer_scores()
Transfer cell scores between matrices using gene weights

Within-Cell-Type Analysis

Self-correlation and single cell type spatial patterns

computeSelfDistance()
Compute Self-Distance Matrices for Multiple Cell Types
computeSelfKernel()
Compute Self-Kernel Matrices for Multiple Cell Types
computeSelfBidirCorr()
Compute Self-Bidirectional Correlation using skrCCA Results
computeBidirCorrelation()
Compute Bidirectional Correlation
ensureBidirCorrelationSlot()
Ensure object has bidirCorrelation slot

Gene-Level Analysis

Gene scoring, testing, and regression

testGeneGLM()
testGeneGLM
smoothCellScoresMatrix()
Smooth the cell scores based on expression neighborhood

Permutation Testing

Statistical significance via spatial permutations

runSkrCCAPermu()
Run Spatial CCA with Permutation Testing
runSkrCCAPermu_FairSigma()
Run Permutation Test with Fair Sigma Selection
computeNormalizedCorrelationPermu()
Compute Normalized Correlation for Permutation Results
resample_spatial()
Spatial Resampling for Permutation Testing
generate_toroidal_permutations()
Generate Toroidal Shift Permutation Indices
compute_ground_truth_ncorr()
Compute Normalized Correlation from Ground Truth Scores
calculate_pvalue()
Calculate P-value from Permutation Results

Visualization

Plotting functions

plotG12Functions()
Plot g_12(r) pair correlation functions for colocalization analysis
diagnose_bin_distribution()
Diagnose Bin Distribution

Utilities

Helper and optimization functions

copro_download_data()
Download example datasets for CoPro vignettes
assignDistanceManually()
Assign distance matrix manually
optimize_bilinear()
SkrCCA optimization function for multiple groups (Single Slide) - First Component Uses flat kernel structure for consistent data access
optimize_bilinear_multi_slides()
Multi-slide SkrCCA optimization - First Component
optimize_bilinear_n()
Run multi version of skrCCA to detect subsequent components (Single Slide) Uses flat kernel structure for consistent data access
optimize_bilinear_n_multi_slides()
Multi-slide SkrCCA optimization - Multiple Components