#!/bin/bash
#SBATCH -t 4:00:00
#SBATCH --nodes=1 --ntasks-per-node=1
#SBATCH --mem=24g
#SBATCH --export=NONE
#SBATCH --mail-user=alex_labossiere@uri.edu
#SBATCH --mail-type=BEGIN,END,FAIL

module load QIIME2/2019.7


tablein=/data/mramseylab/proc_reads/fil-nocontrol/table-filtered_NoControls.qza
clsdir=/data/mramseylab/classifiers/silva-taxonomy-AL.qza
metadir=/data/mramseylab/metadata/plaque_meta_2.tsv
filtdir=/data/mramseylab/proc_reads/
fil=taxon-filtered

#must make the directory you are filtering to 1st or else it will error
mkdir $filtdir$fil

qiime taxa filter-table \
  --i-table $tablein  \
  --i-taxonomy $clsdir \
  --p-mode contains \
  --p-exclude "Eukaryota"  \
  --o-filtered-table $filtdir$fil/taxon-filtered-table.qza


