Skip to content

Commit

Permalink
Merge pull request #307 from waveygang/fix_map_filtering
Browse files Browse the repository at this point in the history
apply mapping filter before it is too late
  • Loading branch information
AndreaGuarracino authored Jan 21, 2025
2 parents f65b600 + 99dbdb1 commit 7f159f6
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/map/include/computeMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,15 +678,6 @@ namespace skch
}
output_thread.join();

// Process both merged and non-merged mappings
for (auto& [querySeqId, mappings] : combinedMappings) {
if (param.mergeMappings && param.split) {
filterMaximallyMerged(mappings, param, progress);
} else {
filterNonMergedMappings(mappings, param, progress);
}
}

progress.finish();

}
Expand Down Expand Up @@ -2224,6 +2215,13 @@ namespace skch
// Only merge once and keep both versions
auto maximallyMergedMappings = mergeMappingsInRange(mappings, param.chain_gap, progress);

// Process both merged and non-merged mappings
if (param.mergeMappings && param.split) {
filterMaximallyMerged(maximallyMergedMappings, param, progress);
} else {
filterNonMergedMappings(mappings, param, progress);
}

// Build dense chain ID mapping
std::unordered_map<offset_t, offset_t> id_map;
offset_t next_id = 0;
Expand Down

0 comments on commit 7f159f6

Please sign in to comment.