Skip to contents

Main workflows

prepare_input_files()
Build RaCInG input files from raw count data
compute_racing_kernel()
Run the full kernel-based RaCInG workflow
compute_racing_montecarlo()
Run the full Monte Carlo RaCInG workflow

Kernel and Monte Carlo methods

compute_kernel()
Compute the RaCInG kernel for one or more patients
compute_kernel_features()
Derive communication features from a kernel
calculateDirect()
Calculate direct communication features from a kernel
calculateWedges()
Calculate wedge features from a kernel
computeTriangles()
Compute triangle features from kernel matrices
computeGSCC()
Compute GSCC features from kernel matrices
countWedges()
Count wedges across Monte Carlo graph simulations
countTrustTriangles()
Count trust triangles across Monte Carlo graph simulations
countCycleTriangles()
Count cycle triangles across Monte Carlo graph simulations
countDirect()
Count direct edges across Monte Carlo graph simulations
countGSCC()
Count GSCC contributions across Monte Carlo graph simulations
countAllTypes()
Extract multiple communication feature types from the same simulated graphs
model1()
Generate a single RaCInG graph realization
runSim()
Run Monte Carlo simulations for one or more patients
getGSCCAnalytically()
Legacy GSCC helper

Ligand-receptor contribution analysis

computeLRContributions()
Decompose a Direct communication score into per-ligand-receptor-pair contributions
computeWedgeLRContributions()
Decompose a Wedge's two hub paths into per-edge ligand-receptor contributions
computeTriangleLRContributions()
Decompose a Triangle's edges into per-edge ligand-receptor contributions
plotLRContributions()
Dot plot of top ligand-receptor pair contributions (LIANA-style)

Input generation

createCellLigList()
Read a cell-to-ligand compatibility matrix
createCellRecList()
Read a cell-to-receptor compatibility matrix
createCellTypeDistr()
Read and normalize cell-type abundance estimates
createInteractionDistr()
Read ligand-receptor interaction probabilities
Read_Lig_Rec_Interaction()
Read a ligand-receptor sign matrix
genRandomCellTypeList()
Sample cell-type labels for graph vertices

Graph utilities

EdgetoAdj()
Convert an edge list to a sparse adjacency matrix
EdgetoAdj_No_loop()
Convert an edge list to a sparse adjacency matrix without self-loops
Count_Types()
Count graph motifs by cell-type combination
Trust_Triangles()
Enumerate outward trust triangles
Cycle_Triangles()
Enumerate directed cycle triangles
Wedges()
Enumerate wedges in a directed graph
GSCC()
Extract the giant strongly connected component

Example data

skcm_example
SKCM melanoma example input for RaCInG

Statistics and I/O

wilcox_group_test()
Run Wilcoxon tests across network features
top_features_plot()
Ranked bar plot of top up/down features from Wilcoxon results
correlate_features_with_score()
Correlate network features with an external score
correlation_plot()
Rainfall plot of feature-score correlations
Read_Sim_Output()
Read a RaCInG simulation output file
compute_results_processing()
Convert raw simulation outputs into feature matrices