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

Method hasDepthLeft

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

Source from the content-addressed store, hash-verified

6703 }
6704
6705 public static boolean hasDepthLeft(Kmer source, BloomFilterDeBruijnGraph graph, int depth) {
6706 int k = graph.getK();
6707 int numHash = graph.getMaxNumHash();
6708
6709 ArrayDeque<ArrayDeque<Kmer>> frontier = new ArrayDeque<>();
6710 ArrayDeque<Kmer> alts = source.getPredecessors(k, numHash, graph);
6711 frontier.add(alts);
6712
6713 while (!frontier.isEmpty()) {
6714 alts = frontier.peekLast();
6715 if (alts.isEmpty()) {
6716 frontier.removeLast();
6717 }
6718 else {
6719 frontier.add(alts.pop().getPredecessors(k, numHash, graph));
6720 }
6721
6722 if (frontier.size() >= depth) {
6723 return true;
6724 }
6725 }
6726
6727 return false;
6728 }
6729
6730 public static boolean hasDepthRight(Kmer source, BloomFilterDeBruijnGraph graph, int depth, BloomFilter bf) {
6731 int k = graph.getK();

Callers 4

representedMethod · 0.95
isBluntEndArtifactMethod · 0.95
naiveExtendRightMethod · 0.45
isBranchFreeMethod · 0.45

Calls 5

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

Tested by

no test coverage detected