Commit b215548d authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

tests: add and update tests, minimization positions

parent 12bf73d1
......@@ -2,10 +2,19 @@
>read-CD4-exact-1
GTAGTAGCCCCTCAGTGCAATGTAGGAGTCCAAGGGGTAAAAACATACAGGGGGGGAAGACCCTCTCCGT
GTCTCAGCTGGAGCTCCAGGATAGTGGCACCTGGACATGCACTGTCTTGCAGAACCAGAAGAAGGTGGAG
>read-CD4-exact-2-trimmed
>read-CD4-exact-trimmed
CCCCTCAGTGCAATGTAGGAGTCCAAGGGGTAAAAACATACAGGGGGGGAAGACCCTCTCCGT
GTCTCAGCTGGAGCTCCAGGATAGTGGCACCTGGACATGCACTGTCTTGCAGAACCAGAAGAAGGTGGAG
>read-CD4-exact-trimmed-60
GAGCTCCAGGATAGTGGCACCTGGACATGCACTGTCTTGCAGAACCAGAAGAAGGTGGAG
>read-CD4-exact-trimmed-55
CCAGGATAGTGGCACCTGGACATGCACTGTCTTGCAGAACCAGAAGAAGGTGGAG
>read-CD4-exact-trimmed-50
ATAGTGGCACCTGGACATGCACTGTCTTGCAGAACCAGAAGAAGGTGGAG
>read-CD19-exact-1
CTGGACCCATGTGCACCCCAAGGGGCCTAAGTCATTGCTGAGCCTAGAGCTGAAGGACGATCGCCCGGCC
AGAGATATGTGGGTAATGGAGACGGGTCTGTTGTTGCCCCGGGCCACAGCTCAAGACGCTGGAAAGTATT
......
!LAUNCH: $VIDJIL_DIR/$EXEC -g $VIDJIL_DIR/germline/homo-sapiens-cd.g -A $VIDJIL_DATA/cd-4-19.fa
!LAUNCH: $VIDJIL_DIR/$EXEC -K -g $VIDJIL_DIR/germline/homo-sapiens-cd.g -A $VIDJIL_DATA/cd-4-19.fa ; grep 'seed' out/cd-4-19.affects
$ Load CD-sorting.fa
1:homo-sapiens/CD-sorting.fa .* 28 sequences
$ KmerSegmenter, do not map a read < 52bp
1: UNSEG too short w .* 1 .* 50.0
1: read-CD4-exact-trimmed-50 .* UNSEG too short w
$ KmerSegmenter, map reads
1: found 6 50-windows in 8 reads
1: found 8 50-windows in 10 reads
$ KmerSegmenter, cluster trimmed reads with original ones
$ KmerSegmenter, cluster lightly trimmed reads with original ones
2:Clone .* 2 reads
$ FineSegmenter, find 3 clones with CD4 and 3 with CD19
3:clone-00.* CD4 .* SEG
$ KmerSegmenter, the above clusterisation come from coherent minimizing positions
1:read-CD4-exact-1 .* @69
1:read-CD4-exact-trimmed .* @62
$ FineSegmenter, find 5 clones with CD4 and 3 with CD19
5:clone-00.* CD4 .* SEG
3:clone-00.* CD19 .* SEG
......@@ -22,11 +22,11 @@ void testAffectAnalyser1() {
TAP_TEST(ckaa.getAllowedOverlap() == k-1, TEST_COUNT_AA_GET_OVERLAP, "");
TAP_TEST(ckaa.getSequence() == "AAAACCCCCGGGGG", TEST_AA_GET_SEQUENCE, "actual: " << ckaa.getSequence());
TAP_TEST(kaa.minimize(KmerAffect("A", 1, k), 0, 3) == 0, TEST_AA_MINIMIZE, ""); // first position minimizes
TAP_TEST(kaa.minimize(KmerAffect("C", 1, k), 3, 3) == 4, TEST_AA_MINIMIZE, ""); // margin = 3, does not affect C
TAP_TEST(kaa.minimize(KmerAffect("C", 1, k), 5, 3) == 5, TEST_AA_MINIMIZE, ""); // margin = 5, second k-mer C
TAP_TEST(kaa.minimize(KmerAffect("C", 1, k), 6, 3) == 0, TEST_AA_MINIMIZE, ""); // too large margin, fallback to 0
TAP_TEST(kaa.minimize(KmerAffect("A", 1, k), 0, 4) == 0, TEST_AA_MINIMIZE, ""); // first position minimizes
TAP_TEST(kaa.minimize(KmerAffect("A", 1, k), 1, 4) == 0, TEST_AA_MINIMIZE, ""); // too large margin (left side), fallback to 0
TAP_TEST(kaa.minimize(KmerAffect("C", 1, k), 3, 4) == 4, TEST_AA_MINIMIZE, ""); // margin = 3, does not affect C
TAP_TEST(kaa.minimize(KmerAffect("C", 1, k), 5, 4) == 5, TEST_AA_MINIMIZE, ""); // margin = 5, second k-mer C exactly fits between both margins
TAP_TEST(kaa.minimize(KmerAffect("G", 1, k), 5, 4) == 0, TEST_AA_MINIMIZE, ""); // too large margin (right side), fallback to 0
for (int i = 2; i < nb_seq-1; i++) {
// i starts at 2 because AAAA is not found: there is an ambiguity with
......
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