Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Average kc over all segments in chain #64

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/map/include/computeMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,12 @@ namespace skch
) / it->n_merged; // this would scale directly by the number of mappings in the chain


//Mean kmer complexity of all mappings in the chain
it->kmerComplexity = ( std::accumulate(
it, it_end, 0.0,
[](double x, MappingResult &e){ return x + e.kmerComplexity; })
) / it->n_merged; // this would scale directly by the number of mappings in the chain

//Discard other mappings of this chain
std::for_each( std::next(it), it_end, [&](MappingResult &e){ e.discard = 1; });

Expand Down
Loading