-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |