Skip to content

Commit

Permalink
Add me testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
cjw85 committed Mar 17, 2023
1 parent 9141ed1 commit a782df1
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions testing/run_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

if [ ! -d virus-zymo-kraken2 ]; then
echo " +++ Downloading database +++"
wget https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/misc/virus-zymo-kraken.tar.gz
tar -xzvf virus-zymo-kraken.tar.gz
else
echo " +++ Database downloaded previously +++"
fi

echo ""
if [ ! -d virus-zymo-kraken2.reads.fastq.gz ]; then
echo " +++ Downloading reads +++"
wget https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/misc/virus-zymo-kraken.reads.fastq.gz
else
echo " +++ Reads downloaded previously +++"
fi

echo ""
echo " +++ Starting a client before the server +++"
../build/client/kraken2_client --port 8080 --host-ip 127.0.0.1

echo ""
echo " +++ Starting server +++"
../build/server/kraken2_server --db virus-zymo-kraken2 --host-ip 127.0.0.1 --wait 2 &
sleep 5 # give database time to load

echo ""
echo " +++ Sending reads as stream +++"
../build/client/kraken2_client --report "kraken.stream.report" --sequence virus-zymo-kraken.reads.gz --port 8080 --host-ip 127.0.0.1 \
| sort -k 2 > client.stream.classifications.fasta.txt

echo ""
echo " +++ Shutting down server +++ "
../build/client/kraken2_client --port 8080 --shutdown

#trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT

0 comments on commit a782df1

Please sign in to comment.