Skip to content

mecfs_bio.constants.allele_frequency_panel_constants

Ancestry vocabularies of the allele-frequency panels used by genome-reference harmonization.

A panel declares which ancestries it carries, and each harmonization names the one that matches its GWAS. The vocabularies are deliberately disjoint: "eur" is the 1000 Genomes EUR super-population, gnomAD groups are bare gnomAD codes (nfe, afr, ...), and Pan-UKBB groups carry a ukb_ prefix. "eur", "nfe" and "ukb_eur" are different populations and never synonyms.

Panels built from multi-ancestry sources name their columns AF_ and AN_.

Functions:

  • panel_af_col –

    Name of a multi-ancestry panel's allele-frequency column for one ancestry.

  • panel_an_col –

    Name of a multi-ancestry panel's allele-number column for one ancestry.

Attributes:

GnomadGroup module-attribute

GnomadGroup = GnomadV2Group | GnomadV4Group

GnomadV2Group module-attribute

GnomadV2Group = Literal[
    "afr",
    "amr",
    "asj",
    "eas",
    "fin",
    "nfe",
    "nfe_est",
    "nfe_nwe",
    "nfe_onf",
    "nfe_seu",
    "oth",
]

GnomadV4Group module-attribute

GnomadV4Group = Literal[
    "afr",
    "ami",
    "amr",
    "asj",
    "eas",
    "fin",
    "mid",
    "nfe",
    "remaining",
    "sas",
]

PANEL_AF_PREFIX module-attribute

PANEL_AF_PREFIX = 'AF_'

PANEL_AN_PREFIX module-attribute

PANEL_AN_PREFIX = 'AN_'

PanUkbbGroup module-attribute

PanUkbbGroup = Literal[
    "ukb_afr",
    "ukb_amr",
    "ukb_csa",
    "ukb_eas",
    "ukb_eur",
    "ukb_mid",
]

PanelAncestry module-attribute

PanelAncestry = (
    GnomadGroup
    | PanUkbbGroup
    | ThousandGenomesSuperPopulation
)

ThousandGenomesSuperPopulation module-attribute

ThousandGenomesSuperPopulation = Literal['eur']

panel_af_col

panel_af_col(ancestry: PanelAncestry) -> str

Name of a multi-ancestry panel's allele-frequency column for one ancestry.

Source code in mecfs_bio/constants/allele_frequency_panel_constants.py
def panel_af_col(ancestry: PanelAncestry) -> str:
    """Name of a multi-ancestry panel's allele-frequency column for one ancestry."""
    return PANEL_AF_PREFIX + ancestry

panel_an_col

panel_an_col(ancestry: PanelAncestry) -> str

Name of a multi-ancestry panel's allele-number column for one ancestry.

Source code in mecfs_bio/constants/allele_frequency_panel_constants.py
def panel_an_col(ancestry: PanelAncestry) -> str:
    """Name of a multi-ancestry panel's allele-number column for one ancestry."""
    return PANEL_AN_PREFIX + ancestry