Skip to content

Commit

Permalink
refactor: documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aadimator committed Aug 8, 2024
1 parent 69d2ec2 commit 7c0d399
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 11 deletions.
12 changes: 5 additions & 7 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ CurrentModule = ISCHIA

# ISCHIA

Documentation for [ISCHIA](https://github.com/aadimator/ISCHIA.jl).
This package is a reimplementation of the ISCHIA LR interaction algorithm in Julia. The original implementation is in R and can be found [here](https://github.com/ati-lz/ISCHIA). The algorithm is described in the paper [Identifying Spatial Co-occurrence in Healthy and InflAmed tissues (ISCHIA)](https://www.embopress.org/doi/full/10.1038/s44320-023-00006-5).

In the original implementation, the LR interaction part of the algorithm is very slow and can take days to run on large datasets. This package aims to speed up the LR interaction part of the algorithm by using Julia's speed and parallelism. For comparison, the original implementation took almost 3 hours to run on their toy/smaller dataset, while the same dataset took around 6 seconds to run on this package.

Once the LR interactions are calculated, the rest of the plotting and analysis can be done in R using the original package.

```@contents
Pages = ["man/basics.md",
"man/getting_started.md"]
Depth = 2
```

## Index

```@index
Pages = ["library/types.md", "library/functions.md"]
```
24 changes: 21 additions & 3 deletions docs/src/library/functions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
```@meta
CurrentModule = ISCHIA
```

# Functions

## Index

```@index
Pages = ["functions.md"]
```

```@autodocs
Modules = [ISCHIA]
Filter = t -> typeof(t) !== CooccurOutput
## Co-occurrence Analysis

```@docs
calculate_cooccurrence_stats
summarize_cooccur
```

## LR-Enrichment Analysis

```@docs
find_enriched_LR_pairs
find_differentially_cooccurring_LR_pairs
```
12 changes: 12 additions & 0 deletions docs/src/library/internals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```@meta
CurrentModule = ISCHIA
```

# Utility Functions

These functions are for internal use. They can be accessed by appending the package name and a dot before the function name, e.g. `ISCHIA.calculate_cooccurrence_matrix`. Keep in mind that these functions can change their signature without warnings.

```@docs
ISCHIA.calculate_cooccurrence_matrix
ISCHIA.effect_sizes
```
6 changes: 6 additions & 0 deletions docs/src/library/types.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
```@meta
CurrentModule = ISCHIA
```

# Types

```@index
Pages = ["types.md"]
```
Expand Down
2 changes: 1 addition & 1 deletion src/cooccur.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ A species by species matrix where the upper triangle contains N for each species
# 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)
Expand Down
2 changes: 2 additions & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Effect sizes as a data frame.
# Example
```julia
effect_sizes(cooccur_object)
```
"""
function effect_sizes(cooccur; standardized=true)
cooccur_results = cooccur[:results]
Expand Down Expand Up @@ -65,6 +66,7 @@ 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
Expand Down

0 comments on commit 7c0d399

Please sign in to comment.