Exemple #1
0
 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
Exemple #2
0
 def f(block, bmapping):
     h = _ndarray.HaplotypeArray(block)
     return h.map_alleles(bmapping)
Exemple #3
0
 def f(block):
     h = _ndarray.HaplotypeArray(block)
     return h.to_genotypes(ploidy)
Exemple #4
0
 def f(block):
     h = _ndarray.HaplotypeArray(block)
     return h.count_alleles(max_allele=max_allele)[:, None, :]
Exemple #5
0
 def compute(self, **kwargs):
     a = super(HaplotypeDaskArray, self).compute(**kwargs)
     h = _ndarray.HaplotypeArray(a)
     return h