From c9bb6c38e0af025fb0cac50f41d8b93b5a2b2b4b Mon Sep 17 00:00:00 2001 From: Ben Cardoen Date: Wed, 30 Oct 2024 12:00:44 +0000 Subject: [PATCH] Update build scripts --- docs/src/validation.md | 8 +++++++- runjulia.sh | 4 ++-- singularity_recipes/recipe.def | 10 +++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/src/validation.md b/docs/src/validation.md index bd0f119..0d49b67 100644 --- a/docs/src/validation.md +++ b/docs/src/validation.md @@ -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. diff --git a/runjulia.sh b/runjulia.sh index 17b4feb..47bb375 100755 --- a/runjulia.sh +++ b/runjulia.sh @@ -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 diff --git a/singularity_recipes/recipe.def b/singularity_recipes/recipe.def index f419c66..8ae9d86 100644 --- a/singularity_recipes/recipe.def +++ b/singularity_recipes/recipe.def @@ -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 @@ -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 @@ -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"