INNER CODE UNIT · JavaScript

a

lh3/pangene · pangene.js:243

				const a = this.arc[off + i], w = a.w;
				if (w == (vs^1)) continue; // don't pass the starting vertex on either strand
				if (w == (ve^1)) return []; // if reaching the reverse complement of ve, there is no bubble
				if (flag[w] != f) {
					flag[w] = f;
					if (w == ve) continue; // reaching the end vertex; flag it but don't add to list[] or stack[]
					if (flag[w^1] != f) list.push(w>>1);
					stack.push(w);
				}
			}
			if (list.length > max_n) break;
		}
		return list.length > max_n? [] : list;
	}
	get_bubble_id(vs, ve, flag, f, max_n) {
		let f_for = f, f_rev = f + this.seg.length * 2;
		let list_for = this.#traverse_bubble(vs,   ve,   flag, f_for, max_n);
		let list_rev = this.#traverse_bubble(ve^1, vs^1, flag, f_rev, max_n);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…