2
|
1 #!/bin/bash
|
|
2 dir="$(cd "$(dirname "$0")" && pwd)"
|
|
3
|
|
4 input=$1
|
|
5 ref=$2
|
|
6 output=$3
|
|
7 f=$(file $input)
|
|
8 zipType="Zip archive"
|
|
9 if [[ "$f" == *"$zipType"* ]]
|
|
10 then
|
|
11 echo "Zip archive, assuming IMGT output file"
|
|
12 echo "Trying: unzip $input -d $PWD/files/"
|
|
13 unzip $input -d $PWD/files/ > $PWD/unziplog.log
|
|
14 cat $PWD/files/*/2_* | cut -f2,4,7 > $PWD/gappednt.txt
|
|
15 python $dir/script_imgt.py --input $PWD/gappednt.txt --ref $ref --output $output
|
|
16 else
|
|
17 python $dir/script_xlsx.py --input $input --ref $ref --output $output
|
|
18 fi
|