-
Notifications
You must be signed in to change notification settings - Fork 7
/
12_make_primary_cover_gbwt.sh
executable file
·66 lines (64 loc) · 1.89 KB
/
12_make_primary_cover_gbwt.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
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
ITER=1
for GRAPH_BASE in s3://vg-k8s/profiling/graphs/v2-2/generic/primary/hs38d1/primaryhs38d1 ; do
for GBWT_TYPE in cover ; do
kubectl delete job adamnovak-make-gbwt-${ITER}
cat <<EOF | tee /dev/stderr | kubectl apply -f -
apiVersion: batch/v1
kind: Job
metadata:
name: adamnovak-make-gbwt-${ITER}
spec:
ttlSecondsAfterFinished: 259200
template:
spec:
containers:
- name: main
imagePullPolicy: Always
image: "quay.io/vgteam/vg:ci-2284-dc119fa046aa7131a1a8e026be36da2d79bc2f22"
command:
- /bin/bash
- -c
- |
set -ex
mkdir /tmp/work
cd /tmp/work
aws s3 cp ${GRAPH_BASE}.xg input.xg
if [[ "${GBWT_TYPE}" == "cover" ]] ; then
vg gbwt -p -g output.gg -o output.gbwt -x input.xg -P
else
aws s3 cp ${GRAPH_BASE}.gbwt input.gbwt
vg gbwt -p -g output.gg -o output.gbwt -x input.xg -l input.gbwt
fi
aws s3 cp output.gbwt ${GRAPH_BASE}.${GBWT_TYPE}.gbwt
aws s3 cp output.gg ${GRAPH_BASE}.${GBWT_TYPE}.gg
vg minimizer -t 16 -p -i output.min -g output.gbwt -G output.gg
aws s3 cp --no-progress output.min ${GRAPH_BASE}.${GBWT_TYPE}.min
volumeMounts:
- mountPath: /tmp
name: scratch-volume
- mountPath: /root/.aws
name: s3-credentials
resources:
limits:
cpu: 16
memory: "120Gi"
ephemeral-storage: "100Gi"
env:
- name: DEBIAN_FRONTEND
value: noninteractive
- name: VG_FULL_TRACEBACK
value: "1"
restartPolicy: Never
priorityClassName: medium-priority
volumes:
- name: scratch-volume
emptyDir: {}
- name: s3-credentials
secret:
secretName: shared-s3-credentials
backoffLimit: 0
EOF
((ITER++))
done
done