-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHaplotypeCaller.sbatch
More file actions
50 lines (38 loc) · 1.44 KB
/
HaplotypeCaller.sbatch
File metadata and controls
50 lines (38 loc) · 1.44 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
#!/bin/bash
#SBATCH --job-name=seq_post_test
#SBATCH --cpus-per-task=8
#SBATCH --mem-per-cpu=16G
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=imrant_nasim@dfci.harvard.edu
#SBATCH -o Seq_post_%j.out
#SBATCH -e Seq_post_%j.err
#Load required modules - load manually via command line anyway
#module load picard/2.25.0 #Either load in this version or CZs version
#Make a temporary directory
mkdir -p /cluster/czlab/temp;
rm -rf /cluster/czlab/temp/*;
#Set reference paths
hg38_ref='/czlab/References/GRCh38/Homo_sapiens_assembly38.fasta'
GATK='/czlab/chzhang/github/gatk4/build/libs/gatk.jar'
#Set file names
#INPUT_FILE='/czlab/inasim/TCGA_data/X_ist/C440.TCGA-HU-A4HD-10A-01D-A25E-08.3_gdc_realn.bam'
#INPUT_FILE='C440.TCGA-HU-A4HD-10A-01D-A25E-08.3_gdc_realn.bam'
#output_file="$(basename "$INPUT_FILE" .bam)_prac."
#log_file='logfile.'
#Set chromosome list
#CHR_list=('chr1' 'chr2' 'chr3' 'chr4' 'chr5' 'chr6' 'chr7' 'chr8' 'chr9' 'chr10' 'chr11' 'chr12' 'chr13' 'chr14' 'chr15' 'chr16' 'chr17' 'chr18' 'chr19' 'chr20' 'chr21' 'chr22' 'chrX' 'chrY')
CHR_list=('chr17' 'chrX') #You can also set individual chromosomes
for j in *.bam
do
for i in "${CHR_list[@]}"
do
java -Xmx8000m -Djava.io.tmpdir=/cluster/czlab/temp -jar $GATK \
HaplotypeCaller \
-R $hg38_ref \
-I $j \
-L $i \
-O "$(basename "$j" .bam)_prac."$i"_g.vcf" &>> "$(basename "$j" .bam)_log."$i".log"
done
done
#Clean temp dir
rm -rf /cluster/czlab/temp;