genome_spy.Locus

genome_spy.Locus(chrom, pos=None, /, *, axis=Undefined, band=Undefined, description=Undefined, domainInert=Undefined, offset=Undefined, resolutionChannel=Undefined, scale=Undefined, title=Undefined)View on GitHub

Create a GenomeSpy chromosomal locus channel definition.

Parameters:
  • axis (GenomeAxis | GenomeAxisKwds | None) – An object defining properties of axis’s gridlines, ticks and labels. If null, the axis for the encoding channel will be removed. __Default value:__ If undefined, default axis properties are applied. __See also:__ axis documentation.

  • band (float) – Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

  • description (str) – A description of the encoded position. Can be used for documentation and to explain the meaning of the channel mapping.

  • domainInert (bool) – Whether the field or evaluated expr should be excluded from the scale’s domain. Prefer the view-level domainInert when an entire subtree should be excluded. Default value: false

  • offset (float) – An offset or offsets that allow for adjusting the numbering base. The offset is subtracted from the positions. GenomeSpy uses internally zero-based indexing with half-open intervals. UCSC-based formats (BED, etc.) generally use this scheme. However, for example, VCF files use one-based indexing and must be adjusted by setting the offset to 1. Default: 0

  • resolutionChannel (ChannelWithScale_T) – An alternative channel for scale resolution. This is mainly for internal use and allows using color channel to resolve fill and stroke channels under certain circumstances.

  • scale (Scale | ScaleKwds | None) – An object defining properties of the channel’s scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If null, the scale will be disabled and the data value will be directly encoded. __Default value:__ If undefined, default scale properties are applied. __See also:__ scale documentation.

  • title (str | None) – A title for the field. If null, the title will be removed.