Skip to content

Commit

Permalink
Average kc over all segments in chain
Browse files Browse the repository at this point in the history
  • Loading branch information
bkille committed Nov 30, 2023
1 parent be6dbb6 commit 83ab90f
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 83ab90f

Please sign in to comment.