Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
telatin committed Dec 21, 2022
1 parent 8e82573 commit 8e260f6
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions test/test-tab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,48 @@ fi


## FASTA SE
FA_LINES=$(getnumber $("$BINDIR"/seqfu tabulate "$FILES"/comments.fasta | SEQFU_QUIET=1 "$BINDIR"/seqfu tabulate -d | wc -l))
FA_LINES=$(getnumber "$("$BINDIR"/seqfu tabulate "$FILES"/comments.fasta | SEQFU_QUIET=1 "$BINDIR"/seqfu tabulate -d | wc -l)")

if [[ $FA_LINES == "8" ]]; then
echo -e "$OK: FASTA output format: $FA_LINES"
PASS=$((PASS+1))
else
echo -e "$FAIL: FASTA output format: 8 expected, got $FA_LINES"
ERRORS=$((ERRORS+1))
fi
fi

## Pair end?

TEMPORARY_DIR=$(mktemp -d)
"$BINDIR"/seqfu tabulate -i "$FILES"/interleaved.fq.gz > "$TEMPORARY_DIR"/interleaved.tabcheck
EXP=8
GOT=$(getnumber "$("$BINDIR"/fu-tabcheck "$TEMPORARY_DIR"/interleaved.tabcheck | cut -f 3)")
if [[ $GOT == "$EXP" ]]; then
echo -e "$OK: Tabulated file has $EXP columns: $GOT"
PASS=$((PASS+1))
else
echo -e "$FAIL: Tabulated file has not $EXP columns: $GOT"
ERRORS=$((ERRORS+1))
fi

"$BINDIR"/seqfu tabulate -d "$TEMPORARY_DIR"/interleaved.tabcheck| "$BINDIR"/seqfu deinterleave -o "$TEMPORARY_DIR"/dei -
EXP=7
GOT=$(getnumber "$("$BINDIR"/seqfu cnt -u "$TEMPORARY_DIR"/dei_R1.fq | cut -f 2)")
if [[ $GOT == "$EXP" ]]; then
echo -e "$OK: Deinterleaved detabulated has $EXP R1 reads: $GOT"
PASS=$((PASS+1))
else
echo -e "$FAIL: Deinterleaved detabulated has not $EXP R1 reads: $GOT"
ERRORS=$((ERRORS+1))
fi

GOT=$(getnumber "$("$BINDIR"/seqfu cnt -u "$TEMPORARY_DIR"/dei_R2.fq | cut -f 2)")
if [[ $GOT == "$EXP" ]]; then
echo -e "$OK: Deinterleaved detabulated has $EXP R2 reads: $GOT"
PASS=$((PASS+1))
else
echo -e "$FAIL: Deinterleaved detabulated has not $EXP R2 reads: $GOT"
ERRORS=$((ERRORS+1))
fi
rm -rf "$TEMPORARY_DIR"

0 comments on commit 8e260f6

Please sign in to comment.