Skip to content

Commit

Permalink
Merge pull request #64 from marbl/fix-kc-tag
Browse files Browse the repository at this point in the history
Average kc over all segments in chain
  • Loading branch information
bkille authored Nov 30, 2023
2 parents be6dbb6 + 83ab90f commit 9afc465
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 9afc465

Please sign in to comment.