Functions

Index

Co-occurrence Analysis

ISCHIA.calculate_cooccurrence_statsFunction

Calculate co-occurrence statistics and probabilities.

Arguments

  • mat::Matrix{Int}: A binary species by site matrix.
  • specie_names::Vector{String}: Names of species.
  • type::String: Type of matrix ('sppsite' or 'sitespp').
  • thresh::Bool: Whether to apply a threshold.
  • spp_names::Bool: Whether to include species names.
  • true_rand_classifier::Float64: True random classifier.
  • prob::String: Probability calculation method ('hyper' or 'comb').
  • site_mask::Union{Nothing, Matrix{Int}}: Matrix specifying sites.
  • only_effects::Bool: Whether to calculate only effects.
  • eff_standard::Bool: Whether to standardize effects.
  • eff_matrix::Bool: Whether to calculate effect matrix.

Returns

A dictionary containing various co-occurrence statistics and results.

source
ISCHIA.summarize_cooccurFunction

Summarize the results of a co-occurrence analysis.

Arguments

  • cooccur_output::CooccurOutput: Co-occurrence analysis object.

Returns

A summary of the co-occurrence analysis results as a dictionary.

source

LR-Enrichment Analysis

ISCHIA.find_enriched_LR_pairsFunction

Calculate significant co-occurring Ligand-Receptor pairs.

This function calculates co-occurring Ligand-Receptor (LR) pairs that are statistically significant based on expression levels and correlations in a spatial dataset.

Parameters:

  • adata::AnnData: The (spatial) anndata dataset containing expression data.
  • COI::Vector{String}: Cluster of Interest, a subset of spots to focus on.
  • Condition::Vector{String}: Condition of interest within the dataset.
  • LR_list::Vector{String}: List of ligands and receptors to consider.
  • LR_pairs::Vector{String}: List of LR pairs to analyze.
  • exp_th::Real: Expression threshold for binarizing the expression matrix.
  • corr_th::Real: Correlation threshold for LR pairs.

Returns: A dictionary containing:

  • "enriched_LRs": DataFrame of enriched LR pairs.
  • "cooccurrence_table": Co-occurrence analysis results.
source
ISCHIA.find_differentially_cooccurring_LR_pairsFunction

Find LR (Ligand Receptor) pairs that are significantly co-occurring in one group and not in the other group.

Arguments

  • cooc_df_1::DataFrame: Results from the EnrichedLRs function for Group 1.
  • cooc_df_2::DataFrame: Results from the EnrichedLRs function for Group 2.
  • group1_max_pval::Real: Maximum p-value threshold for significance levels of co-occurring LR pairs in Group 1.
  • group2_min_pval::Real: Minimum p-value threshold for non-significance levels of co-occurring LR pairs in Group 2.

Returns

List of LR pairs enriched in Group 1 and not in Group 2.

source

Find LR (Ligand Receptor) pairs that are significantly co-occurring in one group and not in the other group.

Arguments

  • group1_results::Dict{String, Any}: Results from the EnrichedLRs function for Group 1.
  • group2_results::Dict{String, Any}: Results from the EnrichedLRs function for Group 2.
  • group1_max_pval::Real: Maximum p-value threshold for significance levels of co-occurring LR pairs in Group 1.
  • group2_min_pval::Real: Minimum p-value threshold for non-significance levels of co-occurring LR pairs in Group 2.

Returns

List of LR pairs enriched in Group 1 and not in Group 2.

source