Identifies cell-to-cell Interaction Changed Genes (ICG) for spots, i.e. genes expression residual that are differentially due to proximity to other cell types.

findICGSpot(
  gobject,
  expression_values = c("normalized", "scaled", "custom"),
  ave_celltype_exp,
  selected_genes = NULL,
  spatial_network_name = "Delaunay_network",
  minimum_unique_cells = 5,
  minimum_unique_int_cells = 5,
  CCI_cell_score = 0.1,
  dwls_cutoff = 0.001,
  diff_test = "permutation",
  nr_permutations = 100,
  adjust_method = "fdr",
  do_parallel = TRUE,
  cores = 2,
  set_seed = TRUE,
  seed_number = 1234
)

Arguments

gobject

giotto object

expression_values

expression values to use

ave_celltype_exp

averege gene expression in each cell type

selected_genes

subset of selected genes (optional)

spatial_network_name

name of spatial network to use

minimum_unique_cells

minimum number of target cells required

minimum_unique_int_cells

minimum number of interacting cells required

CCI_cell_score

cell proximity score to filter no interacted cell

dwls_cutoff

cell type proportion cutoff to label the cell

diff_test

which differential expression test

nr_permutations

number of permutations if diff_test = permutation

adjust_method

which method to adjust p-values

do_parallel

run calculations in parallel with mclapply

cores

number of cores to use if do_parallel = TRUE

set_seed

set a seed for reproducibility

seed_number

seed number

Value

cpgObject that contains the differential gene scores

Details

Function to calculate if genes expreesion residual are differentially expressed in cell types when they interact (approximated by physical proximity) with other cell types. Gene expression residual calculated as: (observed expression in spot - cell_type_proportion * average_expressed_in_cell_type) The results data.table in the cpgObject contains - at least - the following columns:

  • genes: All or selected list of tested genes

  • sel: average gene expression residual in the interacting cells from the target cell type

  • other: average gene expression residual in the NOT-interacting cells from the target cell type

  • pcc_sel: correlation between cell proximity score and expression residual in the interacting cells from the target cell type

  • pcc_other: correlation between cell proximity score and expression residual in the NOT-interacting cells from the target cell type

  • pcc_diff: correlation difference between sel and other

  • p.value: associated p-value

  • p.adj: adjusted p-value

  • cell_type: target cell type

  • int_cell_type: interacting cell type

  • nr_select: number of cells for selected target cell type

  • int_nr_select: number of cells for interacting cell type

  • unif_int: cell-cell interaction