Skip to content

Commit

Permalink
Swap order of rescues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelm committed Feb 28, 2024
1 parent 1960bef commit ae4fe29
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/aln.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,17 +973,17 @@ void align_or_map_paired(
Timer nam_timer;
auto [nonrepetitive_fraction, nams] = find_nams(query_randstrobes, index);

if (nams.empty()) {
query_randstrobes = randstrobes_query_rescue(record.seq, index_parameters);
std::tie(nonrepetitive_fraction, nams) = find_nams(query_randstrobes, index);
}
statistics.tot_find_nams += nam_timer.duration();

if (map_param.rescue_level > 1) {
Timer rescue_timer;
if (nams.empty() || nonrepetitive_fraction < 0.7) {
nams = find_nams_rescue(query_randstrobes, index, map_param.rescue_cutoff);
details[is_revcomp].nam_rescue = true;
if (nams.empty()) {
query_randstrobes = randstrobes_query_rescue(record.seq, index_parameters);
std::tie(nonrepetitive_fraction, nams) = find_nams(query_randstrobes, index);
}
}
statistics.tot_time_rescue += rescue_timer.duration();
}
Expand Down Expand Up @@ -1098,18 +1098,17 @@ void align_or_map_single(
Timer nam_timer;
auto [nonrepetitive_fraction, nams] = find_nams(query_randstrobes, index);

if (nams.empty()) {
query_randstrobes = randstrobes_query_rescue(record.seq, index_parameters);
std::tie(nonrepetitive_fraction, nams) = find_nams(query_randstrobes, index);
}

statistics.tot_find_nams += nam_timer.duration();

if (map_param.rescue_level > 1) {
Timer rescue_timer;
if (nams.empty() || nonrepetitive_fraction < 0.7) {
details.nam_rescue = true;
nams = find_nams_rescue(query_randstrobes, index, map_param.rescue_cutoff);
if (nams.empty()) {
query_randstrobes = randstrobes_query_rescue(record.seq, index_parameters);
std::tie(nonrepetitive_fraction, nams) = find_nams(query_randstrobes, index);
}
}
statistics.tot_time_rescue += rescue_timer.duration();
}
Expand Down

0 comments on commit ae4fe29

Please sign in to comment.