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

Method hasDepthRight

src/rnabloom/util/GraphUtils.java:6680–6703  ·  view source on GitHub ↗
(Kmer source, BloomFilterDeBruijnGraph graph, int depth)

Source from the content-addressed store, hash-verified

6678 }
6679
6680 public static boolean hasDepthRight(Kmer source, BloomFilterDeBruijnGraph graph, int depth) {
6681 int k = graph.getK();
6682 int numHash = graph.getMaxNumHash();
6683
6684 ArrayDeque<ArrayDeque<Kmer>> frontier = new ArrayDeque<>();
6685 ArrayDeque<Kmer> alts = source.getSuccessors(k, numHash, graph);
6686 frontier.add(alts);
6687
6688 while (!frontier.isEmpty()) {
6689 alts = frontier.peekLast();
6690 if (alts.isEmpty()) {
6691 frontier.removeLast();
6692 }
6693 else {
6694 frontier.add(alts.pop().getSuccessors(k, numHash, graph));
6695 }
6696
6697 if (frontier.size() >= depth) {
6698 return true;
6699 }
6700 }
6701
6702 return false;
6703 }
6704
6705 public static boolean hasDepthLeft(Kmer source, BloomFilterDeBruijnGraph graph, int depth) {
6706 int k = graph.getK();

Callers 4

representedMethod · 0.95
isBluntEndArtifactMethod · 0.95
naiveExtendLeftMethod · 0.45
isBranchFreeMethod · 0.45

Calls 5

getMaxNumHashMethod · 0.80
addMethod · 0.65
getKMethod · 0.45
getSuccessorsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected