Functions
Index
ISCHIA.calculate_cooccurrence_statsISCHIA.find_differentially_cooccurring_LR_pairsISCHIA.find_enriched_LR_pairsISCHIA.summarize_cooccur
Co-occurrence Analysis
ISCHIA.calculate_cooccurrence_stats — FunctionCalculate 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.
ISCHIA.summarize_cooccur — FunctionSummarize 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.
LR-Enrichment Analysis
ISCHIA.find_enriched_LR_pairs — FunctionCalculate 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.
ISCHIA.find_differentially_cooccurring_LR_pairs — FunctionFind 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.
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.