Skip to content

mecfs_bio.constants.genomic_coordinate_constants

Note: According to the paper Horton, Roger, et al. "Gene map of the extended human MHC." Nature Reviews Genetics 5.12 (2004): 889-899. The extended MHC region is defined as being between the HIST1H2AA gene and the RPL12P1 pseudo-gene.

According to https://www.genecards.org/cgi-bin/carddisp.pl?gene=H2AC1,
HIST1H2AA starts at position 25726291 in genome build 37

According to https://www.genecards.org/cgi-bin/carddisp.pl?gene=RPL12P1

RPL12P1 ends at genome position 33368421 in genome build 37

Functions:

Attributes:

EXTENDED_MHC_BUILD_37 module-attribute

EXTENDED_MHC_BUILD_37 = GenomicInterval(
    start=EXTENDED_MHC_START_BUILD_37,
    end=EXTENDED_MHC_END_BUILD_37,
    chrom=6,
)

EXTENDED_MHC_END_BUILD_37 module-attribute

EXTENDED_MHC_END_BUILD_37 = 33368421

EXTENDED_MHC_START_BUILD_37 module-attribute

EXTENDED_MHC_START_BUILD_37 = 25726291

GenomeBuild module-attribute

GenomeBuild = Literal['19', '38']

MHCRegion module-attribute

MHCRegion = Literal['classical', 'extended']

extended_mhc_interval

extended_mhc_interval(
    build: GenomeBuild,
) -> GenomicInterval

Return the extended MHC region for the given genome build.

Only build 19 (equivalently GRCh37) is currently supported; build-38 coordinates have not been added yet, so this raises for build 38.

Source code in mecfs_bio/constants/genomic_coordinate_constants.py
def extended_mhc_interval(build: GenomeBuild) -> GenomicInterval:
    """Return the extended MHC region for the given genome build.

    Only build 19 (equivalently GRCh37) is currently supported; build-38
    coordinates have not been added yet, so this raises for build 38.
    """
    if build == "19":
        return EXTENDED_MHC_BUILD_37
    raise ValueError(f"Extended MHC region not implemented for genome build {build}")