2
|
1 #!/bin/bash
|
|
2 dir="$(cd "$(dirname "$0")" && pwd)"
|
|
3
|
|
4 input=$1
|
5
|
5 ids=$2
|
|
6 ref=$3
|
|
7 output=$4
|
|
8
|
|
9 input=($input)
|
|
10
|
|
11 ids=($ids)
|
|
12
|
|
13 first="${input[0]}"
|
|
14
|
|
15 count=0
|
|
16 for current in ${input[@]}
|
|
17 do
|
|
18 f=$(file $current)
|
|
19 zipType="Zip archive"
|
|
20 if [[ "$f" == *"$zipType"* ]]
|
|
21 then
|
|
22 id=${ids[$count]}
|
|
23 unzip $current -d $PWD/$id/ >> $PWD/unziplog.log
|
|
24 filename="$PWD/gappednt_${id}.txt"
|
|
25 cat $PWD/$id/*/2_* | cut -f2,4,7 > $filename
|
|
26 python $dir/script_imgt.py --input $filename --ref $ref --output $output --id $id
|
|
27 else
|
|
28 python $dir/script_xlsx.py --input $current --ref $ref --output $output
|
|
29 fi
|
|
30 count=$((count+1))
|
|
31 done
|
|
32
|