forked from CRG-Beato/utils_beatolab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gem_generate_index.sh
executable file
·67 lines (54 loc) · 1.79 KB
/
gem_generate_index.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
#==================================================================================================
# Created on: 2016-03-24
# Usage: ./gem_generate_index.sh
# Author: Javier Quilez (GitHub: jaquol)
# Goal: generates genome index files for GEM
#==================================================================================================
#==================================================================================================
# CONFIGURATION VARIABLES AND PATHS
#==================================================================================================
# Variables
process="gem_generate_index"
species="falco_peregrinus"
version="falPer2"
fasta_name=${version}
download_site=ncbi
# paths
genome_fasta=$HOME/assemblies/$species/$version/$download_site/$fasta_name.fa
JOB_CMD=$HOME/utils/job_cmd
JOB_OUT=$HOME/utils/job_out
mkdir -p $JOB_CMD
mkdir -p $JOB_OUT
gem_indexer=`which gem-indexer`
gem_index=$HOME/assemblies/$species/$version/$download_site/$fasta_name
# CRG cluster parameters
queue=short-sl7
memory=50G
max_time=06:00:00
slots=8
#==================================================================================================
# JOB
#==================================================================================================
# Build job: parameters
job_name=${process}_${species}_${version}
job_file=$JOB_CMD/$job_name.sh
m_out=$JOB_OUT
echo "#!/bin/bash
#$ -N $job_name
#$ -q $queue
#$ -l virtual_free=$memory
#$ -l h_rt=$max_time
#$ -M javier.quilez@crg.eu
#$ -m abe
#$ -j y
#$ -o $m_out/${job_name}_\$JOB_ID.out
#$ -e $m_out/${job_name}_\$JOB_ID.err
#$ -pe smp $slots" > $job_file
# STAR commands
job_cmd="$gem_indexer -i $genome_fasta -o $gem_index -T $slots"
echo $job_cmd >> $job_file
# Submit job
chmod a+x $job_file
qsub < $job_file
#cat $job_file