def map_alleles(self, mapping, **storage_kwargs): def f(block, bmapping): return block.map_alleles(bmapping) domain = (self, mapping) out = _chunked.apply(domain, f, **storage_kwargs) return AlleleCountsChunkedArray(out)
def map_alleles(self, mapping, **storage_kwargs): def f(block, bmapping): return block.map_alleles(bmapping, copy=False) domain = (self, mapping) out = _chunked.apply(domain, f, **storage_kwargs) return HaplotypeChunkedArray(out)
def count_alleles_subpops(self, subpops, max_allele=None, **storage_kwargs): if max_allele is None: max_allele = self.max() def f(block): return block.count_alleles_subpops(subpops, max_allele=max_allele) out = _chunked.apply(self, f, create='table', **storage_kwargs) return AlleleCountsChunkedTable(out)
def from_packed(packed, **storage_kwargs): def f(block): return _ndarray.GenotypeArray.from_packed(block) out = _chunked.apply(packed, f, **storage_kwargs) return GenotypeChunkedArray(out)