forked from interactivereport/RNASequest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EAinit
executable file
·23 lines (18 loc) · 790 Bytes
/
EAinit
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
src="$(dirname $0)/src"
if [[ -n "$1" ]]; then
if [[ ! -f "$src/.env" ]]; then
echo "EAinit: Please run ./install to setup necessary env variables"
exit
fi
env -i src="$src" a=$1 b=$2 c=$3 bash -c 'source $src/.env;eval $condaEnv;Rscript $src/initConfig.R $src/ $a $b $c 2>&1 | tee -a $a/EAinit.$(date +%Y%m%d).log'
else
src=$(dirname $0)
env -i src="$src" bash -c 'cd $src/src;source .env;eval $condaEnv;Rscript utility.R .'
echo "=============== EAinit path/to/a/DNAnexus/download/folder"
echo "e.g.: EAinit /camhpc/ngs/projects/TST11000/dnanexus/20210709173527_fergal.casey"
echo "A folder ('EA[date]') with files for EArun will be created in the input folder"
echo ""
echo "==============="
exit 0
fi