Commit 3081743c authored by Carsten Kemena's avatar Carsten Kemena

added simple test

parent d421dafe
Pipeline #674 failed with stage
in 48 seconds
......@@ -10,5 +10,7 @@ test library:
- cmake -DCMAKE_BUILD_TYPE=Coverage -DWITH_UNIT_TEST=1 ..
- make -j 2
- make test
- cd ..
- gcovr -r . -e "libs" -e tests
- cd integrationTests
- ./runTests.sh
- cd ../..
- gcovr -r . -e "tests" -e "libs" -e tests
......@@ -2,6 +2,8 @@
Version 0.9.2-beta
- added manual
- changed RADIANT help message
- added very simple test
Version 0.9.1-beta
- change of database construction and thereby much smaller databases
......
PF16758 UL141 Domain CL0011.26
PF16374 CIF Family CL0125.15
PF16650 SPEG_u2 Disordered
PF15670 Spem1 Family
>PF16758
SPAPMLVAEGERVTVPCTVMIHQWPLAVIRATFCLSPPTERSVELVFNLSRGGEVVVPLE
EKLTESRLRGGVSYNFTDLHVAHLFSLTFRATASSAGVYECLLRNDSHALVLQRFVVLTH
LETLSWADEPCCTPPLGRHSQDRQIWSPTPWRLKHVDCGWSSQMGFRRNRFYIEPASIGD
GTEINIDAGEGEDEECWGPLCQPEEQPDRCWPVVRQY
>PF16374
EKSVTDFGGLENYKELTGGADPFALMTPVCGLSANNIFKLMTEKDVPIDPTSIEYLENTS
FAEHVNTLDSHKNYVVIVNDGRLGHKFLIDLPALTQGPRTAYIIQSDLGGGALPAVRVED
WISRRGSDPVSLDEL
>PF16650
PTVGQASPITSDEEYLSPLEEFPESGTPQHRPAMKLQPRAEHGAARGSPETTFKASP
>PF15670
MENQLWYDNVGCCNQHQEHLQDPEDLLLLLLGLIVLVNIGINVVTVMWHGLQNGLEKVIC
>PF16374-PF15670
EKSVTDFGGLENYKELTGGADPFALMTPVCGLSANNIFKLMTEKDVPIDPTSIEYLENTS
FAEHVNTLDSHKNYVVIVNDGRLGHKFLIDLPALTQGPRTAYIIQSDLGGGALPAVRVED
WISRRGSDPVSLDELMENQLWYDNVGCCNQHQEHLQDPEDLLLLLLGLIVLVNIGINVVTVMWHGLQNGLEKVIC
>PF16650-PF16374-PF16650
PTVGQASPITSDEEYLSPLEEFPESGTPQHRPAMKLQPRAEHGAARGSPETTFKASP
EKSVTDFGGLENYKELTGGADPFALMTPVCGLSANNIFKLMTEKDVPIDPTSIEYLENTS
FAEHVNTLDSHKNYVVIVNDGRLGHKFLIDLPALTQGPRTAYIIQSDLGGGALPAVRVED
WISRRGSDPVSLDEL
PTVGQASPITSDEEYLSPLEEFPESGTPQHRPAMKLQPRAEHGAARGSPETTFKASP
# RADIANT 0.9.2-beta
# RADIANT output format: 1.0
# run at Fri Nov 30 14:35:13 2018
#
# Options used:
#-----------------------------------------------------------------------------
# query file: /local/home/ckeme_01/projects/domainWorld/RADIANT/tests/integrationTests/data/query.fa
# database file: /local/home/ckeme_01/projects/domainWorld/RADIANT/tests/integrationTests/test_db
# translate: false
#-----------------------------------------------------------------------------
#
# <seq id> <match start> <match end> <hmm acc> <hmm name> <type> <clan>
PF16758 12 12 PF16758 UL141 Domain CL0011.26
PF16374 33 33 PF16374 CIF Family CL0125.15
PF16650 15 15 PF16650 SPEG_u2 Disordered No_clan
PF15670 10 10 PF15670 Spem1 Family No_clan
PF16374-PF15670 33 33 PF16374 CIF Family CL0125.15
PF16374-PF15670 144 144 PF15670 Spem1 Family No_clan
PF16650-PF16374-PF16650 15 15 PF16650 SPEG_u2 Disordered No_clan
PF16650-PF16374-PF16650 90 90 PF16374 CIF Family CL0125.15
PF16650-PF16374-PF16650 207 207 PF16650 SPEG_u2 Disordered No_clan
This diff is collapsed.
#!/usr/bin/env bats
@test "simple_run"
{
@test "simple_run" {
# create database containing 3 domains.
mkdir -p test_db
}
@test "make DB Test" {
# database based on pfam annotation files
run ../../build/makeRadsDB -i ../data/db_pfam.dom -s ../data/db_seqs.fa -o annotation
[ $status == 0 ]
echo $output
[ "$output" == $'Number of sequences included: 8\nNumber of distinct arrangements 7' ]
rm annotation.db annotation.da
# database based on interpro file
run ../../build/makeRadsDB -I ../data/match_small.xml -o interPro -d PFAM
[ $status == 0 ]
[ "$output" == $'Number of sequences included: 10\nNumber of distinct arrangements 9' ]
}
@test "run RADS Test" {
run ../../build/rads -d interPro -Q ../data/query_seqs.fa -o testQuerySeq.txt -m pfam-31.dsm
[ $status == 0 ]
run diff <(grep -v '#' testQuerySeq.txt) <(grep -v '#' results/testQuerySeqRes.txt)
cp data/info.txt test_db
run ../../build/makeRadiantDB -i data/test_db_seqs.fa -o test_db
[ $status == 0 ]
# check if all parameter works
#run ../../build/rads -D PF00733 PF13537 -a -m pfam-31.dsm -d interPro
#[ $status == 0 ]
#[ "$output" == $'# RADS version 2.1.0\n# RADS Output v1\n# ********************************\n\n# -------------------------------------------------------------------\nResults for: manual entered query\nDomain arrangement: PF00733 PF13537\n\n# score | normalized | SeqID | sequence length | domain arrangement\n# -------------------------------------------------------------------\n200 1.00 A0A004 645 PF00733 240 626 PF13537 49 162' ]
run ../../build/rads -D PF00733 PF13537 -m pfam-31.dsm -d interPro -o test1Res.txt
# run radiant. It should
run ../../build/radiant -i data/query.fa -d test_db -o out.txt
[ $status == 0 ]
run diff <(grep -v '#' test1Res.txt) <(grep -v '#' results/test1Res.txt)
run diff <(grep -v '#' out.txt) <(grep -v '#' data/radiant_result.txt)
[ $status == 0 ]
run ../../build/rads -h
[ $status == 0 ]
rm test1Res.txt testQuerySeq.txt
rm interPro.db interPro.da
rm out.txt
rm test_db/forward.db
rm test_db/reverse.db
rm test_db/info.txt
rmdir test_db
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment