lakeview.GeneAnnotation#

class lakeview.GeneAnnotation

Bases: object

GeneAnnotation(genes: ‘Sequence[AnnotationRecord]’, transcripts: ‘Sequence[TranscriptRecord]’, exons: ‘Sequence[ExonRecord]’, cdss: ‘Sequence[CdsRecord]’)

draw_transcripts(ax, *, sort_by=None, group_by=None, filter_by=None, color_by=None, label_by='gene_name', group_labels=None, height=None, max_rows=100, draw_arrows=True, transcripts_kw={}, arrows_kw={}, exons_kw={}, cdss_kw={}, labels_kw={})

Draw sequence alignment patterns, in a style similar to IGH feature track.

Parameters
  • max_rows (int) – The maximum number of rows to layout transcripts. Excess transcripts will not be drawn. If multiple transcript groups exist, this parameter limits the maximum number of rows per group.

  • ax (Axes) –

  • sort_by (Union[Callable[[AnnotationRecord], Identifier], Iterable[Identifier], Literal['length'], None]) –

  • group_by (Union[Callable[[AnnotationRecord], GroupIdentifier], Iterable[GroupIdentifier], Literal['gene_name'], None]) –

  • filter_by (Union[Callable[[AnnotationRecord], bool], Iterable[bool], None]) –

  • color_by (Union[Callable[[AnnotationRecord], Color], Iterable[Color], None]) –

  • label_by (Union[Callable[[AnnotationRecord], str], Iterable[str], Literal['gene_name'], None]) –

  • group_labels (Union[Callable[[GroupIdentifier], str], Mapping[GroupIdentifier, str], None]) –

  • height (Optional[float]) –

  • draw_arrows (bool) –

__init__(genes, transcripts, exons, cdss)
Parameters
  • genes (Sequence[AnnotationRecord]) –

  • transcripts (Sequence[TranscriptRecord]) –

  • exons (Sequence[ExonRecord]) –

  • cdss (Sequence[CdsRecord]) –

Return type

None

class lakeview.annotation.AnnotationRecord#

Bases: object

AnnotationRecord(sequence_name: ‘str’, source: ‘str’, feature: ‘str’, start: ‘int’, end: ‘int’, score: ‘Optional[float]’ = None, strand: ‘Optional[str]’ = None, frame: ‘Optional[str]’ = None, attributes: ‘dict[str, str]’ = <factory>)

__init__(sequence_name, source, feature, start, end, score=None, strand=None, frame=None, attributes=<factory>)#
Parameters
  • sequence_name (str) –

  • source (str) –

  • feature (str) –

  • start (int) –

  • end (int) –

  • score (Optional[float]) –

  • strand (Optional[str]) –

  • frame (Optional[str]) –

  • attributes (dict[str, str]) –

Return type

None