def __getitem__(self, *args): out = super(HaplotypeChunkedArray, self).__getitem__(*args) if hasattr(out, 'shape') and len(self.shape) == len(out.shape): # dimensionality preserved out = _ndarray.HaplotypeArray(out) return out
def f(block, bmapping): h = _ndarray.HaplotypeArray(block) return h.map_alleles(bmapping)
def f(block): h = _ndarray.HaplotypeArray(block) return h.to_genotypes(ploidy)
def f(block): h = _ndarray.HaplotypeArray(block) return h.count_alleles(max_allele=max_allele)[:, None, :]
def compute(self, **kwargs): a = super(HaplotypeDaskArray, self).compute(**kwargs) h = _ndarray.HaplotypeArray(a) return h