From 240fea2992cc8abe0f3ac7c405d85441f32bfe80 Mon Sep 17 00:00:00 2001 From: Aadam Date: Thu, 8 Aug 2024 10:03:42 -0400 Subject: [PATCH] feat: Refactor co-occurrence analysis functions --- src/cooccur.jl | 9 --------- src/lr_enrichment.jl | 10 ---------- src/utils.jl | 10 ---------- 3 files changed, 29 deletions(-) diff --git a/src/cooccur.jl b/src/cooccur.jl index b77d71a..356b098 100644 --- a/src/cooccur.jl +++ b/src/cooccur.jl @@ -50,15 +50,6 @@ This function creates a species by species matrix of potential co-occurring site # Returns A species by species matrix where the upper triangle contains N for each species pair. - -# Examples -```julia -# Define a binary species by site matrix -# species_matrix = rand(Bool, num_species, num_sites) - -# Calculate the co-occurrence matrix N -# cooccurrence_matrix = create_N_matrix(species_matrix) -``` """ function calculate_cooccurrence_matrix(mat::Matrix{Int}) num_species = size(mat, 1) diff --git a/src/lr_enrichment.jl b/src/lr_enrichment.jl index 475cb36..08b7e2b 100644 --- a/src/lr_enrichment.jl +++ b/src/lr_enrichment.jl @@ -122,11 +122,6 @@ Find LR (Ligand Receptor) pairs that are significantly co-occurring in one group # Returns List of LR pairs enriched in Group 1 and not in Group 2. - -# Example -```julia -result = find_differentially_cooccurring_LR_pairs(cooc_df_1, cooc_df_2, 0.05, 0.1) -``` """ function find_differentially_cooccurring_LR_pairs( cooc_df_1::DataFrame, @@ -177,11 +172,6 @@ Find LR (Ligand Receptor) pairs that are significantly co-occurring in one group # Returns List of LR pairs enriched in Group 1 and not in Group 2. - -# Example -```julia -result = find_differentially_cooccurring_LR_pairs(group1_results, group2_results, 0.05, 0.1) -``` """ function find_differentially_cooccurring_LR_pairs( group1_results::Dict{String, Any}, diff --git a/src/utils.jl b/src/utils.jl index c35ac85..ee49f47 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -9,11 +9,6 @@ Calculate effect sizes for co-occurrence analysis results. # Returns Effect sizes as a data frame. - -# Example -```julia -effect_sizes(cooccur_object) -``` """ function effect_sizes(cooccur; standardized=true) cooccur_results = cooccur[:results] @@ -62,11 +57,6 @@ Summarize the results of a co-occurrence analysis. # Returns A summary of the co-occurrence analysis results as a dictionary. - -# Example -```julia -summary = summarize_cooccur(cooccur_object) -``` """ function summarize_cooccur(cooccur::CooccurOutput) # Print basic analysis information