#!/bin/bash

# Quality filter
$usearch -fastq_filter ex_min_reads.fq -fastq_maxee 1.0 \
  -relabel Filt -fastaout filtered.fa

# Find unique read sequences and abundances
$usearch -fastx_uniques filtered.fa -sizeout -relabel Uniq -fastaout uniques.fa

# Make 97% OTUs and filter chimeras
$usearch -cluster_otus uniques.fa -otus otus.fa -relabel Otu
