forked from interactivereport/RNASequest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEApub
executable file
·31 lines (27 loc) · 1.19 KB
/
EApub
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
30
31
#!/usr/bin/env bash
# sva::ComBat_seq is not available in R/3.5.1
if [[ -n "$1" ]]; then
src="$(dirname $0)/src"
if [[ ! -f "$src/.env" ]]; then
echo "EApub: Please run ./install to setup necessary env variables"
exit
fi
source $src/.env;eval $condaEnv
if [[ ! -f "$HOME/.gitconfig" ]] || [[ $(grep "$(dirname $0)/.git" ~/.gitconfig | wc -l) == 0 ]];then #
git config --global --add safe.directory $(dirname $0)/.git
fi
env -i src="$src" a=$1 b=$2 c=$3 bash -c 'source $src/.env;eval $condaEnv;Rscript $src/publish.R $src/ $a $b $c'
#condaEnv=$(head -n 1 $(dirname $0)/src/sys.yml)
#condaEnv=${condaEnv:1}
#eval "$condaEnv"
#Rscript $(dirname $0)/src/publish.R $(dirname $0)/src/ $@
else
echo "=============== EApub path/to/config/file"
exePath=$(dirname $0)
echo "'EApub' can be used to publish a RNAseq project to shinyone server!"
echo "Please make sure the following two are satisfied before using EApub:"
echo "\t1. The EArun was successfully called and checked on QuickOmic test website;"
echo "\t2. Fill the buttom section "ShinyOne project manager" in config when possible."
echo "==============="
exit 0
fi