diff --git a/bench.sh b/bench.sh new file mode 100755 index 0000000..d329e65 --- /dev/null +++ b/bench.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -uex + +CWD=$(pwd) +TIME="/usr/bin/time -v" +CHR1_FASTA="/xdisk/twheeler/data/genomes/human/t2t/chr1.fa" +CHR1_TXT="/xdisk/twheeler/data/genomes/human/t2t/chr1.txt" +UNIPROT_FASTA="/xdisk/twheeler/data/uniprot/uniprot_sprot.2024_06.fasta" +UNIPROT_TXT="/xdisk/twheeler/data/uniprot/uniprot_sprot.2024_06.txt" +TREMBL_FASTA="/xdisk/twheeler/data/uniprot/uniprot_trembl.2024_06.fasta" +TREMBL_TXT="/xdisk/twheeler/data/uniprot/uniprot_trembl.2024_06.txt" + +cd "$CWD/libdivsufsort" +for FILE in "$CHR1_TXT" "$UNIPROT_TXT" "$TREMBL_TXT"; do + BASENAME=$(basename "$FILE") + $TIME ./examples/mksary "$FILE" "$BASENAME.out" +done + +cd "$CWD/caps_sa" +for THREADS in 1 8 16; do + export PARLAY_NUM_THREADS=$THREADS + for FILE in "$CHR1_FASTA" "$UNIPROT_FASTA" "$TREMBL_FASTA"; do + BASENAME=$(basename "$FILE") + $TIME ./build/src/caps_sa "$FILE" "$BASENAME.out" + done +done diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..b731e8d --- /dev/null +++ b/build.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -u + +if [[ ! -d libdivsufsort ]]; then + git clone https://github.com/y-256/libdivsufsort.git + cd libdivsufsort + cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" + make +fi + +if [[ ! -d caps_sa ]]; then + git clone https://github.com/jamshed/CaPS-SA.git caps_sa + cd caps_sa + [[ ! -d build ]] && mkdir build + cd build/ + cmake -DCMAKE_INSTALL_PREFIX=../ .. + make +fi + +#[[ ! -f libsais-2.8.6.tgz ]] && wget -O libsais-2.8.6.tgz https://github.com/IlyaGrebnov/libsais/archive/refs/tags/v2.8.6.tar.gz +#if [[ ! -d libsais-2.8.6 ]]; then +# tar xvf libsais-2.8.6.tgz +# cd libsais-2.8.6 +# cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" +# make install +#fi diff --git a/get_data.sh b/get_data.sh new file mode 100755 index 0000000..2bdf1f9 --- /dev/null +++ b/get_data.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +OUTDIR="data" +[[ ! -d "$OUTDIR" ]] && mkdir -p "$OUTDIR" +cd "$OUTDIR" + +wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/405/GCF_000001405.26_GRCh38/GCF_000001405.26_GRCh38_genomic.fna.gz + +wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/914/755/GCF_009914755.1_T2T-CHM13v2.0/GCF_009914755.1_T2T-CHM13v2.0_genomic.fna.gz