Skip to content

Commit

Permalink
scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kyclark committed Jan 3, 2025
1 parent 80529fa commit 5aee176
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
27 changes: 27 additions & 0 deletions bench.sh
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions get_data.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5aee176

Please sign in to comment.