| 1 | #!/bin/bash |
| 2 | |
| 3 | usage(){ |
| 4 | echo " |
| 5 | Written by Brian Bushnell |
| 6 | Last modified November 17, 2019 |
| 7 | |
| 8 | Description: Runs SendSketch at various taxonomic levels |
| 9 | for sensitivity analysis. |
| 10 | |
| 11 | Usage: sketchtest.sh <file> <taxid> <db> <optional extra flag> |
| 12 | " |
| 13 | } |
| 14 | |
| 15 | if [ -z "$1" ] || [ -z "$2" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then |
| 16 | usage |
| 17 | exit |
| 18 | fi |
| 19 | |
| 20 | QUERY=$1 |
| 21 | TID=$2 |
| 22 | DB=$3 |
| 23 | EXTRA=$4 |
| 24 | EXTRA2=$5 |
| 25 | |
| 26 | echo "" |
| 27 | |
| 28 | echo "********** Strain **********" |
| 29 | |
| 30 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID $EXTRA $EXTRA2 |
| 31 | |
| 32 | echo "********** Species **********" |
| 33 | |
| 34 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID includelevel=species exclude=$TID excludelevel=strain $EXTRA $EXTRA2 |
| 35 | |
| 36 | echo "********** Genus **********" |
| 37 | |
| 38 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID includelevel=genus exclude=$TID excludelevel=species $EXTRA $EXTRA2 |
| 39 | |
| 40 | echo "********** Family **********" |
| 41 | |
| 42 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID includelevel=family exclude=$TID excludelevel=genus $EXTRA $EXTRA2 |
| 43 | |
| 44 | echo "********** Order **********" |
| 45 | |
| 46 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID includelevel=order exclude=$TID excludelevel=family $EXTRA $EXTRA2 |
| 47 | |
| 48 | echo "********** Class **********" |
| 49 | |
| 50 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID includelevel=class exclude=$TID excludelevel=order $EXTRA $EXTRA2 |
| 51 | |
| 52 | echo "********** Phylum **********" |
| 53 | |
| 54 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID includelevel=phylum exclude=$TID excludelevel=class $EXTRA $EXTRA2 |
| 55 | |
| 56 | echo "********** Superkingdom **********" |
| 57 | |
| 58 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID includelevel=superkingdom exclude=$TID excludelevel=phylum $EXTRA $EXTRA2 |
| 59 | |
| 60 | echo "********** Life **********" |
| 61 | |
| 62 | sendsketch.sh $QUERY $DB -Xmx1g colors=f records=1 minhits=1 silent banunclassified printcommonancestorlevel tid=$TID include=$TID includelevel=life exclude=$TID excludelevel=superkingdom $EXTRA $EXTRA2 |
| 63 | |
| 64 | echo "" |