Skip to content

Commit

Permalink
Merge pull request #298 from waveygang/more-logs
Browse files Browse the repository at this point in the history
Logging target subset count and average size
  • Loading branch information
ekg authored Nov 22, 2024
2 parents da81070 + af85065 commit 3049a68
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/map/include/computeMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,21 @@ 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();
if (param.index_by_size > 0) {
std::cerr << ", target size: " << param.index_by_size << "bp";
}
std::cerr << ", 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 3049a68

Please sign in to comment.