malariagen_data.af1.Af1.site_annotations#
- Af1.site_annotations(region: str | Region | Mapping, site_mask: str | None = None, inline_array: bool = True, chunks: int | str | Tuple[int | str, ...] | Callable[[Tuple[int, ...]], int | str | Tuple[int | str, ...]] = 'native') Dataset #
Load site annotations.
Parameters#
- regionstr 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.
- site_maskstr or None, optional
Which site filters mask to apply. See the site_mask_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: ‘native’
Define how input data being read from zarr should be divided into chunks for a dask computation. If ‘native’, use underlying zarr chunks. If a string specifying a target memory size, e.g., ‘300 MiB’, resize chunks in arrays with more than one dimension to match this size. If ‘auto’, let dask decide chunk size. 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 tuple of integers, or a callable which accepts the native chunks as a single argument and returns a valid dask chunks value.
Returns#
- Dataset
A dataset of site annotations with 1 dimension: variants the number of sites in the selected region. It has 7 variables: seq_cls: The feature class. There are 11 possible values: 1: Upstream, 2: Downstream, 3: 5’ UTR, 4: 3’ UTR, 5: CDS (first), 6: CDS (mid), 7: CDS (last), 8: Intron (first), 9: Intron (mid), 10: Intron (last), 0: Unknown, seq_flen: The length of the feature, seq_relpos_start: Relative position to the start of the feature. 0 if not in a feature, seq_relpos_stop: Relative position to the end of the feature. 0 if not in a feature, codon_position: Position within a triplet codon. -1 if not in a CDS, codon_nonsyn: Number of possible nucleotide changes at this position that would result in an amino acid change from the reference, 0 if not in a CDS, codon_degeneracy: The redundancy of the codon. Can take 5 different values: 1: 0-fold degenerate, i.e., all nucleotides encode different amino acids, 2: simple 2-fold degenerate, i.e., 2 different amino acids can be encoded depending on which nucleotide is present; each amino acid is encoded by two different nucleotides, 3: complex 2-fold degenerate, i.e., 2 different amino acids can be encoded depending on which nucleotide is present but they are not paired, 4: 4-fold degenerate, i.e., all nucleotides encode the same amino acid, -1: not in a CDS.