Skip to content

Commit

Permalink
changed use of IntervalTree to accomodate changes in method names
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaaALatif committed Jan 4, 2021
1 parent 272544d commit 9c69970
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/trim_primer_quality.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ int get_bigger_primer(std::vector<primer> primers){
return max_primer_len;
}

// check if read overlaps with any of the amplicons
// check if read is enveloped by any of the amplicons
bool amplicon_filter(IntervalTree amplicons, bam1_t* r){
Interval fragment_coords = Interval(0, 1);
if(r->core.isize > 0){
Expand All @@ -342,7 +342,7 @@ bool amplicon_filter(IntervalTree amplicons, bam1_t* r){
fragment_coords.high = bam_endpos(r);
}
// debugging
bool amplicon_flag = amplicons.overlapSearch(fragment_coords);
bool amplicon_flag = amplicons.envelopSearch(fragment_coords);
return amplicon_flag;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_interval_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int test_itree_overlap(IntervalTree tree, Interval queries[], int num_tests, boo
int result = 0;
for (int i = 0; i < num_tests; i++)
{
result = tree.overlapSearch(queries[i]);
result = tree.envelopSearch(queries[i]);
if (result != expected[i])
{
std::cout << "Interval Tree overlap behavior incorrect for interval " << queries[i].low << ":" << queries[i].high
Expand Down

0 comments on commit 9c69970

Please sign in to comment.