Remove all k-mers with multiplicity lower than the given threshold */
| 114 | |
| 115 | /** Remove all k-mers with multiplicity lower than the given threshold */ |
| 116 | static inline |
| 117 | size_t applyKmerCoverageThreshold(SequenceCollectionHash& c, unsigned kc) |
| 118 | { |
| 119 | if (kc == 0) |
| 120 | return 0; |
| 121 | |
| 122 | for (SequenceCollectionHash::iterator it = c.begin(); |
| 123 | it != c.end(); ++it) { |
| 124 | if (it->second.getMultiplicity() < kc) |
| 125 | it->second.setFlag(SF_DELETE); |
| 126 | } |
| 127 | |
| 128 | return c.cleanup(); |
| 129 | } |
| 130 | |
| 131 | } // namespace AssemblyAlgorithms |
| 132 |
no test coverage detected