genotype_filters.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:varapp-backend-py 作者: varapp 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号