forked from interactivereport/RNASequest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·29 lines (24 loc) · 1.25 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
condaPath=$(which conda)
if [[ ${#condaPath} -lt 3 ]]; then
echo "Missing conda"
echo "Please install conda and add it into PATH"
exit
else
echo "conda in $condaPath"
fi
src="$(dirname $0)/src"
conda env create -f install.yml
condaPath=$(dirname $(dirname $condaPath))
# sed -i "1s|^|#. $condaPath/etc/profile.d/conda.sh;conda activate ExpressionAnalysis\n|" src/sys.yml
echo "export condaEnv='. $condaPath/etc/profile.d/conda.sh;conda activate ExpressionAnalysis'" > $src/.env
echo "export PATH=$PATH" >> $src/.env
echo "export OPENBLAS_NUM_THREADS=1" >> $src/.env
echo "export SGE_EXECD_PORT=$SGE_EXECD_PORT" >> $src/.env
echo "export SGE_QMASTER_PORT=$SGE_QMASTER_PORT" >> $src/.env
echo "export SGE_ROOT=$SGE_ROOT" >> $src/.env
## additional packages which are not available on anaconda
env -i src="$src" bash -c 'source $src/.env;eval $condaEnv;R -q -e '"'"'suppressWarnings({if(!require(revealjs)) install.packages("revealjs",repos = "https://cran.us.r-project.org")})'"'"
#conda activate ExpressionAnalysis
#R -q -e 'if(!require(revealjs)) install.packages("revealjs",repos = "http://cran.us.r-project.org")'
#printf 'Please install R revealjs package in the ExpressionAnalysis conda environment.\nR\ninstall.packages("revealjs")\n'