Commit d2147583 authored by Mathieu Giraud's avatar Mathieu Giraud

tests: tests UNSEG_TOO_FEW_{V,J} also on negative strand

parent 9b1f8f55
......@@ -153,19 +153,27 @@ void testSegmentationCause() {
TAP_TEST(ks.getSegmentationStatus() == UNSEG_TOO_FEW_ZERO, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
nb_checked++;
} else if (data.read(i).label == "seq-fewV") {
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, ks.getInfoLineWithAffects());
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "fewV: " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == UNSEG_TOO_FEW_V, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
nb_checked++;
} else if (data.read(i).label == "seq-fewJ") {
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "fewJ: " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == UNSEG_TOO_FEW_J, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
nb_checked++;
} else if (data.read(i).label == "seq-fewV-rc") {
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "fewV-rc: " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == UNSEG_TOO_FEW_V, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
nb_checked++;
} else if (data.read(i).label == "seq-fewJ-rc") {
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "fewJ-rc: " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == UNSEG_TOO_FEW_J, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
nb_checked++;
} else if (data.read(i).label == "seq-fewV2") {
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, ks.getInfoLineWithAffects());
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "fewV2: " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == UNSEG_TOO_FEW_V, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
nb_checked++;
} else if (data.read(i).label == "seq-fewJ2") {
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "fewJ: " << ks.getInfoLineWithAffects());
TAP_TEST(! ks.isSegmented(), TEST_KMER_IS_SEGMENTED, "fewJ2: " << ks.getInfoLineWithAffects());
TAP_TEST(ks.getSegmentationStatus() == UNSEG_TOO_FEW_J, TEST_KMER_SEGMENTATION_CAUSE, ks.getInfoLineWithAffects());
nb_checked++;
} else if (data.read(i).label == "seq-delta-min-old") {
......@@ -201,7 +209,7 @@ void testSegmentationCause() {
}
}
TAP_TEST(nb_checked == 13, TEST_KMER_DATA, "");
TAP_TEST(nb_checked == 15, TEST_KMER_DATA, "");
delete germline;
}
......@@ -230,15 +238,15 @@ void testExtractor() {
WindowsStorage *ws = we.extract(&data, 30, labels);
// we.out_stats(cout);
TAP_TEST(we.getNbReads() == 13, TEST_EXTRACTOR_NB_READS, "");
TAP_TEST(we.getNbReads() == 15, TEST_EXTRACTOR_NB_READS, "");
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, "");
TAP_TEST(we.getNbSegmented(UNSEG_TOO_FEW_ZERO) == 1, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_TOO_FEW_V) == 2, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_TOO_FEW_J) == 2, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_TOO_FEW_V) == 3, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_TOO_FEW_J) == 3, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_BAD_DELTA_MIN) == 0, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_BAD_DELTA_MAX) == 1, TEST_EXTRACTOR_NB_SEGMENTED, "");
TAP_TEST(we.getNbSegmented(UNSEG_TOO_SHORT_FOR_WINDOW) == 2, TEST_EXTRACTOR_NB_SEGMENTED, "");
......@@ -249,8 +257,8 @@ void testExtractor() {
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, "");
TAP_TEST(we.getAverageSegmentationLength(UNSEG_TOO_FEW_ZERO) == 36, TEST_EXTRACTOR_AVG_LENGTH, "");
TAP_TEST(we.getAverageSegmentationLength(UNSEG_TOO_FEW_V) == 51, TEST_EXTRACTOR_AVG_LENGTH, "");
TAP_TEST(we.getAverageSegmentationLength(UNSEG_TOO_FEW_J) == 55, TEST_EXTRACTOR_AVG_LENGTH, "");
TAP_TEST(we.getAverageSegmentationLength(UNSEG_TOO_FEW_V) == 46, TEST_EXTRACTOR_AVG_LENGTH, "average: " << we.getAverageSegmentationLength(UNSEG_TOO_FEW_V));
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_BAD_DELTA_MAX) == 66, TEST_EXTRACTOR_AVG_LENGTH, "");
TAP_TEST(we.getAverageSegmentationLength(UNSEG_TOO_SHORT_FOR_WINDOW) == 28.5, TEST_EXTRACTOR_AVG_LENGTH, "");
TAP_TEST(we.getAverageSegmentationLength(TOTAL_SEG_AND_WINDOW) == 48, TEST_EXTRACTOR_AVG_LENGTH, "");
......
......@@ -10,10 +10,14 @@ tgtgccacctgggacaggAGTTTCTTATAATAATTC
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>seq-fewV
AAAAAAAAAAAAAAAAAAGAATTATTATAAGAAACT
>seq-fewV-rc
AGTTTCTTATAATAATTCTTTTTTTTTTTTTTTTTT
>seq-fewV2
AAAAAAAAAAAAAAAAAAGAATTATTATAAGAAACTCTTTGGCAGTGGAACAACACTGGTTGTCAC
>seq-fewJ
tgtgccacctgggacaggAAAAAAAAAAAAAAAAAA
tgtgccacctgggacaggAAAAAAAAAAAAAAAAA
>seq-fewJ-rc
TTTTTTTTTTTTTTTTTcctgtcccaggtggcaca
>seq-fewJ2
tgcaaaatctaattaaaaatgattctgggttctattactgtgccacctgggacaggAAAAAAAAAAAAAAAAAA
>seq-delta-min-old
......
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