Skip to content

Commit

Permalink
Update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bencardoen committed Oct 30, 2024
1 parent d44c86c commit c9bb6c3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion docs/src/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ You can then optimize the detection's [parameters](https://bencardoen.github.io/
If you know what biological interaction you wish to observe and under what modality, you can simulate this and test if the detection can detect the simulated interaction, and to what extent.

### Stability
Stability of a function ``f`` is defined as ``f(x + \epsilon) - f(x) \leq \delta`` for ``\epsilon, \delta \geq 0, s = \vert \epsilon -\delta \vert`. If s is small for all values, then you have a stable function.
Stability of a function ``f`` is defined as
``\vert f(x + \epsilon) - f(x) \vert \leq \delta`` for ``\epsilon, \delta \geq 0, s = \vert \epsilon -\delta \vert``.

If ``s`` is small for all values, then you have a stable function.
For example, stability can be with respect to parameters or noise.
Stability matters for validation because you do not want to publish results that only exist for ``\alpha=0.003`` and w=2, and no other values.
Ideally on representative (median) cells, you do a parameter sweep to show a consistent difference or a consistent recall/precision with respect to ground truth.

!!! note "Stability"
We made the simplification of using addition here, that is rarely true, but the principle holds. In addition, you do not want the stability to be small, but predictable. For example, as ``\epsilon`` increases, how does ``\delta`` increase? If there is a limiting function (linear, quadratic, ...), then that too is consistent. If this random, that is the true worst case.

### Phantoms
You can test the detection on phantoms, e.g. physical or biological induced changes (e.g. SPLICS), where you alter the biology in such a way that forces organelles or proteins to interact.

Expand Down
4 changes: 2 additions & 2 deletions runjulia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# Copyright 2021-2022, Ben Cardoen

export LOCALPKG=/opt/SubPrecisionContactDetection.jl
export JLMJV=1.10
export JLV=$JLMJV.5
export JLMJV=1.9
export JLV=$JLMJV.4
export PATH=/opt/julia/julia-$JLV/bin:$PATH
export JULIA_DEPOT_PATH=/opt/juliadepot

Expand Down
10 changes: 5 additions & 5 deletions singularity_recipes/recipe.def
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ From: fedora:38
echo $PYTHON

## Setup Julia
export JLMJV=1.10
export JLV=$JLMJV.5
export JLMJV=1.9
export JLV=$JLMJV.4
export JULIA_TGZ=julia-$JLV-linux-x86_64.tar.gz
mkdir -p /opt/julia && cd /opt/julia
wget https://julialang-s3.julialang.org/bin/linux/x64/$JLMJV/$JULIA_TGZ && tar -xf $JULIA_TGZ && rm $JULIA_TGZ
Expand All @@ -40,7 +40,7 @@ From: fedora:38
echo "Creating test data"
julia --project=$LOCALPKG scripts/setupdata.jl
echo "Profiling API"
julia --project=$LOCALPKG --trace-compile=dc_precompile2.jl scripts/ercontacts.jl --inpath /tmp/testdata -r "*[1,2].tif" -w 2 --sigmas 2.5-2.5-1.5 --outpath /tmp --nooutput --alpha 0.01 --beta 0.01 -c 1 -v 2000 --dimension 3 --mode=decon
julia --project=$LOCALPKG --trace-compile=dc_precompile2.jl scripts/batch.jl --inpath /tmp/testdata -r "*[1,2].tif" -w 2 --sigmas 2.5-2.5-1.5 --outpath /tmp --nooutput --alpha 0.01 --beta 0.01 -c 1 -v 2000 --dimension 3 --mode=decon
cat dc_precompile2.jl >> dc_precompile.jl
#echo "Building precompiled image"
julia --project=$LOCALPKG scripts/setupimage.jl
Expand All @@ -58,8 +58,8 @@ From: fedora:38
%environment
export LC_ALL=C
export LOCALPKG=/opt/SubPrecisionContactDetection.jl
export JLMJV=1.10
export JLV=$JLMJV.5
export JLMJV=1.9
export JLV=$JLMJV.4
export PATH=/opt/julia/julia-$JLV/bin:$PATH
export JULIA_DEPOT_PATH=/opt/juliadepot
export PYTHON="/usr/bin/python3"
Expand Down

0 comments on commit c9bb6c3

Please sign in to comment.