-
Notifications
You must be signed in to change notification settings - Fork 4
/
hifiasm.pbs.sh
executable file
·50 lines (36 loc) · 1.06 KB
/
hifiasm.pbs.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
#!/bin/bash
#PBS -P ox63
#PBS -q normal
#PBS -N hifiasm
#PBS -l walltime=12:00:00
#PBS -l storage=gdata/ox63+scratch/ox63+scratch/if89+gdata/if89
#PBS -l mem=192GB
#PBS -l ncpus=48
#PBS -l wd
###################################################################
###################################################################
# Make sure to change:
# 1. ox63 to your own projects
# to run:
# qsub -v FASTQ=/path/to/reads.fastq,OUT_PREFIX=hg002 ./hifiasm.pbs.sh
###################################################################
usage() {
echo "Usage: qsub -v FASTQ=/path/to/reads.fastq,OUT_PREFIX=hg002 ./hifiasm.pbs.sh" >&2
echo
exit 1
}
#output prefix
[ -z "${OUT_PREFIX}" ] && usage
#fastq
[ -z "${FASTQ}" ] && usage
# terminate script
die() {
echo "$1" >&2
echo
exit 1
}
module load /g/data/if89/apps/modulefiles/hifiasm/0.19.8 || die "hifiasm not found"
THREADS=${PBS_NCPUS}
#########################################
## generate assembly with hifiasm
/usr/bin/time -v hifiasm -t ${THREADS} --hg-size 3g -o ${OUT_PREFIX} ${FASTQ} || die "hifiasm failed"