-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_corall_local.sh
More file actions
executable file
·55 lines (47 loc) · 1.03 KB
/
run_corall_local.sh
File metadata and controls
executable file
·55 lines (47 loc) · 1.03 KB
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
49
50
51
52
53
54
55
#!/bin/bash -e
usage() { echo "Usage: $0 [-a <gtf_file>] [-s <star_index] [-o <out_dir>] [-m <miniconda_install_dir>] <rd1_fastq_gz|sample_csv> [<rd2_fastq_gz>]" 1>&2; exit 1; }
out_dir=corall_out
miniconda_install_dir=~/miniconda3
while getopts ":a:s:o:m:" o; do
case "${o}" in
a)
gtf_file=${OPTARG}
;;
s)
star_index=${OPTARG}
;;
o)
out_dir=${OPTARG}
;;
m)
miniconda_install_dir=${OPTARG}
;;
*)
usage
;;
esac
done
shift $((OPTIND-1))
[ $# -eq 0 ] && usage
if [[ $1 =~ \.fastq.gz$ ]]
then
[ $# -gt 2 ] && usage
if [ $# -eq 1 ]
then
corall_opt="--r1 $1"
else
corall_opt="--r1 $1 --r2 $2"
fi
elif [[ $1 =~ \.csv$ ]]
then
[ $# -gt 1 ] && usage
corall_opt="--csv $1"
else
usage
fi
source ${miniconda_install_dir}/bin/activate corall
./corall_batch.sh ${corall_opt} \
--gtfFile ${gtf_file} \
--starGenomeDir ${star_index} \
--baseDir ${out_dir}
conda deactivate