From 17eeea19ec55cee05928f264cd63e45125e0076c Mon Sep 17 00:00:00 2001
From: Veronique Legrand <vlegrand@pasteur.fr>
Date: Wed, 13 Jan 2021 12:31:39 +0100
Subject: [PATCH]  fixed 1 broken nrt test and added non regression tests for
 the multi cpu mode

---
 non-regression-tests/check_T4_class.py             | 4 ++--
 non-regression-tests/run_HK97_long_multiproc.sh    | 6 ++++++
 non-regression-tests/run_Lamda_long_multiproc.sh   | 6 ++++++
 non-regression-tests/run_P1_long_multiproc.sh      | 6 ++++++
 non-regression-tests/run_StaphN1_long_multiproc.sh | 6 ++++++
 non-regression-tests/run_T4_long_multiproc.sh      | 6 ++++++
 non-regression-tests/run_T7_long_multiproc.sh      | 6 ++++++
 non-regression-tests/run_nrt_long.sh               | 4 ++--
 non-regression-tests/run_nrt_long_multiproc.sh     | 9 +++++++++
 9 files changed, 49 insertions(+), 4 deletions(-)
 create mode 100644 non-regression-tests/run_HK97_long_multiproc.sh
 create mode 100644 non-regression-tests/run_Lamda_long_multiproc.sh
 create mode 100644 non-regression-tests/run_P1_long_multiproc.sh
 create mode 100644 non-regression-tests/run_StaphN1_long_multiproc.sh
 create mode 100644 non-regression-tests/run_T4_long_multiproc.sh
 create mode 100644 non-regression-tests/run_T7_long_multiproc.sh
 create mode 100644 non-regression-tests/run_nrt_long_multiproc.sh

diff --git a/non-regression-tests/check_T4_class.py b/non-regression-tests/check_T4_class.py
index 26c734c..aee0650 100644
--- a/non-regression-tests/check_T4_class.py
+++ b/non-regression-tests/check_T4_class.py
@@ -1,4 +1,4 @@
 from common import check_class
 
-ret=check_class("nrt.txt","UNKNOWN")
-exit(ret)
\ No newline at end of file
+ret=check_class("nrt.txt","-")
+exit(ret)
diff --git a/non-regression-tests/run_HK97_long_multiproc.sh b/non-regression-tests/run_HK97_long_multiproc.sh
new file mode 100644
index 0000000..8a59e5d
--- /dev/null
+++ b/non-regression-tests/run_HK97_long_multiproc.sh
@@ -0,0 +1,6 @@
+#/bin/bash
+DATA_PATH=./data
+
+echo "running PhageTerm on HK97 genome and a dataset with a minimum 50x coverage"
+python ../PhageTerm.py -c 4 -f "$DATA_PATH/R1_1M_READS_EACH_PHAGE(1).fastq.4" -p "$DATA_PATH/R2_1M_READS_EACH_PHAGE(1).fastq.4" -r $DATA_PATH/HK97_assembly.fasta --nrt
+python check_HK97_class.py
diff --git a/non-regression-tests/run_Lamda_long_multiproc.sh b/non-regression-tests/run_Lamda_long_multiproc.sh
new file mode 100644
index 0000000..ea68507
--- /dev/null
+++ b/non-regression-tests/run_Lamda_long_multiproc.sh
@@ -0,0 +1,6 @@
+#/bin/bash
+DATA_PATH=./data
+
+echo "running PhageTerm on Lamda genome and a dataset with a minimum 50x coverage"
+python ../PhageTerm.py -c 4 -f "$DATA_PATH/R1_1M_READS_EACH_PHAGE(1).fastq.4" -p "$DATA_PATH/R2_1M_READS_EACH_PHAGE(1).fastq.4" -r $DATA_PATH/Lambda_assembly.fasta --nrt
+python check_Lamda_class.py
diff --git a/non-regression-tests/run_P1_long_multiproc.sh b/non-regression-tests/run_P1_long_multiproc.sh
new file mode 100644
index 0000000..f86e687
--- /dev/null
+++ b/non-regression-tests/run_P1_long_multiproc.sh
@@ -0,0 +1,6 @@
+#/bin/bash
+DATA_PATH=./data
+
+echo "running PhageTerm on P1 genome and a dataset with a minimum 50x coverage"
+python ../PhageTerm.py -c 4 -f "$DATA_PATH/R1_1M_READS_EACH_PHAGE(1).fastq.4" -p "$DATA_PATH/R2_1M_READS_EACH_PHAGE(1).fastq.4" -r $DATA_PATH/P1_assembly.fasta --nrt
+python check_P1_class.py
diff --git a/non-regression-tests/run_StaphN1_long_multiproc.sh b/non-regression-tests/run_StaphN1_long_multiproc.sh
new file mode 100644
index 0000000..0a78f8e
--- /dev/null
+++ b/non-regression-tests/run_StaphN1_long_multiproc.sh
@@ -0,0 +1,6 @@
+#/bin/bash
+DATA_PATH=./data
+
+echo "running PhageTerm on Staph1N genome and a dataset with a minimum 50x coverage"
+python ../PhageTerm.py -c 4 --nrt -f "$DATA_PATH/R1_1M_READS_EACH_PHAGE(1).fastq.4" -p "$DATA_PATH/R2_1M_READS_EACH_PHAGE(1).fastq.4" -r $DATA_PATH/Staph1N_assembly.fasta
+python check_Staph1N_class.py
diff --git a/non-regression-tests/run_T4_long_multiproc.sh b/non-regression-tests/run_T4_long_multiproc.sh
new file mode 100644
index 0000000..2b304c6
--- /dev/null
+++ b/non-regression-tests/run_T4_long_multiproc.sh
@@ -0,0 +1,6 @@
+#/bin/bash
+DATA_PATH=./data
+
+echo "running PhageTerm on T4 genome and a dataset with a minimum 50x coverage"
+python ../PhageTerm.py -c 4 -f "$DATA_PATH/R1_1M_READS_EACH_PHAGE(1).fastq.4" -p "$DATA_PATH/R2_1M_READS_EACH_PHAGE(1).fastq.4" -r $DATA_PATH/T4_assembly.fasta --nrt
+python check_T4_class.py
diff --git a/non-regression-tests/run_T7_long_multiproc.sh b/non-regression-tests/run_T7_long_multiproc.sh
new file mode 100644
index 0000000..b3a8e14
--- /dev/null
+++ b/non-regression-tests/run_T7_long_multiproc.sh
@@ -0,0 +1,6 @@
+#/bin/bash
+DATA_PATH=./data
+
+echo "running PhageTerm on T7 genome and a dataset with a minimum 50x coverage"
+python ../PhageTerm.py -c 4 -f "$DATA_PATH/R1_1M_READS_EACH_PHAGE(1).fastq.4" -p "$DATA_PATH/R2_1M_READS_EACH_PHAGE(1).fastq.4" -r $DATA_PATH/T7_assembly.fasta --nrt
+python check_T7_class.py
diff --git a/non-regression-tests/run_nrt_long.sh b/non-regression-tests/run_nrt_long.sh
index 4f04b51..3df7eba 100755
--- a/non-regression-tests/run_nrt_long.sh
+++ b/non-regression-tests/run_nrt_long.sh
@@ -2,8 +2,8 @@
 ## VL: decided to write the checking of results in python scripts rather than shel script for portability.
 echo "running non regression tests (short version)"
 ./run_HK97_long.sh || exit 1
-./run_lamda_long.sh || exit 1
-./run_N1_long.sh || exit 1
+./run_Lamda_long.sh || exit 1
+./run_StaphN1_long.sh || exit 1
 ./run_P1_long.sh || exit 1
 ./run_T4_long.sh || exit 1
 ./run_T7_long.sh || exit 1
diff --git a/non-regression-tests/run_nrt_long_multiproc.sh b/non-regression-tests/run_nrt_long_multiproc.sh
new file mode 100644
index 0000000..b1138a2
--- /dev/null
+++ b/non-regression-tests/run_nrt_long_multiproc.sh
@@ -0,0 +1,9 @@
+#/bin/bash
+## VL: decided to write the checking of results in python scripts rather than shel script for portability.
+echo "running non regression tests (short version)"
+./run_HK97_long_multiproc.sh || exit 1
+./run_Lamda_long_multiproc.sh || exit 1
+./run_StaphN1_long_multiproc.sh || exit 1
+./run_P1_long_multiproc.sh || exit 1
+./run_T4_long_multiproc.sh || exit 1
+./run_T7_long_multiproc.sh || exit 1
-- 
GitLab