-
Notifications
You must be signed in to change notification settings - Fork 3
/
format_STAR_output_pipeline_cluster_part1.sh
executable file
·45 lines (36 loc) · 1.37 KB
/
format_STAR_output_pipeline_cluster_part1.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
#!/bin/sh
# format_STAR_output_pipeline_cluster_part1.sh
#$ -S /bin/sh
#$ -N format_STAR_output_pipeline_cluster_part1
#$ -pe serial 2
#$ -q normal
#$ -cwd
#
# ==============================================================================================
# format_STAR_output_pipeline_cluster_part1:
#
# Description: The next pipeline run format_STAR_output_per_sample.sh in the cluster per sample,
# given a path with the STAR files. After this, it will be necessary to run
# format_STAR_output_pipeline_cluster_part2.sh
#
# Input: arg[1] --> path to the STAR output file (one folder per sample)
# arg[2] --> path to the GTF annotation file
# ==============================================================================================
io_dir=$1
gtf_dir=$2
source /usr/local/sge/default/common/settings.sh
echo "Starting execution. "$(date)
echo "Sending jobs to gencluster..."
cnt=0
#Store the path where the scripts are
MYSELF="$(readlink -f "$0")"
MYDIR="${MYSELF%/*}"
for sample in $(ls -d "$io_dir"/*);do
echo "Processing sample $sample..."
command="$(echo $MYDIR)/format_STAR_output_per_sample.sh $(echo $sample) $(echo $gtf_dir)"
qsub -N format_STAR_"$cnt" -S /bin/sh -cwd -q bigmem,long,normal -pe serial 2 -b y $command
cnt=$((cnt+1))
done
echo "When all the jobs have finished, run format_STAR_output_pipeline_cluster_part2.sh"
echo "End of execution. "$(date)
exit 0