#!/bin/bash
usage(){
echo "
Written by Brian Bushnell
Last modified July 31, 2018
Description: Stops producing reads when the unique kmer limit is reached.
This is approximate. If the input has been Clumpified, the order should be
randomized first with shuffle2.sh or sortbyname.sh with the flowcell flag.
Differences between versions:
kmerlimit.sh uses 1 pass and outputs all reads until a limit is hit,
meaning the input reads should be in random order with respect to sequence.
kmerlimit2.sh uses 2 passes and randomly subsamples from the file, so
it works with reads in any order.
Usage: kmerlimit.sh in= out=