-
Notifications
You must be signed in to change notification settings - Fork 11
/
REMBRANDTS.sh
48 lines (36 loc) · 1.08 KB
/
REMBRANDTS.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
####################### define executables
deseq="./src/_R/DESeq.R"
rambrandts="./src/_R/REMBRANDTS.R"
####################### identify the input arguments
jobid=$1
metadata=$2
refdir=$3
stringency=$4
fitmode=$5
if [ "$jobid" = "" ]; then
echo -e "\nUsage: bash REMBRANDTS.sh <jobID> <metadata.txt> <inputDir> <stringency> <biasMode>\n"
exit
fi
echo "Job ID: "$jobid
echo "Input metadata file: "$metadata
echo "Reference directory for HTSeq-Count files: "$refdir
echo "Stringency for filtering measurements: "$stringency
echo "The mode of identifying bias parameters: "$fitmode
if [ -e "$metadata" ]; then
echo "Metadata file found."
else
echo "ERROR: Metadata file was not found."
exit
fi
####################### define temporary path
tmp_folder="./tmp/"$jobid
mkdir -p $tmp_folder
####################### run DESeq
Rscript $deseq $jobid $metadata $refdir
####################### define output path
out_folder="./out/"$jobid
mkdir -p $out_folder
mkdir -p $out_folder"/sampleScatterplots"
####################### run REMBRANDTS
Rscript $rambrandts $jobid $stringency $fitmode