#!/bin/bash

min_k=$1
max_k=$2
input=$3
args=$#
if [$args -gt 3]; then
	velvetoptions=$4
	oasesoptions=$5
else
	velvetoptions=''
	oasesoptions=''
fi

for i in `seq $min_k 2 $max_k`
do
     velveth . $i $input
     velvetg . -read_trkg yes 
     oases . $oasesoptions
     mv transcripts.fa transcripts_$i.fa 
done

velveth . $max_k -long transcripts_*.fa $input 
velvetg . -read_trkg yes $velvetoptions 
oases . -amos_file yes -unused_reads yes $oasesoptions 

