tl module

tl module#

Helpful tools

PIC_BGdoubletsOEratios

Generate distribution of O/E ratios for colocalization probabilities of cell type pairs in randomly generated doublets (background dist) for tests in PIC-seq data

PIC_BGdoubletsOEratios_parallel

Generate one set of O/E ratios for cell type pair co-localization probabilities from randomly paired single cells.

assign_properties

Assign properties to network g to visualize with gravis interactive networks

cellCatContained

Generate boolean element indicating whether the specified element (cell pair) is contained in a list (category)

cells_niche_colors

Make dataframe of cell types with their corresponding niches and colors

compute_network_stats

Compute standard centrality statistics for a (signed) NetworkX graph.

downsample_class

Reduce the number of elements belonging to target_class by a given factor.

getColocFilter

Get filtering object indicating which cell pairs are differentially co-localized

getExpectedColocProbsFromSCs

Compute the expected co-localization probability of each cell type pair by multiplying cell type proportions derived from single-cell (singlets) data.

get_PIC_BG_OEratios_DF

Generate nreps sets of O/E ratios for cell type pair co-localization probabilities by running PIC_BGdoubletsOEratios_parallel() in parallel.

get_pairCatDFdir

Get dataframe of cell pair to niche pair correspondence

get_spatial_radius_BG_OEratios_DF

Optimized version of get_spatial_radius_BG_OEratios_DF using sparse matrix multiplication.

get_spot_ct_props

Get cell type proportions per spot by summing the probabilities of cells of the same kind in each spot

plot_top_stats

Bar plots of the top nodes by betweenness, PageRank, and signed degree centrality.

processCTKRoutput

Remove suffixes '|L' , '|R' and '|TF' from cell - cell communication (CrossTalkeR) tables

pval_filtered_HMdf

Get dataframe for scores heatmap from dataframe obtained from diffColoc_test()

unique

get unique elements in array without re-sorting