MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / findBackbonePath

Method findBackbonePath

src/rnabloom/util/GraphUtils.java:4776–4794  ·  view source on GitHub ↗
(Kmer seed, BloomFilterDeBruijnGraph graph, int lookahead, int windowSize, int maxIteration)

Source from the content-addressed store, hash-verified

4774 }
4775
4776 public static ArrayList<Kmer> findBackbonePath(Kmer seed, BloomFilterDeBruijnGraph graph, int lookahead, int windowSize, int maxIteration) {
4777 Kmer best = seed;
4778 ArrayList<Kmer> path = greedyExtend(best, graph, lookahead);
4779 boolean randomSeed = false;
4780
4781 for (int i=1; i<maxIteration; ++i) {
4782 if (randomSeed) {
4783 best = path.get((int) (Math.random() * (path.size()-1)));
4784 randomSeed = false;
4785 }
4786 else {
4787 best = findMaxCoverageWindowKmer(path, graph, windowSize);
4788 randomSeed = true;
4789 }
4790 path = greedyExtend(best, graph, lookahead);
4791 }
4792
4793 return path;
4794 }
4795
4796 public static String getBestSegment(ArrayList<String> segments, BloomFilterDeBruijnGraph graph) {
4797 int numSeqs = segments.size();

Callers

nothing calls this directly

Calls 4

greedyExtendMethod · 0.95
getMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected