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

input=$1
type=$2
cloned=$3
output=$4

cp $input $PWD/input.tab #file has to have a ".tab" extension

if [ "true" == "$cloned" ] ; then
	cloned="--cloned"
else
	cloned=""
fi

mkdir $PWD/outdir

/home/galaxy/anaconda3/bin/python $dir/CreateGermlines.py -d $PWD/input.tab -r $dir/IMGT_Human_IGH[VDJ].fasta --outdir $PWD/outdir --outname output -g $type $cloned
#/data/users/david/anaconda3/bin/python $dir/CreateGermlines.py -d $PWD/input.tab -r $dir/IMGT_Human_IGH[VDJ].fasta --outdir $PWD/outdir --outname output -g $type $cloned

mv $PWD/outdir/output_germ-pass.tab $output
