Commit cade5fde authored by Mikaël Salson's avatar Mikaël Salson
Browse files

testAffectAnalyser: Make it work with all indexes.

The affectation length is longer with Aho-Corasick than with k-mer based
indexes. So we use the length of the read instead.
parent 50a06631
......@@ -346,7 +346,8 @@ void testBugAffectAnalyser() {
Fasta seqJ("../../germline/IGHJ.fa", 2);
Fasta data("../../data/bug-revcomp.fa", 1, " ");
T<KmerAffect> index(9, true);
int k = 9;
T<KmerAffect> index(k, true);
index.insert(seqV, "V");
index.insert(seqJ, "J");
index.finish_building();
......@@ -362,7 +363,7 @@ void testBugAffectAnalyser() {
KmerAffectAnalyser fwdAffect(index, data.read(0).sequence);
KmerAffectAnalyser bwdAffect(index, data.read(1).sequence);
int total = fwdAffect.count();
int total = data.read(0).sequence.size() -k + 1;
TAP_TEST(fwdAffect.getSequence() == data.read(0).sequence, TEST_AA_GET_SEQUENCE, "actual: " << fwdAffect.getSequence() << ", expected: " << data.read(0).sequence);
TAP_TEST(bwdAffect.getSequence() == data.read(1).sequence, TEST_AA_GET_SEQUENCE, "actual: " << bwdAffect.getSequence() << ", expected: " << data.read(1).sequence);
......
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