comparison imgt_loader/imgt_loader.sh @ 2:d8d61e65dfd5 draft

Uploaded
author davidvanzessen
date Thu, 23 Jul 2015 10:29:44 -0400
parents f90fbc15b35a
children
comparison
equal deleted inserted replaced
1:c06d0df9ec44 2:d8d61e65dfd5
9 tarType="tar archive" 9 tarType="tar archive"
10 bzip2Type="bzip2 compressed" 10 bzip2Type="bzip2 compressed"
11 gzipType="gzip compressed" 11 gzipType="gzip compressed"
12 zipType="Zip archive" 12 zipType="Zip archive"
13 rarType="RAR archive" 13 rarType="RAR archive"
14 zxType="XZ compressed data"
14 15
15 if [[ "$f" == *"$zip7Type"* ]]; then 16 if [[ "$f" == *"$zip7Type"* ]]; then
16 echo "7-zip" 17 echo "7-zip"
17 echo "Trying: 7za e $input -o$PWD/files/" 18 echo "Trying: 7za e $input -o$PWD/files/"
18 7za e $input -o$PWD/$name/files 19 7za e $input -o$PWD/$name/files
20 21
21 if [[ "$f" == *"$tarType"* ]] 22 if [[ "$f" == *"$tarType"* ]]
22 then 23 then
23 echo "tar archive" 24 echo "tar archive"
24 echo "Trying: tar xvf $input -C $PWD/files/" 25 echo "Trying: tar xvf $input -C $PWD/files/"
25 tar xvf $input -C $PWD/$name/files 26 tar -xvf $input -C $PWD/$name/files
26 fi 27 fi
27 28
28 if [[ "$f" == *"$bzip2Type"* ]] 29 if [[ "$f" == *"$bzip2Type"* ]]
29 then 30 then
30 echo "bzip2 compressed data" 31 echo "bzip2 compressed data"
31 echo "Trying: tar jxf $input -C $PWD/files/" 32 echo "Trying: tar jxf $input -C $PWD/files/"
32 tar jxf $input -C $PWD/$name/files 33 tar -jxf $input -C $PWD/$name/files
33 fi 34 fi
34 35
35 if [[ "$f" == *"$gzipType"* ]] 36 if [[ "$f" == *"$gzipType"* ]]
36 then 37 then
37 echo "gzip compressed data" 38 echo "gzip compressed data"
38 echo "Trying: tar xvzf $input -C $PWD/files/" 39 echo "Trying: tar xvzf $input -C $PWD/files/"
39 tar xvzf $input -C $PWD/$name/files 40 tar -xvzf $input -C $PWD/$name/files
40 fi 41 fi
41 42
42 if [[ "$f" == *"$zipType"* ]] 43 if [[ "$f" == *"$zipType"* ]]
43 then 44 then
44 echo "Zip archive" 45 echo "Zip archive"
50 then 51 then
51 echo "RAR archive" 52 echo "RAR archive"
52 echo "Trying: unrar e $input $PWD/files/" 53 echo "Trying: unrar e $input $PWD/files/"
53 unrar e $input $PWD/$name/files 54 unrar e $input $PWD/$name/files
54 fi 55 fi
56
57 if [[ "$f" == *"$zxType"* ]]
58 then
59 echo "xz compressed data"
60 echo "Trying: tar -xJf $input -C $PWD/files/"
61 tar xJf $input -C $PWD/$name/files
62 fi
55 find $PWD/$name/files -iname "1_*" -exec cat {} + > $PWD/$name/summ.txt 63 find $PWD/$name/files -iname "1_*" -exec cat {} + > $PWD/$name/summ.txt
56 find $PWD/$name/files -iname "5_*" -exec cat {} + > $PWD/$name/aa.txt 64 find $PWD/$name/files -iname "5_*" -exec cat {} + > $PWD/$name/aa.txt
57 find $PWD/$name/files -iname "6_*" -exec cat {} + > $PWD/$name/junction.txt 65 find $PWD/$name/files -iname "6_*" -exec cat {} + > $PWD/$name/junction.txt
58 66
59 python $dir/imgt_loader.py --summ $PWD/$name/summ.txt --aa $PWD/$name/aa.txt --junction $PWD/$name/junction.txt --output $output 67 python $dir/imgt_loader.py --summ $PWD/$name/summ.txt --aa $PWD/$name/aa.txt --junction $PWD/$name/junction.txt --output $output