-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatKgvcf.slurm
37 lines (32 loc) · 1.02 KB
/
gatKgvcf.slurm
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
#!/usr/bin/env bash
#
#SBATCH -J gatk # A single job name for the array
#SBATCH --ntasks-per-node=10 # one core
#SBATCH -N 1 # on one node
#SBATCH -t 0-10:00 # 10 hours
#SBATCH --mem 120G
#SBATCH -o /scratch/csm6hg/daphnia_phylo/gatk.out # Standard output
#SBATCH -e /scratch/csm6hg/daphnia_phylo/gatk.err # Standard error
#SBATCH -p standard
#SBATCH --account berglandlab
# Load modules
module load gatk/4.0.0.0
# Parameters
parameterFile="/scratch/csm6hg/daphnia_phylo/Daphnia.SRR.csv"
wd="/scratch/csm6hg"
# Extract sample
samp=$( cat ${parameterFile} | grep "^$SLURM_ARRAY_TASK_ID," | cut -d',' -f4 )
# Add read groups
java -jar $EBROOTPICARD/picard.jar AddOrReplaceReadGroups \
-I ${wd}/bam/${samp}_finalmap.bam \
-O ${wd}/bam/.bam \
-LB "library" \
-PL "ILLumina" \
-PU "platunit" \
-SM ${samp}
# Run program
gatk --java-options "-Xmx4g" HaplotypeCaller --native-pair-hmm-threads 10 \
-R ${wd}/daphnia_phylo/totalHiCwithallbestgapclosed.fa \
-I ${wd}/bam/${samp}_finalmap.bam \
-O ${wd}/daphnia_phylo/gvcf/${samp}.g.vcf \
-ERC GVCF