-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·21 lines (20 loc) · 900 Bytes
/
setup.sh
File metadata and controls
executable file
·21 lines (20 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
tv_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
tv_dir=$(realpath $tv_dir)
echo "trimViz repo is located in: $tv_dir"
echo "creating conda environment..."
if command -v mamba &> /dev/null; then
mamba env create -f "${tv_dir}/trimviz_conda_minimal.yml"
else
conda env create -f "${tv_dir}/trimviz_conda_minimal.yml"
fi
# Initialize conda in this shell session (need renv in R - /setup_r_env.R locates this via Sys.getenv("CONDA_PREFIX") )
eval "$(conda shell.bash hook)"
conda activate trimViz2025_renv
echo "setting up R packages via renv..."
#Rscript "${tv_dir}/setup_r_env.R" "build_from_scratch" "${tv_dir}"
Rscript "${tv_dir}/setup_r_env.R" "build" "${tv_dir}"
sleep 1
echo "testing to see if we can use R libs..."
Rscript "${tv_dir}/setup_r_env.R" "test" "${tv_dir}"
echo "Done. Remember to use: \"conda activate trimViz2025_renv\" before calling trimviz."