-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path06_make_1000GPlons_GRCh38_sampled_gbwts.sh
executable file
·61 lines (61 loc) · 1.87 KB
/
06_make_1000GPlons_GRCh38_sampled_gbwts.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
ITER=1
GBWT_TYPE=sampled
for GRAPH_BASE in s3://vg-k8s/profiling/graphs/v3/for-NA19239/1000gplons/hs38d1/1000GPlons_hs38d1_filter ; do
for SAMPLED_PATHS in 64 1 2 4 8 16 32 128 ; do
kubectl delete job adamnovak-make-sampled-gbwt-${ITER}
cat <<EOF | tee /dev/stderr | kubectl apply -f -
apiVersion: batch/v1
kind: Job
metadata:
name: adamnovak-make-sampled-gbwt-${ITER}
spec:
ttlSecondsAfterFinished: 259200
template:
spec:
containers:
- name: main
imagePullPolicy: Always
image: "quay.io/vgteam/vg:v1.31.0"
command:
- /bin/bash
- -c
- |
set -ex
mkdir /tmp/work
cd /tmp/work
aws s3 cp ${GRAPH_BASE}.xg input.xg
aws s3 cp ${GRAPH_BASE}.gbwt input.gbwt
aws s3 cp ${GRAPH_BASE}.dist input.dist
vg gbwt -p -g output.gg -o output.gbwt -x input.xg -l input.gbwt -n ${SAMPLED_PATHS}
aws s3 cp output.gbwt ${GRAPH_BASE}.${GBWT_TYPE}.${SAMPLED_PATHS}.gbwt
aws s3 cp output.gg ${GRAPH_BASE}.${GBWT_TYPE}.${SAMPLED_PATHS}.gg
vg minimizer -t 16 -p -i output.min -d input.dist -g output.gbwt -G output.gg
aws s3 cp --no-progress output.min ${GRAPH_BASE}.${GBWT_TYPE}.${SAMPLED_PATHS}.min
volumeMounts:
- mountPath: /tmp
name: scratch-volume
- mountPath: /root/.aws
name: s3-credentials
resources:
limits:
cpu: 16
memory: "180Gi"
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