-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgatk_rename_sam.sh
More file actions
35 lines (28 loc) · 980 Bytes
/
gatk_rename_sam.sh
File metadata and controls
35 lines (28 loc) · 980 Bytes
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
#!/bin/bash -e
#$ -cwd -V
#$ -pe smp 1
#$ -l h_vmem=40G
# $ -M louise.pease@ncl.ac.uk
#$ -m a
#$ -N RenameSam
#$ -hold_jid star
#$ -o /user/logs/de_mvbam.$JOB_ID.$TASK_ID.out
#$ -e /user/logs/de_mvbam.$JOB_ID.$TASK_ID.err
start_time=$(date)
start_secs=$(date +%s)
echo "### Logging Info ###"
echo "### Job: ${JOB_ID}: ${JOB_NAME} ###"
echo "### Array ID: ${SGE_TASK_ID} ###"
echo "### Job Occupying ${NSLOTS} slots ###"
echo "### Job running on ${HOSTNAME} ###"
echo "### Started at: ${start_time} ###"
source /user/scripts/C_variables_hg19.sh
readarray -t FILENAME < ${scripts}/samples.txt
#mv ${bamOutput}/Aligned.*.bam ${bamOutput}/${FILENAME[$SGE_TASK_ID-1]}Aligned.*.bam
mv ${twopass}/Aligned.*.sam ${twopass}/${FILENAME[$SGE_TASK_ID-1]}.Aligned.*.sam
end_time=$(date)
end_secs=$(date +%s)
time_elapsed=$(echo "${end_secs} - ${start_secs}" | bc)
echo
echo "### Ended at: ${end_time} ###"
echo "### Time Elapsed: ${time_elapsed} ###"