-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnpalliance.sh
executable file
·51 lines (43 loc) · 1.16 KB
/
snpalliance.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
#!/bin/sh
#
# This script is a wrapper around the process that generates the Alliance TSV file.
# snpalliance.sh
#
# For each chromosome
# . copy each Alliance vep/vcf ($SNP_ALLIANCE_INPUT) to the /data/loads/mgi/snpcacheload/output folder
# . sort & uniq the file -> chr.tsv
#
# The TSV files remain static until this script is run again.
# This script should be run again if a new Alliance vep/vcf file is mirroed via mirror_wget/alliancegenome.org.variants
# This script needs to run on the SNP server: bhmgidb05ld, bhmgidb03lp
#
cd `dirname $0`
COMMON_CONFIG=Configuration
#
# Make sure the common configuration file exists and source it.
#
if [ -f ${COMMON_CONFIG} ]
then
. ${COMMON_CONFIG}
else
echo "Missing configuration file: ${COMMON_CONFIG}"
exit 1
fi
#
# Initialize the log file.
# open LOG in append mode and redirect stdout
#
LOG=${SNP_ALLIANCE_LOG}
rm -rf ${LOG}
>>${LOG}
cd ${CACHEDATADIR}
date >> ${LOG} 2>&1
echo "Process SNP Alliance Feed TSV files" >> ${LOG} 2>&1
${PYTHON} ${SNPCACHELOAD}/snpalliance.py >> ${LOG} 2>&1
rm -rf *.tsv
for i in `ls snpalliance.output.*`
do
sort ${i} | uniq > ${i}.tsv
rm -rf ${i}
done
date >> ${LOG} 2>&1