view wrapper.sh @ 5:048f8cdbb6d2 draft default tip

Uploaded
author davidvanzessen
date Thu, 07 Aug 2014 10:19:53 -0400
parents fac36e2248fd
children
line wrap: on
line source

#!/bin/bash
dir="$(cd "$(dirname "$0")" && pwd)"

input=$1
ids=$2
ref=$3
output=$4

input=($input)

ids=($ids)

first="${input[0]}"

count=0
for current in ${input[@]}
do
	f=$(file $current)
	zipType="Zip archive"
	if [[ "$f" == *"$zipType"* ]]
	then
		id=${ids[$count]}
		unzip $current -d $PWD/$id/ >> $PWD/unziplog.log
		filename="$PWD/gappednt_${id}.txt"
		cat $PWD/$id/*/2_* | cut -f2,4,7 > $filename
		python $dir/script_imgt.py --input $filename --ref $ref --output $output --id $id
	else
		python $dir/script_xlsx.py --input $current --ref $ref --output $output
	fi
	count=$((count+1))
done