Skip to content

Commit

Permalink
[TESTS] Added tests for fixed position mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Vanhems committed Jun 28, 2017
1 parent ebcd4c2 commit 0a5100e
Show file tree
Hide file tree
Showing 21 changed files with 80 additions and 10 deletions.
38 changes: 28 additions & 10 deletions scripts/run_tests.sh
Expand Up @@ -7,6 +7,9 @@ if [ "$TRAVIS_BRANCH" = "unstable" ]; then
YELLOW='\033[1;33m'
NC='\033[0m' # No Color

CHECK_MARK='\u2714'
CROSS='\u2716'

TEST_DIR='test'

DATASETS=''
Expand All @@ -27,24 +30,39 @@ if [ "$TRAVIS_BRANCH" = "unstable" ]; then

for DATASET in $DATASETS
do
echo -e "Testing ChIP-Seq mode on $DATASET with -l 6 -d 6..."
echo -e "Now testing with $DATASET dataset :"
echo -e "\t Testing ChIP-Seq mode with parameters -l 6, -d 6..."
bin/dinamo -pf $TEST_DIR/$DATASET/$SIG_FILE -nf $TEST_DIR/$DATASET/$CTRL_FILE -l 6 -d 6 -o temp.meme --no-log > /dev/null
diff temp.meme $TEST_DIR/$DATASET/dinamo_6_6.meme
diff temp.meme $TEST_DIR/$DATASET/chipseq_6_6.meme
if [ $? -ne 0 ]; then
echo -e "${RED}\u2716${NC} Test failed; the program did not output the expected file." >&2
echo -e "${RED}${CROSS}${NC}\t Test failed; the program did not output the expected file." >&2
exit 1
else
echo -e "${GREEN}\u2714${NC} Test passed, no difference found."
fi
echo -e "Testing ChIP-Seq mode on $DATASET with -l 7 -d 3..."

echo -e "\t Testing ChIP-Seq mode with parameters -l 7, -d 3..."
bin/dinamo -pf $TEST_DIR/$DATASET/$SIG_FILE -nf $TEST_DIR/$DATASET/$CTRL_FILE -l 7 -d 3 -o temp.meme --no-log > /dev/null
diff temp.meme $TEST_DIR/$DATASET/dinamo_7_3.meme
diff temp.meme $TEST_DIR/$DATASET/chipseq_7_3.meme
if [ $? -ne 0 ]; then
echo -e "${RED}${CROSS}${NC}\t Test failed; the program did not output the expected file." >&2
exit 1
fi

echo -e "\t Testing fixed position mode with parameters -l 5, -d 5, -p 1..."
bin/dinamo -pf $TEST_DIR/$DATASET/$SIG_FILE -nf $TEST_DIR/$DATASET/$CTRL_FILE -l 5 -d 5 -p 1 --no-log > temp.res
diff temp.res $TEST_DIR/$DATASET/position_5_5_1.results
if [ $? -ne 0 ]; then
echo -e "${RED}${CROSS}${NC}\t Test failed; the program did not output the expected file." >&2
exit 1
fi

echo -e "\t Testing fixed position mode with parameters -l 7, -d 7, -p 4..."
bin/dinamo -pf $TEST_DIR/$DATASET/$SIG_FILE -nf $TEST_DIR/$DATASET/$CTRL_FILE -l 7 -d 7 -p 4 --no-log > temp.res
diff temp.res $TEST_DIR/$DATASET/position_7_7_4.results
if [ $? -ne 0 ]; then
echo -e "${RED}\u2716${NC} Test failed; the program did not output the expected file." >&2
echo -e "${RED}${CROSS}${NC}\t Test failed; the program did not output the expected file." >&2
exit 1
else
echo -e "${GREEN}\u2714${NC} Test passed, no difference found."
fi
echo -e "${GREEN}$DATASET tests were successful !${NC}\n"
done
rm temp.meme
fi
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions test/GATA1/position_5_5_1.results
@@ -0,0 +1,11 @@
TRTMT 0.000784359 9.02951e-09
TTATC 0.000740922 2.77145e-08
SABDT 0.000706795 4.7412e-08
MTWMS 0.000604805 3.80063e-07
AWMKS 0.000497683 3.58583e-06
GAWAM 0.000489729 3.95898e-06
CGWWC 0.000429908 1.78215e-05
YSHGK 0.000394575 3.2372e-05
TAARR 0.000390321 3.17489e-05
DGATA 0.000375483 4.35234e-05
RBTTC 0.000334822 0.000105883
21 changes: 21 additions & 0 deletions test/GATA1/position_7_7_4.results
@@ -0,0 +1,21 @@
TATCTYN 0.00104601 2.28838e-10
WGATAAD 0.000859056 2.75432e-09
GATAARV 0.000771244 1.8068e-08
HRGATAA 0.000766921 5.90338e-08
GTTWKCW 0.000732043 1.18162e-07
KGTGTGY 0.00064512 2.28604e-07
DVWGATA 0.000615284 2.96069e-07
AWCTBHT 0.000591023 5.25569e-07
RSAGASM 0.000586447 5.3972e-07
DGSAGAD 0.000566435 8.00798e-07
BTGTGAW 0.000557677 3.79441e-06
TTTDYCY 0.000553209 1.19769e-06
CMGCCMY 0.000537669 1.71144e-06
WCYSCAG 0.000526032 2.30018e-06
TTATCHD 0.000526032 2.30018e-06
BBTTATC 0.000509984 2.72457e-06
SWGTGTG 0.000490504 5.20283e-06
CMYKCCC 0.000490504 5.20283e-06
NTNCTGC 0.00047457 5.44486e-06
TVTMWGG 0.000453519 9.55703e-06
AKRHAGA 0.000438369 1.17474e-05
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions test/KLF1/position_5_5_1.results
@@ -0,0 +1,3 @@
DGVCT 0.00764463 3.62914e-06
CTKRG 0.0058509 0.000117103
ATYTN 0.00530804 8.11278e-05
Empty file.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions test/OCT4/position_5_5_1.results
@@ -0,0 +1,3 @@
NAVAS 0.00144518 4.22802e-05
RGBKK 0.00136627 6.52865e-05
WBAMM 0.00131651 8.49527e-05
Empty file.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions test/SOX2/position_5_5_1.results
@@ -0,0 +1,4 @@
TKMMT 0.00225815 3.96009e-08
KCTSW 0.00127471 2.47546e-05
HCYRG 0.00108893 8.63835e-05
GTGDC 0.00108221 9.38448e-05
2 changes: 2 additions & 0 deletions test/SOX2/position_7_7_4.results
@@ -0,0 +1,2 @@
TDGYTTT 0.00165908 7.51544e-06
ASAATRR 0.00154835 1.50575e-05
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions test/STAT3/position_5_5_1.results
@@ -0,0 +1,8 @@
GGMVG 0.00275042 4.21755e-06
WMATG 0.00244788 1.94292e-05
TGGCB 0.00244788 1.94292e-05
YATTM 0.00236065 5.99516e-05
CWKCB 0.00223765 2.74031e-05
CGCSC 0.00216362 0.000120211
TTYCN 0.00206351 5.22957e-05
MHACA 0.00192369 9.07739e-05
Empty file.

0 comments on commit 0a5100e

Please sign in to comment.