MCPcopy Create free account
hub / github.com/BirolLab/abyss / findRepeats

Function findRepeats

MergePaths/MergePaths.cpp:202–217  ·  view source on GitHub ↗

Return all contigs that are tandem repeats, identified as those * contigs that appear more than once in a single path. */

Source from the content-addressed store, hash-verified

200 * contigs that appear more than once in a single path.
201 */
202static set<ContigID>
203findRepeats(const ContigPathMap& paths)
204{
205 set<ContigID> repeats;
206 for (ContigPathMap::const_iterator pathIt = paths.begin(); pathIt != paths.end(); ++pathIt) {
207 const ContigPath& path = pathIt->second;
208 map<ContigID, unsigned> count;
209 for (ContigPath::const_iterator it = path.begin(); it != path.end(); ++it)
210 if (!it->ambiguous())
211 count[it->contigIndex()]++;
212 for (map<ContigID, unsigned>::const_iterator it = count.begin(); it != count.end(); ++it)
213 if (it->second > 1)
214 repeats.insert(it->first);
215 }
216 return repeats;
217}
218
219/** Remove tandem repeats from the set of paths.
220 * @return the removed paths

Callers 1

removeRepeatsFunction · 0.70

Calls 5

ambiguousMethod · 0.80
contigIndexMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected