Commit 49014850 authored by Mathieu Giraud's avatar Mathieu Giraud

tests: 'seq-delta-min-padded', as the previous 'seq-delta-min'

New sequence with the samed tested behaviour than 'seq-delta-min' before b8a413c1
Thanks to @mikael-s
parent 80ff1083
......@@ -213,6 +213,14 @@ void testSegmentationCause() {
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "delta-min: " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == UNSEG_AMBIGUOUS, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
nb_checked++;
} else if (data.read(i).label == "seq-delta-min-padded") {
// This one has enough k-mers to be segmented
TAP_TEST(ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "delta-min: " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == SEG_PLUS, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
TAP_TEST(ks.getJunction(21) == "GGCAGTTGGAACAACACTTGT",
TEST_KMER_JUNCTION, "window: " << ks.getJunction(21));
TAP_TEST(ks.getLeft() == 69, TEST_KMER_LEFT, "left = " << ks.getLeft() << ", " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getRight() == 79, TEST_KMER_RIGHT, "right = " << ks.getRight() << ", " << ks.getInfoLineWithAffects());
} else if (data.read(i).label == "seq-seg-no-window") {
TAP_TEST(ks.isSegmented(), TEST_KMER_IS_SEGMENTED, ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == SEG_PLUS, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
......@@ -254,9 +262,9 @@ void testExtractor() {
WindowsStorage *ws = we.extract(&data, 30, labels);
// we.out_stats(cout);
TAP_TEST(we.getNbReads() == 14, TEST_EXTRACTOR_NB_READS, "");
TAP_TEST(we.getNbReads() == 15, TEST_EXTRACTOR_NB_READS, "");
TAP_TEST(we.getNbSegmented(SEG_PLUS) == 1, TEST_EXTRACTOR_NB_SEGMENTED, "segPlus: " << we.getNbSegmented(SEG_PLUS));
TAP_TEST(we.getNbSegmented(SEG_PLUS) == 2, TEST_EXTRACTOR_NB_SEGMENTED, "segPlus: " << we.getNbSegmented(SEG_PLUS));
TAP_TEST(we.getNbSegmented(SEG_MINUS) == 1, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_TOO_SHORT) == 1, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_STRAND_NOT_CONSISTENT) == 1, TEST_EXTRACTOR_NB_SEGMENTED, "");
......@@ -266,9 +274,9 @@ void testExtractor() {
TAP_TEST(we.getNbSegmented(UNSEG_BAD_DELTA_MIN) == 0, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_AMBIGUOUS) == 2, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_TOO_SHORT_FOR_WINDOW) == 1, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(TOTAL_SEG_AND_WINDOW) == 2, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(TOTAL_SEG_AND_WINDOW) == 3, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getAverageSegmentationLength(SEG_PLUS) == 36, TEST_EXTRACTOR_AVG_LENGTH, "average: " << we.getAverageSegmentationLength(SEG_PLUS));
TAP_TEST(we.getAverageSegmentationLength(SEG_PLUS) == 88.5, TEST_EXTRACTOR_AVG_LENGTH, "average: " << we.getAverageSegmentationLength(SEG_PLUS));
TAP_TEST(we.getAverageSegmentationLength(SEG_MINUS) == 36, TEST_EXTRACTOR_AVG_LENGTH, "");
TAP_TEST(we.getAverageSegmentationLength(UNSEG_TOO_SHORT) == 4, TEST_EXTRACTOR_AVG_LENGTH, "");
TAP_TEST(we.getAverageSegmentationLength(UNSEG_STRAND_NOT_CONSISTENT) == 36, TEST_EXTRACTOR_AVG_LENGTH, "");
......@@ -277,7 +285,7 @@ void testExtractor() {
TAP_TEST(we.getAverageSegmentationLength(UNSEG_TOO_FEW_J) == 48, TEST_EXTRACTOR_AVG_LENGTH, "average: " << we.getAverageSegmentationLength(UNSEG_TOO_FEW_J));
TAP_TEST(we.getAverageSegmentationLength(UNSEG_AMBIGUOUS) == 52.5, TEST_EXTRACTOR_AVG_LENGTH, "average: " << we.getAverageSegmentationLength(UNSEG_AMBIGUOUS));
TAP_TEST(we.getAverageSegmentationLength(UNSEG_TOO_SHORT_FOR_WINDOW) == 24, TEST_EXTRACTOR_AVG_LENGTH, "average: " << we.getAverageSegmentationLength(UNSEG_TOO_SHORT_FOR_WINDOW));
TAP_TEST(we.getAverageSegmentationLength(TOTAL_SEG_AND_WINDOW) == 36, TEST_EXTRACTOR_AVG_LENGTH, "average: " << we.getAverageSegmentationLength(TOTAL_SEG_AND_WINDOW));
TAP_TEST(we.getAverageSegmentationLength(TOTAL_SEG_AND_WINDOW) == 71, TEST_EXTRACTOR_AVG_LENGTH, "average: " << we.getAverageSegmentationLength(TOTAL_SEG_AND_WINDOW));
TAP_TEST(out_seg.tellp() > 0, TEST_EXTRACTOR_OUT_SEG, "");
TAP_TEST(out_unseg.tellp() > 0, TEST_EXTRACTOR_OUT_UNSEG, "");
......
......@@ -30,5 +30,11 @@ tgtgccacctgggacaggGAATTATTATAAGAAACTtgtgccacctgggacaggGAATTATTATAAGAAACT
#VVVVVVVVVJJJJJJJJJJJJJJ # contiguous 10-mer
cttgggcagttggaacaacACTTGTTGTCACAG
>seq-delta-min-padded
# seq-delta-min padded with some V and some J
tcttccaacttggaagggagaacgaagtcagtcaccaggctgactgggtcatctgctgaa
cttgggcagttggaacaacACTTGTTGTCACAG
gaattattataagaaactctttggcagtggaacaacactggttgtcac
>seq-seg-no-window
acctgggacaggGAATTATTATAA
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