60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
# 02-job-sra-download.yaml
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: sra-download
|
|
namespace: rnaseq
|
|
spec:
|
|
backoffLimit: 2
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
|
|
initContainers:
|
|
- name: download-sra
|
|
image: ncbi/sra-tools:3.0.0
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- |
|
|
set -e
|
|
mkdir -p /data/raw
|
|
|
|
echo "=== Downloading ERR458493 (WT, single-end) ==="
|
|
fasterq-dump ERR458493 --outdir /data/raw --temp /tmp --threads 4
|
|
|
|
echo "=== Downloading ERR458500 (snf2 mutant, single-end) ==="
|
|
fasterq-dump ERR458500 --outdir /data/raw --temp /tmp --threads 4
|
|
|
|
echo "=== Compressing ==="
|
|
gzip /data/raw/*.fastq
|
|
|
|
echo "=== Done ==="
|
|
ls -lh /data/raw/
|
|
resources:
|
|
requests:
|
|
memory: "1Gi"
|
|
cpu: "2"
|
|
limits:
|
|
memory: "2Gi"
|
|
cpu: "4"
|
|
volumeMounts:
|
|
- name: workspace
|
|
mountPath: /data
|
|
|
|
containers:
|
|
- name: verify
|
|
image: busybox:1.36
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- |
|
|
echo "=== Raw files ==="
|
|
ls -lh /data/raw/
|
|
volumeMounts:
|
|
- name: workspace
|
|
mountPath: /data
|
|
|
|
volumes:
|
|
- name: workspace
|
|
persistentVolumeClaim:
|
|
claimName: rnaseq-workspace
|