#!/bin/sh -e

pkgname=optimir

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
    AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkgname}-test.XXXXXX`
    trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi
cd $AUTOPKGTEST_TMP
cp -a /usr/share/doc/${pkgname}/examples/* $AUTOPKGTEST_TMP

DIR_OUT=results
VCF=genotypes.vcf

# Example 1
optimir process \
    --fq S1.fq.gz \
    --vcf genotypes.vcf

# Example all
optimir libprep \
       -v $VCF \
       -o $DIR_OUT

optimir process \
    --fq S1.fq.gz \
    --vcf $VCF \
    --gff_out \
    --dirOutput $DIR_OUT 

optimir process \
    --fq S2.fq.gz \
    --vcf $VCF \
    --gff_out \
    --dirOutput $DIR_OUT 

# Make summary files
optimir summarize \
    --dir $DIR_OUT/OptimiR_Results
