.. _api_models: Data Models Module (biallelic.models) ===================================== The models module contains all core data classes and enums for representing genomic data in the biallelic inactivation pipeline. .. automodule:: biallelic.models :members: :undoc-members: :show-inheritance: Overview -------- This module defines: - **Enums** for categorical data types (Gender, OmicsType, AberrationType, DoubleHitType) - **Classes** for representing genomic events (SampleDonor, Aberration, DoubleHit) All classes are designed to work with the Aberrations orchestrator and discovery analyses. Usage Examples -------------- Creating a Sample Donor: .. code-block:: python from biallelic.models import SampleDonor, Gender donor = SampleDonor( sample_id="TCGA-BL-A0C8-01A", donor_id="TCGA-BL-A0C8", gender=Gender.Female, cellularity=0.95, ploidy=2.0 ) Creating an Aberration: .. code-block:: python from biallelic.models import Aberration, AberrationType snv = Aberration( chrom="17", start=41196312, end=41196313, aberration_type=AberrationType.SNV, aberration_subtype="missense_variant", sample_id="TCGA-BL-A0C8-01A", gene="TP53", vaf=0.45 ) Creating a Double Hit (Biallelic Event): .. code-block:: python from biallelic.models import DoubleHit, DoubleHitType biallelic_hit = DoubleHit( gene="TP53", sample_id="TCGA-BL-A0C8-01A", hit_type=DoubleHitType.SOM_SNV_SOM_LOSS, hit_details="SNV at codon 248 + loss of chr17" ) See Also -------- - :ref:`manifest`: Configuration file format for analyses - :ref:`developing`: Guide for extending the package