-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPBS_gatk_ref.sh
57 lines (42 loc) · 1.28 KB
/
PBS_gatk_ref.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
#!/bin/sh
## This follows GATK's instructions to format a reference for use in other GATK commands. See:
##https://www.broadinstitute.org/gatk/guide/article?id=2798
## Input is a reference fasta file:
## Download from (April 2016):
##http://hgdownload.cse.ucsc.edu/goldenPath/hg38/bigZips/
## Outputs are various bwa files, samtools index and picard's dictionary.
## PBS job submission script:
#Job parameters:
#PBS -l walltime=00:10:00
#PBS -l select=1:ncpus=16:mem=8gb
##PBS -l select=NN:ncpus=MM:tmpspace=500gb
## This tells the batch manager to use NN nodes with MM cpus and with at least 500gb of free space on the temporary directory.
#Use current working directory
##$ -cwd
#Save standard error and out to files:
#$ -e stderr.file
#$ -o stdout.file
#Module commands:
module load gatk/3.5
module load bio-bwa
module load samtools/1.2
module load picard/2.1.1
#INFILE=hg38.fa
INFILE=chr22.fa
#OUTFILE=hg38.dict
OUTFILE=chr22.dict
SLOTS=16
#CONFIG=.ncbirc
#File management:
cp $PBS_O_WORKDIR/$INFILE $TMPDIR
##cp $PBS_O_WORKDIR/$CONFIG $TMPDIR
#Command:
bwa index -a bwtsw $INFILE
gunzip $INFILE
samtools faidx $INFILE
picard CreateSequenceDictionary REFERENCE=$INFILE OUTPUT=$OUTFILE
#Notify by email:
##PBS -m abe
#File management:
cp $INFILE.* $PBS_O_WORKDIR
cp $OUTFILE $PBS_O_WORKDIR