comparison wrapper.sh @ 95:d63eff357515 draft

planemo upload commit d96a736dcd6da34137f79861fbc6369716c332f1
author rhpvorderman
date Mon, 27 Mar 2023 13:11:53 +0000
parents 84e9e5c8c101
children 385dea3c6cb5
comparison
equal deleted inserted replaced
94:84e9e5c8c101 95:d63eff357515
21 filter_unique=${17} 21 filter_unique=${17}
22 filter_unique_count=${18} 22 filter_unique_count=${18}
23 class_filter=${19} 23 class_filter=${19}
24 empty_region_filter=${20} 24 empty_region_filter=${20}
25 fast=${21} 25 fast=${21}
26 26 BASENAME=$(basename "$input")
27 BASENAME=$(basename $input) 27 # Cut off .txz or .tgz suffix and also replace spaces with underscores.
28 # Cut off .txz or .tgz suffix
29 NEW_IMGT_PREFIX="new_IMGT_${BASENAME%.*}" 28 NEW_IMGT_PREFIX="new_IMGT_${BASENAME%.*}"
29 NEW_IMGT_PREFIX=${NEW_IMGT_PREFIX// /_}
30 30
31 #exec 5> debug_output.txt 31 #exec 5> debug_output.txt
32 #BASH_XTRACEFD="5" 32 #BASH_XTRACEFD="5"
33 ## Busybox date does not support '+%s.%N'. So use a custom program. Can be 33 ## Busybox date does not support '+%s.%N'. So use a custom program. Can be
34 ## Compiled with cc -Os show_time_as_float.c -o show_time_as_float 34 ## Compiled with cc -Os show_time_as_float.c -o show_time_as_float
42 echo "---------------- read parameters ----------------" 42 echo "---------------- read parameters ----------------"
43 echo "---------------- read parameters ----------------<br />" > $log 43 echo "---------------- read parameters ----------------<br />" > $log
44 44
45 echo "unpacking IMGT file" 45 echo "unpacking IMGT file"
46 46
47 type="`file -L $input`" 47 type="$(file -L "$input")"
48 if [[ "$type" == *"Zip archive"* ]] ; then 48 if [[ "$type" == *"Zip archive"* ]] ; then
49 echo "Zip archive" 49 echo "Zip archive"
50 echo "unzip $input -d $PWD/files/" 50 echo "unzip $input -d $PWD/files/"
51 unzip $input -d $PWD/files/ 51 unzip "$input" -d $PWD/files/
52 elif [[ "$type" == *"XZ compressed data"* ]] ; then 52 elif [[ "$type" == *"XZ compressed data"* ]] ; then
53 echo "ZX archive" 53 echo "ZX archive"
54 echo "tar -xJf $input -C $PWD/files/" 54 echo "tar -xJf "$input" -C $PWD/files/"
55 mkdir -p "$PWD/files/$title" 55 mkdir -p "$PWD/files/$title"
56 tar -xJf $input -C "$PWD/files/$title" 56 tar -xJf "$input" -C "$PWD/files/$title"
57 else 57 else
58 echo "Unrecognized format $type" 58 echo "Unrecognized format $type"
59 echo "Unrecognized format $type" > $log 59 echo "Unrecognized format $type" > $log
60 exit 1 60 exit 1
61 fi 61 fi
110 ${empty_region_filter} 110 ${empty_region_filter}
111 111
112 echo "---------------- creating new IMGT zips ----------------" 112 echo "---------------- creating new IMGT zips ----------------"
113 echo "---------------- creating new IMGT zips ----------------<br />" >> $log 113 echo "---------------- creating new IMGT zips ----------------<br />" >> $log
114 114
115 python $dir/split_imgt_file.py --outdir $outdir $input $outdir/merged.txt \ 115 python $dir/split_imgt_file.py --outdir $outdir "$input" $outdir/merged.txt \
116 --prefix "${NEW_IMGT_PREFIX}" \ 116 --prefix "${NEW_IMGT_PREFIX}" \
117 - IGA IGA1 IGA2 IGG IGG1 IGG2 IGG3 IGG4 IGM IGE 117 - IGA IGA1 IGA2 IGG IGG1 IGG2 IGG3 IGG4 IGM IGE
118 118
119 119
120 echo "---------------- shm_csr.r ----------------" 120 echo "---------------- shm_csr.r ----------------"