NEUBIAS / training-resources

Resources for teaching/preparing to teach bioimage analysis
https://neubias.github.io/training-resources
Other
42 stars 21 forks source link

ome-zarr module installation instructions #414

Open tischi opened 1 year ago

tischi commented 1 year ago

mc and bioformats2raw

#! /bin/bash

mkdir ~/Applications
cd ~/Applications
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc

wget https://github.com/glencoesoftware/bioformats2raw/releases/download/v0.5.0rc2/bioformats2raw-0.5.0-rc2.zip
unzip bioformats2raw-0.5.0-rc2.zip

echo 'alias mc="$HOME/Applications/mc"' >> ~/.bashrc
echo 'alias bioformats2raw="$HOME/Applications/bioformats2raw-0.5.0-rc2/bin/bioformats2raw"' >> ~/.bashrc
tischi commented 1 year ago

bioformats2raw --debug=OFF --progress ./t1-head.tif ./t1-head-out

tischi commented 1 year ago

https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

tischi commented 1 year ago
conda install -y -c ome bioformats2raw
conda install -y -c ome/label/pre bioformats2raw
conda install -y -c conda-forge tree
tischi commented 1 year ago

wget https://github.com/joshmoore/NGFF-GBI-2022-Workshop/blob/main/binder/environment.yml

tischi commented 1 year ago
#! /bin/bash

find_in_conda_env(){
    conda env list | grep "${@}" >/dev/null 2>/dev/null
}

# create working directory
mkdir -p ~/Applications 
cd ~/Applications

# install conda (if needed)
if ! command -v conda &> /dev/null
then
    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
fi

# install ome-zarr conda environment (if needed)
if ! find_in_conda_env "ome-zarr" 
then
   wget https://raw.githubusercontent.com/joshmoore/NGFF-GBI-2022-Workshop/main/binder/environment.yml
   conda env create -n ome-zarr -f environment.yml
fi 

# install Fiji (if needed)
wget https://downloads.imagej.net/fiji/latest/fiji-linux64.zip
unzip fiji-linux64.zip
rm fiji-linux64.zip
echo $'#!/usr/bin/env -S bash --noprofile --norc\n/opt/Fiji.app/ImageJ-linux64 $@' >> /usr/local/bin/fiji && \
  chmod +x /usr/local/bin/fiji && \
  Fiji.app/ImageJ-linux64 --headless --update add-update-site BIG-EPFL https://sites.imagej.net/BIG-EPFL/ && \
  Fiji.app/ImageJ-linux64 --headless --update add-update-site ImageScience https://sites.imagej.net/ImageScience/ && \
  Fiji.app/ImageJ-linux64 --headless --update add-update-site IJPB-plugins https://sites.imagej.net/IJPB-plugins/ && \
  Fiji.app/ImageJ-linux64 --headless --update update && \
  chmod -R a+rwx /opt/Fiji.app # do this at the end to also include the added update sites
tischi commented 1 year ago

multiple conda environment alternative

#! /bin/bash

# create working directory
mkdir -p ~/Applications 
cd ~/Applications

# install conda (if needed)
if ! command -v conda &> /dev/null
then
    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
fi

# install napari with ome-zarr plugin
conda create --yes --name napari python=3.8
conda run --name napari python -m pip install napari[all]
conda run --name napari python -m pip install napari-ome-zarr
conda clean -tipy

# install bioformats2raw
conda create --yes --name bioformats2raw
conda install -n bioformats2raw -y -c ome bioformats2raw
conda install -n bioformats2raw -y -c ome/label/pre bioformats2raw
conda install -n bioformats2raw -y -c conda-forge tree
conda clean -tipy

# install mc
conda create --yes --name minio
conda install -n minio -y -c joshmoore go-mc
conda clean -tipy

# install Fiji and MoBIE plugin
wget https://downloads.imagej.net/fiji/latest/fiji-linux64.zip
unzip fiji-linux64.zip
rm fiji-linux64.zip
Fiji.app/ImageJ-linux64 --headless --update add-update-site MoBIE https://sites.imagej.net/MoBIE/
Fiji.app/ImageJ-linux64 --headless --update update
chmod -R a+rwx Fiji.app
tischi commented 1 year ago

git clone https://git.embl.de/ysun/course-scripts.git

tischi commented 1 year ago
#! /bin/bash

# create working directory
mkdir -p ~/Applications
cd ~/Applications

# install conda (if needed)
if ! command -v conda &> /dev/null
then
    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh -b -u
fi

echo 'alias conda="$HOME"miniconda3/bin/conda' >>~/.bashrc
# install napari with ome-zarr plugin
$HOME/miniconda3/bin/conda create --yes --name napari python=3.8
$HOME/miniconda3/bin/conda run --name napari python -m pip install napari[all]
$HOME/miniconda3/bin/conda run --name napari python -m pip install napari-ome-zarr
$HOME/miniconda3/bin/conda clean -tipy

# install bioformats2raw
$HOME/miniconda3/bin/conda create --yes --name bioformats2raw
$HOME/miniconda3/bin/conda install -n bioformats2raw -y -c ome bioformats2raw
$HOME/miniconda3/bin/conda install -n bioformats2raw -y -c ome/label/pre bioformats2raw
$HOME/miniconda3/bin/conda install -n bioformats2raw -y -c conda-forge tree
$HOME/miniconda3/bin/conda clean -tipy

# install mc
$HOME/miniconda3/bin/conda create --yes --name minio
$HOME/miniconda3/bin/conda install -n minio -y -c joshmoore go-mc
$HOME/miniconda3/bin/conda clean -tipy

# install Fiji and MoBIE plugin
wget https://downloads.imagej.net/fiji/latest/fiji-linux64.zip
unzip fiji-linux64.zip
rm fiji-linux64.zip
Fiji.app/ImageJ-linux64 --headless --update add-update-site MoBIE https://sites.imagej.net/MoBIE/
Fiji.app/ImageJ-linux64 --headless --update update
chmod -R a+rwx Fiji.app

echo 'alias napari="$HOME"/miniconda3/envs/napari/bin/napari' >>~/.bashrc
echo 'alias bioformats2raw="$HOME"/miniconda3/envs/bioformats2raw/bin/bioformats2raw' >>~/.bashrc
echo 'alias minio="$HOME"/miniconda3/envs/minio/bin/mc' >>~/.bashrc
source ~/.bashrc
tischi commented 1 year ago

https://github.com/NEUBIAS/training-resources/raw/master/image_data/xyz_8bit__mitotic_plate_calibrated.tif