-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from AICONSlab/jo-dev-231-rst_docs
bugfixes and realease 2.2.4
- Loading branch information
Showing
65 changed files
with
2,295 additions
and
1,385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,26 +4,25 @@ | |
<img src="docs/gallery/icon.png" alt="alt text" width="400" height="250"/> | ||
</p> | ||
|
||
______________ | ||
___ | ||
|
||
MIRACL (Multi-modal Image Registration And Connectivity anaLysis) | ||
is a general-purpose, open-source pipeline for automated: | ||
|
||
1) Registration of mice clarity data to the Allen reference atlas | ||
2) Segmentation & feature extraction of mice clarity data in 3D (Sparse & nuclear staining) | ||
3) Registration of mice multimodal imaging data (MRI & CT, in-vivo & ex-vivo) to Allen reference atlas | ||
4) Tract or label specific connectivity analysis based on the Allen connectivity atlas | ||
5) Comparison of diffusion tensort imaging (DTI)/tractography, virus tracing using CLARITY & | ||
Allen connectivity atlas | ||
6) Statistical analysis of CLARITY & Imaging data | ||
7) Atlas generation & Label manipulation | ||
1) Registration of mice clarity data to the Allen reference atlas | ||
2) Segmentation & feature extraction of mice clarity data in 3D (Sparse & nuclear staining) | ||
3) Registration of mice multimodal imaging data (MRI & CT, in-vivo & ex-vivo) to Allen reference atlas | ||
4) Tract or label specific connectivity analysis based on the Allen connectivity atlas | ||
5) Comparison of diffusion tensort imaging (DTI)/tractography, virus tracing using CLARITY & | ||
Allen connectivity atlas | ||
6) Statistical analysis of CLARITY & Imaging data | ||
7) Atlas generation & Label manipulation | ||
|
||
Copyright (c) 2022 Maged Goubran, [email protected] | ||
|
||
All Rights Reserved. | ||
|
||
____________________________ | ||
All Rights Reserved | ||
|
||
___ | ||
|
||
We provide containers for using the software (Docker and Singularity) as well as | ||
local install instructions. For more details, see our [docs](https://miracl.readthedocs.io). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,52 +11,95 @@ | |
# Current maintainer of script: Jonas Osmann @ github.com/jono3030 | ||
# MIRACL (C) Maged Groubran @ [email protected] | ||
|
||
# Set variable base state | ||
# Script version | ||
version="1.1.1-beta" | ||
version="1.1.4-beta" | ||
|
||
# Set log variable | ||
# Set default log state | ||
write_log=false | ||
|
||
# Set default image name | ||
img_name="mgoubran/miracl" | ||
|
||
# Set default container name | ||
cont_name="miracl" | ||
|
||
# Set default image version | ||
miracl_version="latest" | ||
|
||
# Usage function | ||
function usage() | ||
{ | ||
|
||
cat <<usage | ||
Automatically build MIRACL Docker image with pseudo host user | ||
Usage: ./build.sh [OPTIONS] [ARG] ... | ||
Version: $version | ||
Usage: ./build.sh | ||
Automatically build MIRACL Docker image with pseudo host user | ||
Arguments: | ||
Options: | ||
-h,--help: Prints this help menu | ||
-i, Specify image name (default: mgroubran/miracl) | ||
-c, Specify container name (default: miracl) | ||
-t, Set when using specific MIRACL tag/version (parses from miracl/version.txt) | ||
-l, Write logfile of build process to build.log (default: false ) | ||
-v, Print version of build script and exit | ||
-h, Print this help menu and exit | ||
-l, --log: Writes logfile of build process to build.log | ||
Version: $version | ||
usage | ||
|
||
} | ||
|
||
# Basic flags function | ||
# Will be expanded in next iteration of MIRACL | ||
while [ ! $# -eq 0 ] | ||
do | ||
if [ "$*" = "-h" ] || [ "$*" = "--help" ]; | ||
then | ||
usage | ||
exit 0 | ||
elif [ "$*" = "-l" ] || [ "$*" = "--log" ]; | ||
then | ||
write_log=true | ||
else | ||
printf "\'$*\' is not a valid argument\n" | ||
exit 1 | ||
fi | ||
shift | ||
done | ||
# Parser for args and options | ||
while getopts ':i:c:ltvh' opt; do | ||
case "$opt" in | ||
|
||
i) | ||
if [ "${OPTARG}" != "$img_name" ]; then | ||
img_name=${OPTARG} | ||
fi | ||
;; | ||
|
||
c) | ||
if [ "${OPTARG}" != "$cont_name" ]; then | ||
cont_name=${OPTARG} | ||
fi | ||
;; | ||
|
||
l) | ||
write_log=true | ||
;; | ||
|
||
t) | ||
miracl_version=$(cat ./miracl/version.txt) | ||
;; | ||
|
||
v) | ||
echo -e "v$version" | ||
exit 0 | ||
;; | ||
|
||
h) | ||
usage | ||
exit 0 | ||
;; | ||
|
||
:) | ||
echo -e "Option requires an argument.\nUsage: $(basename $0) [-i arg] [-c arg]" | ||
exit 1 | ||
;; | ||
|
||
?) | ||
echo -e "Invalid command option.\nUsage: $(basename $0) [-i arg] [-c arg] [-l] [-v] [-h]" | ||
exit 1 | ||
;; | ||
|
||
esac | ||
done | ||
shift "$(($OPTIND -1))" | ||
|
||
# Information that needs to be added to Dockerfile | ||
# to create pseudo host user. This is required to | ||
# make X11 work correclty with miraclGUI | ||
|
@@ -75,6 +118,12 @@ WORKDIR /home/\$USER | |
END | ||
) | ||
|
||
# Replace Docker image name and version | ||
sed -i "s|\ \ \ \ image:.*|\ \ \ \ image: $img_name:$miracl_version|" docker-compose.yml | ||
|
||
# Replace Docker container name | ||
sed -i "s|\ \ \ \ container_name:.*|\ \ \ \ container_name: $cont_name|" docker-compose.yml | ||
|
||
function rm_USER_TEXT () { | ||
sed -i '/STARTUNCOMMENT/,/STOPUNCOMMENT/{//!d}' Dockerfile | ||
} | ||
|
@@ -99,7 +148,7 @@ if [ -x "$(command -v docker)" ]; then | |
--build-arg USER_ID=$(id -u) \ | ||
--build-arg GROUP_ID=$(id -g) \ | ||
--build-arg USER=$HOST_USER \ | ||
-t mgoubran/miracl . | ||
-t $img_name:$miracl_version . | ||
} | ||
|
||
# Check for log flag | ||
|
@@ -120,9 +169,9 @@ if [ -x "$(command -v docker)" ]; then | |
# Test if docker-compose is installed | ||
# Should come by default with Docker-Desktop | ||
if [ -x "$(command -v docker-compose)" ]; then | ||
printf "Docker Compose installation found <<$(docker-compose --version)>>). Run 'docker-compose up -d' to start the MIRACL container in background.\n" | ||
elif dcex=$(docker compose --version); then | ||
printf "Docker Compose installation found (<<%s>>). Run 'docker compose up -d' or use Docker Desktop (if installed) to start the MIRACL container in background.\n" "$dcex" | ||
printf "Docker Compose installation found ($(docker-compose --version)). Run 'docker-compose up -d' to start the MIRACL container in background.\n" | ||
elif dcex=$(docker compose version); then | ||
printf "Docker Compose installation found (%s). Run 'docker compose up -d' or use Docker Desktop (if installed) to start the MIRACL container in background.\n" "$dcex" | ||
else | ||
printf "Docker Compose installation not found. Please install Docker Compose plugin or standalone version to run the MIRACL container. Instructions on how to install Docker Compose can be found here: https://docs.docker.com/compose/install/\n" | ||
fi | ||
|
@@ -131,11 +180,14 @@ if [ -x "$(command -v docker)" ]; then | |
printf "\nBuild not successful! An error occured with exit code: $build_status_code\n" | ||
# Remove $USER_TEXT from Dockerfile | ||
rm_USER_TEXT | ||
# Exit with custom status code | ||
exit $build_status_code | ||
fi | ||
|
||
else | ||
di_status_code=$? | ||
printf "\nDocker installation not found. Please install Docker first.\n" | ||
printf "Exiting with status code $di_status_code\n" | ||
exit di_status_code | ||
# Exit with custom status code | ||
exit $di_status_code | ||
fi |
Oops, something went wrong.