Skip to content

origins

Declare Origin object.

Classes:

  • Origins

    Object to manage lazyframe as Origins.

Origins

Origins()

Bases: LazyFrame

Object to manage lazyframe as Origins.

Methods:

  • minimal_schema

    Get minimal schema of genotypes polars.LazyFrame.

Source code in src/variantplaner/objects/origins.py
15
16
17
def __init__(self):
    """Initialize a Origins object."""
    self.lf = polars.LazyFrame(schema=Origins.minimal_schema())

minimal_schema classmethod

minimal_schema() -> dict[str, type]

Get minimal schema of genotypes polars.LazyFrame.

Source code in src/variantplaner/objects/origins.py
19
20
21
22
23
24
25
26
27
28
@classmethod
def minimal_schema(cls) -> dict[str, type]:
    """Get minimal schema of genotypes polars.LazyFrame."""
    return {
        "id": polars.UInt64,
        "index_gt": polars.UInt8,
        "mother_gt": polars.UInt8,
        "father_gt": polars.UInt8,
        "origin": polars.String,
    }