def to_allele_counts(self, alleles=None, **storage_kwargs): # determine alleles to count if alleles is None: m = self.max() alleles = list(range(m + 1)) out = self.apply_method('to_allele_counts', kwargs=dict(alleles=alleles), **storage_kwargs) return _chunked.ChunkedArray(out)
def mask(self, mask): # check input if not hasattr(mask, 'shape'): mask = np.asarray(mask) if mask.shape != self.shape[:2]: raise ValueError('mask has incorrect shape') # store self._mask = _chunked.ChunkedArray(mask)
def is_doubleton(self, allele=1, **storage_kwargs): out = self.apply_method('is_doubleton', kwargs=dict(allele=allele), **storage_kwargs) return _chunked.ChunkedArray(out)
def is_non_segregating(self, allele=None, **storage_kwargs): out = self.apply_method('is_non_segregating', kwargs=dict(allele=allele), **storage_kwargs) return _chunked.ChunkedArray(out)
def is_segregating(self, **storage_kwargs): out = self.apply_method('is_segregating', **storage_kwargs) return _chunked.ChunkedArray(out)
def is_non_variant(self, **storage_kwargs): out = self.apply_method('is_non_variant', **storage_kwargs) return _chunked.ChunkedArray(out)
def max_allele(self, **storage_kwargs): out = self.apply_method('max_allele', **storage_kwargs) return _chunked.ChunkedArray(out)
def allelism(self, **storage_kwargs): out = self.apply_method('allelism', **storage_kwargs) return _chunked.ChunkedArray(out)
def to_frequencies(self, fill=np.nan, **storage_kwargs): out = self.apply_method('to_frequencies', kwargs=dict(fill=fill), **storage_kwargs) return _chunked.ChunkedArray(out)
def to_gt(self, phased=False, max_allele=None, **storage_kwargs): out = self.apply_method('to_gt', kwargs=dict(phased=phased, max_allele=max_allele), **storage_kwargs) return _chunked.ChunkedArray(out)
def to_packed(self, boundscheck=True, **storage_kwargs): out = self.apply_method('to_packed', kwargs=dict(boundscheck=boundscheck), **storage_kwargs) return _chunked.ChunkedArray(out)
def to_n_alt(self, fill=0, dtype='i1', **storage_kwargs): out = self.apply_method('to_n_alt', kwargs=dict(fill=fill, dtype=dtype), **storage_kwargs) return _chunked.ChunkedArray(out)