malariagen_data.af1.Af1.haplotype_sites#

Af1.haplotype_sites(region: str | Region | Mapping | List[str | Region | Mapping] | Tuple[str | Region | Mapping, ...], field: str, analysis: str = 'default', inline_array: bool = True, chunks: int | str | Tuple[int | str, ...] | Callable[[Tuple[int, ...]], int | str | Tuple[int | str, ...]] = 'ndauto0') Array#

Access haplotype site data (positions or alleles).

Parameters#

regionstr or Region or Mapping or list of str or Region or Mapping or tuple of str or Region or Mapping

Region of the reference genome. Can be a contig name, region string (formatted like “{contig}:{start}-{end}”), or identifier of a genome feature such as a gene or transcript. Can also be a sequence (e.g., list) of regions.

fieldstr

Name of array or column to access.

analysisstr, optional, default: ‘default’

Which haplotype phasing analysis to use. See the phasing_analysis_ids property for available values.

inline_arraybool, optional, default: True

Passed through to dask from_array().

chunksint or str or tuple of int or str or Callable[[typing.Tuple[int, …]], int or str or tuple of int or str], optional, default: ‘ndauto0’

If ‘auto’ let dask decide chunk size. If ‘native’ use native zarr chunks. If ‘ndauto’ let dask decide chunk size but only for arrays with more than one dimension. If ‘ndauto0’ as ‘ndauto’ but only vary the first chunk dimension. If ‘ndauto1’ as ‘ndauto’ but only vary the second chunk dimension. If ‘ndauto01’ as ‘ndauto’ but only vary the first and second chunk dimensions. Also, can be a target size, e.g., ‘200 MiB’, or a tuple of integers, or a callable which accepts the native chunks as a single argument and returns a valid dask chunks value.

Returns#

Array

An array of either SNP positions (“POS”), reference alleles (“REF”) or alternate alleles (“ALT”).