Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
hasindu2008 committed Oct 4, 2023
1 parent 36c0fa7 commit bc469ff
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 12 deletions.
50 changes: 39 additions & 11 deletions test/test_extensive.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,52 @@
#!/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


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
Expand All @@ -36,14 +55,23 @@ 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
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
Expand Down
2 changes: 1 addition & 1 deletion test/test_qscore_split2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit bc469ff

Please sign in to comment.