-
Notifications
You must be signed in to change notification settings - Fork 0
/
human_fetch_and_upload.sh
executable file
·93 lines (82 loc) · 1.44 KB
/
human_fetch_and_upload.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
#
DEFAULTRELEASE=5.2.2
while getopts r:a:k:b: option
do
case "${option}"
in
r)
RELEASE=${OPTARG}
;;
b)
AWSBUCKET=${OPTARG}
;;
a)
AWSACCESS=${OPTARG}
;;
k)
AWSSECRET=${OPTARG}
;;
esac
done
if [ -z "$RELEASE" ]
then
RELEASE=${ALLIANCE_RELEASE}
fi
if [ -z "$RELEASE" ]
then
RELEASE=${DEFAULTRELEASE}
fi
if [ -z "$AWSBUCKET" ]
then
if [ -z "${AWS_S3_BUCKET}" ]
then
AWSBUCKET=agrjbrowse
else
AWSBUCKET=${AWS_S3_BUCKET}
fi
fi
if [ -z "$AWSACCESS" ]
then
AWSACCESS=${AWS_ACCESS_KEY}
fi
if [ -z "$AWSSECRET" ]
then
AWSSECRET=${AWS_SECRET_KEY}
fi
CHROMOSOME=(
'5'
'6'
'7'
'8'
'9'
'10'
'11'
'12'
'13'
'14'
'15'
'16'
'17'
'18'
'19'
'20'
'21'
'22'
'MT'
'X'
'Y'
'1'
'2'
'3'
'4'
)
for CHROM in "${CHROMOSOME[@]}" ; do
echo "fetching chrom $CHROM files"
wget -q https://download.alliancegenome.org/variants/HUMAN/HUMAN.vep.$CHROM.vcf.gz
wget -q https://download.alliancegenome.org/variants/HUMAN/HUMAN.vep.$CHROM.vcf.gz.tbi
AWS_ACCESS_KEY_ID=$AWSACCESS AWS_SECRET_ACCESS_KEY=$AWSSECRET aws s3 cp --quiet --acl public-read HUMAN.vep.$CHROM.vcf.gz s3://$AWSBUCKET/docker/$RELEASE/human/VCF/HUMAN.vep.$CHROM.vcf.gz
AWS_ACCESS_KEY_ID=$AWSACCESS AWS_SECRET_ACCESS_KEY=$AWSSECRET aws s3 cp --quiet --acl public-read HUMAN.vep.$CHROM.vcf.gz.tbi s3://$AWSBUCKET/docker/$RELEASE/human/VCF/HUMAN.vep.$CHROM.vcf.gz.tbi
rm HUMAN.vep.$CHROM.vcf.gz
rm HUMAN.vep.$CHROM.vcf.gz.tbi
done