Skip to content

onconova.oncology.models.genomic_signature

AneuploidScore

Bases: GenomicSignature

Represents the Aneuploid Score (AS) genomic signature, which quantifies the total number of altered chromosomal arms.

Attributes:

Name Type Description
genomic_signature OneToOneField[GenomicSignature]

One-to-one relationship to the base GenomicSignature model.

value int

The actual aneuploid score, representing the number of altered arms (range: 0-39).

description str

Human-readable description of the aneuploid score.

description property

genomic_signature class-attribute instance-attribute

value class-attribute instance-attribute

GenomicSignature

Bases: BaseModel

Represents a genomic signature assessment for a patient case.

Attributes:

Name Type Description
case ForeignKey

Reference to the PatientCase associated with this genomic signature.

date DateField

The date when the genomic signature was assessed.

genomic_signature_type str

Returns the type of genomic signature based on available attributes.

description str

Returns the description of the discriminated genomic signature, or 'Unknown genomic signature type' if not found.

case class-attribute instance-attribute

date class-attribute instance-attribute

description property

genomic_signature_type property

get_discriminated_genomic_signature()

Returns the discriminated genomic signature instance based on the value of genomic_signature_type.

If genomic_signature_type is set, retrieves the corresponding attribute from the current instance. If not set, returns None.

Returns:

Type Description
type[GenomicSignature] | None

GenomicSignature | None: The discriminated genomic signature instance or None if not available.

Source code in onconova/oncology/models/genomic_signature.py
def get_discriminated_genomic_signature(self) -> type["GenomicSignature"] | None:
    """
    Returns the discriminated genomic signature instance based on the value of `genomic_signature_type`.

    If `genomic_signature_type` is set, retrieves the corresponding attribute from the current instance.
    If not set, returns None.

    Returns:
        GenomicSignature | None: The discriminated genomic signature instance or None if not available.
    """
    if self.genomic_signature_type:
        return getattr(self, self.genomic_signature_type)
    return None

GenomicSignaturePresence

Bases: TextChoices

An enumeration representing the presence status of a genomic signature.

Attributes:

Name Type Description
POSITIVE str

Indicates that the genomic signature is present.

NEGATIVE str

Indicates that the genomic signature is absent.

INDETERMINATE str

Indicates that the presence of the genomic signature cannot be determined.

INDETERMINATE class-attribute instance-attribute

NEGATIVE class-attribute instance-attribute

POSITIVE class-attribute instance-attribute

GenomicSignatureTypes

Bases: TextChoices

Enumeration of genomic signature types used in oncology models.

Attributes:

Name Type Description
TUMOR_MUTATIONAL_BURDEN

Represents the tumor mutational burden signature.

LOSS_OF_HETEROZYGOSITY

Represents the loss of heterozygosity signature.

MICROSATELLITE_INSTABILITY

Represents the microsatellite instability signature.

HOMOLOGOUS_RECOMBINATION_DEFICIENCY

Represents the homologous recombination deficiency signature.

TUMOR_NEOANTIGEN_BURDEN

Represents the tumor neoantigen burden signature.

ANEUPLOID_SCORE

Represents the aneuploid score signature.

ANEUPLOID_SCORE class-attribute instance-attribute

HOMOLOGOUS_RECOMBINATION_DEFICIENCY class-attribute instance-attribute

LOSS_OF_HETEROZYGOSITY class-attribute instance-attribute

MICROSATELLITE_INSTABILITY class-attribute instance-attribute

TUMOR_MUTATIONAL_BURDEN class-attribute instance-attribute

TUMOR_NEOANTIGEN_BURDEN class-attribute instance-attribute

HomologousRecombinationDeficiency

Bases: GenomicSignature

Model representing Homologous Recombination Deficiency (HRD) as a genomic signature.

Attributes:

Name Type Description
genomic_signature OneToOneField[GenomicSignature]

One-to-one relationship to the base GenomicSignature model.

value FloatField

HRD score value, must be non-negative. Can be null or blank.

interpretation CharField[HomologousRecombinationDeficiencyPresence]

Interpretation of HRD status, can be 'positive', 'negative', or 'indeterminate'.

description str

Returns a string representation of the HRD value or interpretation.

description property

genomic_signature class-attribute instance-attribute

interpretation class-attribute instance-attribute

value class-attribute instance-attribute

Meta

verbose_name_plural class-attribute instance-attribute

HomologousRecombinationDeficiencyInterpretationChoices

Bases: TextChoices

INDETERMINATE class-attribute instance-attribute

NEGATIVE class-attribute instance-attribute

POSITIVE class-attribute instance-attribute

LossOfHeterozygosity

Bases: GenomicSignature

Represents the Loss of Heterozygosity (LOH) genomic signature.

Attributes:

Name Type Description
genomic_signature OneToOneField[GenomicSignature]

One-to-one link to the base genomic signature.

value FloatField

LOH value as a percentage (0-100).

description str

Returns a human-readable description of the LOH value.

description property

genomic_signature class-attribute instance-attribute

value class-attribute instance-attribute

Meta

verbose_name_plural class-attribute instance-attribute

MicrosatelliteInstability

Bases: GenomicSignature

Represents the Microsatellite Instability (MSI) genomic signature.

This model extends GenomicSignature and provides a classification for MSI status using a coded concept field. MSI is an important biomarker in oncology, indicating the presence of genetic hypermutability due to impaired DNA mismatch repair.

Attributes:

Name Type Description
genomic_signature OneToOneField[GenomicSignature]

One-to-one link to the base genomic signature.

value CodedConceptField[MicrosatelliteInstabilityState]

MSI classification, based on a controlled terminology.

description str

Human-readable description of the MSI status.

description property

genomic_signature class-attribute instance-attribute

value class-attribute instance-attribute

Meta

verbose_name_plural class-attribute instance-attribute

TumorMutationalBurden

Bases: GenomicSignature

Represents the Tumor Mutational Burden (TMB) genomic signature.

Attributes:

Name Type Description
genomic_signature OneToOneField[GenomicSignature]

One-to-one link to the base GenomicSignature.

value FloatField

The TMB value in mutations/Mb. Must be non-negative.

status CharField

Classification of the TMB status. Choices are 'low', 'high', 'intermediate', or 'indeterminate'.

description str

Returns a human-readable description of the TMB value.

description property

genomic_signature class-attribute instance-attribute

status class-attribute instance-attribute

value class-attribute instance-attribute

TumorMutationalBurdenStatusChoices

Bases: TextChoices

An enumeration representing the possible statuses of Tumor Mutational Burden (TMB).

Attributes:

Name Type Description
LOW

Indicates a low tumor mutational burden.

HIGH

Indicates a high tumor mutational burden.

INTERMEDIATE

Indicates an intermediate tumor mutational burden.

INDETERMINATE

Indicates that the tumor mutational burden status cannot be determined.

HIGH class-attribute instance-attribute

INDETERMINATE class-attribute instance-attribute

INTERMEDIATE class-attribute instance-attribute

LOW class-attribute instance-attribute

TumorNeoantigenBurden

Bases: GenomicSignature

Represents the Tumor Neoantigen Burden (TNB) genomic signature.

Attributes:

Name Type Description
genomic_signature OneToOneField[GenomicSignature]

One-to-one relationship to the base GenomicSignature.

value FloatField

The measured TNB value in neoantigens per megabase. Must be non-negative.

description str

Returns a formatted string describing the TNB value.

description property

genomic_signature class-attribute instance-attribute

value class-attribute instance-attribute

runner