Skip to content

Commit ae4fe29

Browse files
committed
Swap order of rescues
1 parent 1960bef commit ae4fe29

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/aln.cpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -973,17 +973,17 @@ void align_or_map_paired(
973973
Timer nam_timer;
974974
auto [nonrepetitive_fraction, nams] = find_nams(query_randstrobes, index);
975975

976-
if (nams.empty()) {
977-
query_randstrobes = randstrobes_query_rescue(record.seq, index_parameters);
978-
std::tie(nonrepetitive_fraction, nams) = find_nams(query_randstrobes, index);
979-
}
980976
statistics.tot_find_nams += nam_timer.duration();
981977

982978
if (map_param.rescue_level > 1) {
983979
Timer rescue_timer;
984980
if (nams.empty() || nonrepetitive_fraction < 0.7) {
985981
nams = find_nams_rescue(query_randstrobes, index, map_param.rescue_cutoff);
986982
details[is_revcomp].nam_rescue = true;
983+
if (nams.empty()) {
984+
query_randstrobes = randstrobes_query_rescue(record.seq, index_parameters);
985+
std::tie(nonrepetitive_fraction, nams) = find_nams(query_randstrobes, index);
986+
}
987987
}
988988
statistics.tot_time_rescue += rescue_timer.duration();
989989
}
@@ -1098,18 +1098,17 @@ void align_or_map_single(
10981098
Timer nam_timer;
10991099
auto [nonrepetitive_fraction, nams] = find_nams(query_randstrobes, index);
11001100

1101-
if (nams.empty()) {
1102-
query_randstrobes = randstrobes_query_rescue(record.seq, index_parameters);
1103-
std::tie(nonrepetitive_fraction, nams) = find_nams(query_randstrobes, index);
1104-
}
1105-
11061101
statistics.tot_find_nams += nam_timer.duration();
11071102

11081103
if (map_param.rescue_level > 1) {
11091104
Timer rescue_timer;
11101105
if (nams.empty() || nonrepetitive_fraction < 0.7) {
11111106
details.nam_rescue = true;
11121107
nams = find_nams_rescue(query_randstrobes, index, map_param.rescue_cutoff);
1108+
if (nams.empty()) {
1109+
query_randstrobes = randstrobes_query_rescue(record.seq, index_parameters);
1110+
std::tie(nonrepetitive_fraction, nams) = find_nams(query_randstrobes, index);
1111+
}
11131112
}
11141113
statistics.tot_time_rescue += rescue_timer.duration();
11151114
}

0 commit comments

Comments
 (0)