Linux installation

Step by step guide

  1. Installation should take less than 1 h. Most time will be spent compiling R and python packages. Most R packages will have to be compiled on Linux systems.

  2. Install library dependencies. We have tested this on Ubuntu 24.04.1 LTS. The package list might therefore vary depending on your distribution.

Install dev libraries
sudo apt-get install libcurl4-openssl-dev libxml2-dev cmake libgdal-dev libmagick++-dev libudunits2-dev libharfbuzz-dev libfribidi-dev
_images/linux_install_devs.png
  1. Install R base for Ubuntu and RStudio. We tested this on R version 4.4.1. If you use another version of R the package dependencies might not be resolved during renv::init().

  2. Start RStudio and install renv.

Install renv
install.packages("renv")
_images/linux_install_renv.png
  1. Install package dependencies. Download the renv.lock file and create the R-environment. You must set the current working directory to the directory where the renv.lock file is located. Select “1” to restore the project from the lockfile.

Tip

Unix systems have three main signs to specify directories

Common path directories
~ defines the home directory
. defines the current directory
.. defines the parent directory

~/Documents is shortform for /home/dom/Documents
Init R-environment
# An example would be
# setwd("~/Cecelia")
setwd("PATH/TO/RENV/LOCK/FILE")
renv::init()
_images/linux_renv_init.png
  1. Load the environment you have just created and install Cecelia package.

Install Cecelia package
renv::load()
renv::install("schienstockd/cecelia")
_images/linux_ccia_install.png
  1. You must define a base directory where configuration files, models and the shiny app will be stored.

Define base directory
library(cecelia)
cciaSetup("/REPLACE/WITH/YOUR/PATH")

In case you get stuck at any point and have to restart R, you need to redefine the path you are working on

Restart Cecelia
Sys.setenv(KMP_DUPLICATE_LIB_OK = "TRUE")
library(cecelia)
cciaUse("/REPLACE/WITH/YOUR/PATH")
_images/linux_ccia_setup.png
  1. Cecelia depends on a conda environment which must be created.

Install miniconda
reticulate::install_miniconda()
_images/linux_miniconda_install.png
Create conda environment
cciaCondaCreate()
_images/linux_conda_create.png
  1. Download models for deep-learning segmentation, tracking and others.

Download models
cciaModels()
_images/linux_ccia_models.png
  1. Create shiny app in base directory.

Create shiny app
cciaCreateApp()
_images/linux_create_app.png
  1. Adjust config

You have to adjust the parameters in /YOUR/PATH/TO/cecelia/custom.yml to your system and download/install:

Adjust config in text editor of RStudio
default:
  dirs:
    bioformats2raw: "/REPLACE/PATH/TO/bioformats2raw"
    projects: "/REPLACE/PATH/TO/project/directory/"
  volumes:
    home: "~/"
    computer: "/"
  python:
    conda:
      env: "r-cecelia-env"
      source:
        env: "r-cecelia-env"
_images/linux_custom_config.png
  1. Run the app.

Run Cecelia app
/PATH/TO/CECELIA/app/cecelia-Linux.sh
_images/linux_run_app.png