예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)