Skip to content

mecfs_bio.build_system.task.genome_reference_harmonization.outcomes

Named outcomes of genome-reference harmonization: allele actions, palindrome decisions and drop reasons.

Each Literal alias is what the type checker sees; the constants are what code uses, so no outcome string is typed more than twice (once in the alias, once in its constant). An import-time assertion keeps each alias and its constants in step. A StrEnum cannot replace them, because polars converts Python Enum members into its own Enum dtype inside expressions.

Attributes:

ACTION_COMPLEMENT module-attribute

ACTION_COMPLEMENT: Final[AlleleAction] = 'complement'

ACTION_COMPLEMENT_SWAP module-attribute

ACTION_COMPLEMENT_SWAP: Final[AlleleAction] = (
    "complement_swap"
)

ACTION_KEEP module-attribute

ACTION_KEEP: Final[AlleleAction] = 'keep'

ACTION_SWAP module-attribute

ACTION_SWAP: Final[AlleleAction] = 'swap'

AlleleAction module-attribute

AlleleAction = Literal[
    "keep", "swap", "complement", "complement_swap"
]

DROP_AMBIGUOUS_INDEL_AF_INDECISIVE module-attribute

DROP_AMBIGUOUS_INDEL_AF_INDECISIVE: Final[DropReason] = (
    "ambiguous_indel_af_indecisive"
)

DROP_AMBIGUOUS_INDEL_AF_MISMATCH module-attribute

DROP_AMBIGUOUS_INDEL_AF_MISMATCH: Final[DropReason] = (
    "ambiguous_indel_af_mismatch"
)

DROP_AMBIGUOUS_INDEL_NOT_IN_PANEL module-attribute

DROP_AMBIGUOUS_INDEL_NOT_IN_PANEL: Final[DropReason] = (
    "ambiguous_indel_not_in_panel"
)

DROP_AMBIGUOUS_INDEL_NO_EAF module-attribute

DROP_AMBIGUOUS_INDEL_NO_EAF: Final[DropReason] = (
    "ambiguous_indel_no_eaf"
)

DROP_INDEL_NOT_ON_REFERENCE module-attribute

DROP_INDEL_NOT_ON_REFERENCE: Final[DropReason] = (
    "indel_not_on_reference"
)

DROP_INVALID_ALLELE module-attribute

DROP_INVALID_ALLELE: Final[DropReason] = 'invalid_allele'

DROP_NOT_ON_REFERENCE module-attribute

DROP_NOT_ON_REFERENCE: Final[DropReason] = (
    "not_on_reference"
)

DROP_PALINDROME_UNRESOLVED module-attribute

DROP_PALINDROME_UNRESOLVED: Final[DropReason] = (
    "palindrome_unresolved"
)

DROP_PALINDROMIC_MNP_UNTRUSTED module-attribute

DROP_PALINDROMIC_MNP_UNTRUSTED: Final[DropReason] = (
    "palindromic_mnp_untrusted"
)

DropReason module-attribute

DropReason = Literal[
    "invalid_allele",
    "not_on_reference",
    "indel_not_on_reference",
    "palindromic_mnp_untrusted",
    "palindrome_unresolved",
    "ambiguous_indel_no_eaf",
    "ambiguous_indel_not_in_panel",
    "ambiguous_indel_af_mismatch",
    "ambiguous_indel_af_indecisive",
]

PALINDROME_KEEP module-attribute

PALINDROME_KEEP: Final[PalindromeDecision] = 'keep'

PALINDROME_STRAND_FLIP module-attribute

PALINDROME_STRAND_FLIP: Final[PalindromeDecision] = (
    "strand_flip"
)

PALINDROME_UNRESOLVED module-attribute

PALINDROME_UNRESOLVED: Final[PalindromeDecision] = (
    "unresolved"
)

PalindromeDecision module-attribute

PalindromeDecision = Literal[
    "keep", "strand_flip", "unresolved"
]