(Kmer seed, BloomFilterDeBruijnGraph graph, int lookahead, int windowSize, int maxIteration)
| 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(); |
nothing calls this directly
no test coverage detected