changeset 2:fac36e2248fd draft

Uploaded
author davidvanzessen
date Wed, 23 Jul 2014 06:00:58 -0400
parents 85f18c2f74dd
children be17e1e7dc2b
files wrapper.sh
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wrapper.sh	Wed Jul 23 06:00:58 2014 -0400
@@ -0,0 +1,18 @@
+#!/bin/bash
+dir="$(cd "$(dirname "$0")" && pwd)"
+
+input=$1
+ref=$2
+output=$3
+f=$(file $input)
+zipType="Zip archive"
+if [[ "$f" == *"$zipType"* ]]
+then
+	echo "Zip archive, assuming IMGT output file"
+	echo "Trying: unzip $input -d $PWD/files/"
+	unzip $input -d $PWD/files/ > $PWD/unziplog.log
+	cat $PWD/files/*/2_* | cut -f2,4,7 > $PWD/gappednt.txt
+	python $dir/script_imgt.py --input $PWD/gappednt.txt --ref $ref --output $output
+else
+	python $dir/script_xlsx.py --input $input --ref $ref --output $output
+fi