0
|
1 #!/bin/sh
|
|
2
|
|
3 #------------------------------------------------------------------------------
|
|
4 # Create a zip file for distribution
|
|
5 # Note: Only binary data is included (no raw gene info / genomes)
|
|
6 #
|
|
7 # Pablo Cingolani 2010
|
|
8 #------------------------------------------------------------------------------
|
|
9
|
|
10 VERSION="2_1"
|
|
11 VERSION_REV=$VERSION"a"
|
|
12 DIR=$HOME/snpEff_$VERSION_REV
|
|
13 rm -rvf $DIR
|
|
14 mkdir $DIR
|
|
15
|
|
16 # Copy core files
|
|
17 cp snpEff.config snpEff.jar $DIR
|
|
18 cp -rvfH galaxy scripts $DIR
|
|
19
|
|
20 cd $DIR
|
|
21 rm -rvf `find . -name "CVS" -type d`
|
|
22 cd -
|
|
23
|
|
24 # Create 'core' zip file
|
|
25 cd $HOME
|
|
26 ZIP="snpEff_v"$VERSION_REV"_core.zip"
|
|
27 rm -f $ZIP 2> /dev/null
|
|
28 zip -r $ZIP snpEff_$VERSION_REV
|
|
29 cd -
|
|
30
|
|
31 # Create ZIP file for each database
|
|
32 for d in `ls data/*/snpEffectPredictor.bin`
|
|
33 do
|
|
34 DIR=`dirname $d`
|
|
35 GEN=`basename $DIR`
|
|
36
|
|
37 echo $GEN
|
|
38 ZIP="snpEff_v"$VERSION"_"$GEN".zip"
|
|
39 zip -r $ZIP data/$GEN/*.bin
|
|
40 done
|
|
41
|
|
42 # Look for missing genomes
|
|
43 echo Missing genomes:
|
|
44 ls -d data/*/snpEffectPredictor.bin | grep -v genomes | cut -f 2 -d / | sort > genomes_bins.txt
|
|
45 ls -d data/* | grep -v genomes | cut -f 2 -d / | sort > genomes_dirs.txt
|
|
46 diff genomes_dirs.txt genomes_bins.txt | grep "^<"
|
|
47
|