#!/bin/bash

# echo $@

OUTPUT=$1
shift
VCF=$1
shift
REF=$1
shift
ONLYGOOD=$1
shift
FILTERS=$@

FILTERS=$(echo -n $FILTERS | sed 's/ /,/g')

CMD="phenix.py filter_vcf --vcf $VCF --filters $FILTERS --output $OUTPUT --reference $REF"

if [ $ONLYGOOD != "NOTTHERE" ]; then
    CMD="$CMD --only-good"
fi

echo "CMD: "$CMD
eval $CMD
