From bc469ff88db83c9cc4f2976c0547c0fdc19365b1 Mon Sep 17 00:00:00 2001 From: Hasindu Gamaarachchi Date: Wed, 4 Oct 2023 15:48:45 +1100 Subject: [PATCH] update test --- test/test_extensive.sh | 50 +++++++++++++++++++++++++++++--------- test/test_qscore_split2.sh | 2 +- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/test/test_extensive.sh b/test/test_extensive.sh index 8baf5e8..583a9b5 100755 --- a/test/test_extensive.sh +++ b/test/test_extensive.sh @@ -1,22 +1,37 @@ #!/bin/bash +# MIT License + +# Copyright (c) 2023 Hasindu Gamaarachchi +# Copyright (c) 2023 James Ferguson + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + die() { echo "Error: $@" >&2 exit 1 } -instal_venv(){ - test -d ${PATH_TO_EEL_VENV} && rm -r ${PATH_TO_EEL_VENV} - python3.8 -m venv ${PATH_TO_EEL_VENV} || die "Failed to create venv" - source ${PATH_TO_EEL_VENV} || die "Failed to source ${PATH_TO_EEL_VENV}" - pip install --upgrade pip || die "Failed to upgrade pip" - pip install --upgrade setuptools wheel || die "Failed to upgrade setuptools" - python setup.py install || die "Failed to install buttery-eel" - deactivate -} CURRENT_GUPPY=$(grep "ont-pyguppy-client-lib" requirements.txt | cut -d "=" -f 3) test -z ${CURRENT_GUPPY} && die "ont-pyguppy-client-lib not found in requirements.txt" + export PATH_TO_GUPPY=/install/ont-guppy-${CURRENT_GUPPY}/bin/ export GUPPY_OUT_TMP=ont-guppy-tmp export EEL_OUT_TMP=buttery_eel_tmp.fastq @@ -24,10 +39,14 @@ export EEL_OUT_TMP=buttery_eel_tmp.fastq export PATH_TO_EEL_VENV=./venv3/bin/activate - export PATH_TO_IDENTITY=/install/biorand/bin/identitydna.sh export REFIDX=/genome/hg38noAlt.idx +echo "Installation" +test/test_install.sh || die "test failed" +echo "" +echo "********************************************************************" + echo "R9.4.1 DNA - FAST model - 20k reads" export PATH_TO_FAST5=/data/slow5-testdata/NA12878_prom_subsubsample/fast5/ export PATH_TO_BLOW5=/data/slow5-testdata/NA12878_prom_subsubsample/reads.blow5 @@ -36,7 +55,7 @@ test/test.sh || die "test failed" echo "" echo "********************************************************************" -echo "R10.4.1 DNA - HAC model - 20k reads - split qscore" +echo "R10.4.1 DNA - HAC model - 20k reads - split qscore inbuilt" export PATH_TO_FAST5=/data/slow5-testdata/hg2_prom_lsk114_subsubsample/fast5/ export PATH_TO_BLOW5=/data/slow5-testdata/hg2_prom_lsk114_subsubsample/reads.blow5 export MODEL=dna_r10.4.1_e8.2_400bps_hac_prom.cfg @@ -44,6 +63,15 @@ test/test_qscore_split.sh || die "test failed" echo "" echo "********************************************************************" +echo "R10.4.1 DNA - FAST model - 20k reads - split qscore script" +export PATH_TO_FAST5=/data/slow5-testdata/hg2_prom_lsk114_subsubsample/fast5/ +export PATH_TO_BLOW5=/data/slow5-testdata/hg2_prom_lsk114_subsubsample/reads.blow5 +export MODEL=dna_r10.4.1_e8.2_400bps_fast_prom.cfg +test/test_qscore_split2.sh || die "test failed" +echo "" +echo "********************************************************************" + + echo "split reads" export OPTS_GUPPY="--detect_mid_strand_adapter --trim_adapters --detect_adapter --do_read_splitting --trim_strategy dna" export OPTS_EEL=$OPTS_GUPPY diff --git a/test/test_qscore_split2.sh b/test/test_qscore_split2.sh index da88a45..ce23575 100755 --- a/test/test_qscore_split2.sh +++ b/test/test_qscore_split2.sh @@ -93,7 +93,7 @@ else echo "Memory usage is OK: $MEM" fi cat eel.log -/usr/bin/time -v python3 scripts/qscore_split.py ${EEL_OUT_TMP} reads -q 7 +/usr/bin/time -v python3 scripts/split_qscore.py ${EEL_OUT_TMP} reads -q 7 ${PATH_TO_IDENTITY} ${REFIDX} reads.pass.fastq | cut -f 2-> ${EEL_OUT_TMP}.identity