#!/bin/bash

echo $@

filetype=$1
input=$2
pctIdent=$3
label=0$(bc <<< "scale=2; 1-$pctIdent")
output=$4
pngOutput=$5

## use Mothur rarefaction.single to calculate rarefaction
mothur "#rarefaction.single($filetype=$input, label=$label)" 2>1

## get filename only remove the extension and copy to galaxy output file
file="${input%.*}"
echo `cp $file.rarefaction $output`
