Closed iqbal-lab closed 8 years ago
Here is the test
` TEST(BackwardSearchTest, Multiple_matches_over_multiple_sites){
//prg=acgacacat5gatag6tagga6gctcg6gctct5gctcgtgataatgactagatagatag7cga8cgc8tga8tgc7taggcaacatctacga
test_file2="../test_cases/multiple_matches_multiple_sites.txt";
//read aligns over allele 1 of site 5, the nonvariableregion and allele 3 of site 7
query="tgata";
` After running the backward search, this is what sites looks like
` (gdb) p sites $1 = std::list = {[0] = std::vector of length 0, capacity 0, [1] = std::vector of length 1, capacity 100 = {{first = 7, second = std::vector of length 0, capacity 0}}, [2] = std::vector of length 1, capacity 100 = {{first = 5, second = std::vector of length 1, capacity 1 = {1}}}}
`
So we correctly see 7 first, and fail to spot the overlap with allele 3, because it does not cross the 5 - so it's correct/expected behavious to have this {{first = 7, second = std::vector of length 0, capacity 0}}.
This is also correct, and correctly after the 7 {{first = 5, second = std::vector of length 1, capacity 1 = {1}}
I just wasn't expecting this at the front: [0] = std::vector of length 0, capacity 0,
Need to read the code - in fact if I spent the time reading the code not bug-raising - er - I might have to go away from the computer and forget what i was doing
This is idiocy on my part. Fixing.
Fixed. I forgot there was a match in the nonvariable region, and anyway my test code was wrong. test passes now.
Wow, github clever enough to auto close this bug on the basis of the comment on that commit!!!
At commit ef3cf76b59b5e0e3e2de62f9fba18dc4e98f90b2
Add testing of sites object to multiple-matches unit test - segfaults