def scan_genotypes_compound(self, genotypes, batches, parallel=True):
"""Scan the *genotypes* array for compounds. Variant ids are treated in batches,
- one list of variant_ids per gene."""
if self.shortcut:
passing, sources, pairs = np.zeros(0), {}, []
else:
N = len(genotypes)
active_idx = np.asarray(self.ss.active_idx, dtype=np.uint16)
batches = list(batches.items())
if parallel:
passing, sources, pairs = self.parallel_batches(genotypes, batches, active_idx, N)
else:
passing, sources, pairs = self.process_batches(genotypes, batches, active_idx, N)
passing = np.array(list(passing), dtype=np.uint64)
passing.sort()
return passing, sources, pairs
评论列表
文章目录