Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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)
Example #4
0
    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)
Example #5
0
    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)
Example #6
0
 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)
Example #7
0
 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)
Example #8
0
 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)