Skip to content

Commit

Permalink
feat: Add logging for target subset statistics during mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
ekg committed Nov 20, 2024
1 parent da81070 commit 35c0ef2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/map/include/computeMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,19 @@ namespace skch

std::vector<std::vector<std::string>> target_subsets = createTargetSubsets(targetSequenceNames);

// Calculate and log subset statistics
uint64_t total_subset_size = 0;
for (const auto& subset : target_subsets) {
for (const auto& seqName : subset) {
seqno_t seqId = idManager->getSequenceId(seqName);
total_subset_size += idManager->getSequenceLength(seqId);
}
}
double avg_subset_size = target_subsets.size() ? (double)total_subset_size / target_subsets.size() : 0;
std::cerr << "[wfmash::mashmap] Target subsets: " << target_subsets.size()
<< ", target size: " << param.index_by_size << "bp"
<< ", average size: " << std::fixed << std::setprecision(0) << avg_subset_size << "bp" << std::endl;

std::unordered_map<seqno_t, MappingResultsVector_t> combinedMappings;

// Build index for the current subset
Expand Down

0 comments on commit 35c0ef2

Please sign in to comment.