The HLA-B gene helps your immune system tell the difference between your own cells and germs by displaying small protein pieces for immune cells to check. This gene plays an important role in how your body recognizes infections and in matching donors and recipients for organ or stem cell transplants. If HLA-B does not work as expected, immune responses can become misdirected, which can contribute to certain autoimmune conditions or transplant rejection. Some HLA-B variants can also raise the chance of specific drug reactions, such as severe sensitivity to the HIV medicine abacavir in people with HLA-B*57:01.

What is a gene?

Genes are pieces of DNA that carry instructions your cells use to make certain molecules or to guide how the body runs. Some genes provide the directions for building proteins, which do much of the day-to-day work inside cells. Others are more involved in regulating when particular activities happen, where they occur, and how active they are. Taken together, genes help shape how your body grows and works, and they may affect how you react to food, stress, or medicines. More information on this topic is available in the LearnHub.

Overview

HLA-B

Gene function

What if the gene works

The HLA-B gene displays small protein pieces on cell surfaces so immune T cells can tell self from infection. It also influences tissue matching used in organ transplantation.

Risk

What if the gene does not work

Changes in the HLA-B gene can shift immune recognition, which may contribute to certain autoimmune diseases and, for some variants, severe drug hypersensitivity reactions. Variant effects range from mild to severe, influencing which symptoms occur and how early they start.

Treatment

What does that mean for your treatment

Some variants in the HLA-B gene guide safer prescribing because they can raise the chance of immune drug reactions. HLA-B*57:01 affects abacavir use, HLA-B*15:02 affects carbamazepine and oxcarbazepine, and HLA-B*58:01 affects allopurinol. A simple genetic test can help choose alternatives.

Conditions associated with HLA-B

Ankylosing spondylitis 1Behçet diseaseGiant cell arteritisPulmonary arterial hypertension associated with connective tissue diseaseReactive arthritisStevens-johnson syndromeTakayasu arteritis

Gene function

What if the gene works

Every day, your immune system scans your cells for signs of infection or unusual activity. Across many tissues, the HLA-B gene contributes to this steady, routine immune checking by helping cells show what is happening inside them. This gives immune cells the information they need to respond in a targeted, controlled way.

Peptide display

The HLA-B gene helps make a surface protein that carries tiny pieces of proteins (peptides) from inside a cell. This display acts like a snapshot of what the cell is making at that moment.

Immune recognition

Immune cells read the HLA-B display to decide whether a cell looks typical or needs attention. This supports the work of killer T cells (T cells that can destroy infected cells) and natural killer cells, which focus on cells that stand out.

Tissue matching

HLA-B is a key part of your tissue type used in HLA-B matching for organ transplant and stem cell transplant. Good matching helps the immune system recognize the donated tissue as closer to “self.”

What is a variant?

A genetic variant is a minor difference in the DNA code within a gene. These differences are very common and are part of what makes people naturally diverse, including variations in appearance, metabolism, or how the body reacts to environmental factors. Many variants do not lead to any obvious changes and are simply normal genetic differences. Sometimes, though, a variant can affect how a gene works more strongly and may help contribute to, or directly cause, a genetic condition.

Variant illustration

Genetic variants

What if the gene does not work

Small changes in the HLA-B gene can shift how your immune system “reads” protein fragments, which may tilt inflammation, infection responses, or self-directed immune activity in subtle ways. Some HLA-B variants also change how the body reacts to certain medicines, including the well-known link between HLA-B*57:01 abacavir hypersensitivity. Effects vary by the specific HLA-B allele, so some changes have little day-to-day impact while others are more strongly tied to particular immune conditions or drug reactions.

How variants are linked to conditions

Certain HLA-B gene variants are linked to immune-related conditions and specific severe drug reactions, so HLA-B gene variants and disease risk are often discussed together. HLA-B27 is strongly associated with ankylosing spondylitis and related spondyloarthritis, although many carriers never develop these conditions. Other well-established links include HLA-B*57:01 with abacavir hypersensitivity and HLA-B*15:02 with carbamazepine-related Stevens-Johnson syndrome or toxic epidermal necrolysis, and HLA-B*51 with higher risk of Behçet disease.

A variant is not necessarily a diagnosis

Genetic variants are a routine feature of human biology, and they occur frequently across the general population. Most variants do not directly affect health and instead represent normal human diversity. For many genes, having a variant that has been linked to a condition points to a possible association rather than a certain diagnosis, particularly when many genes and environmental influences play a role. In certain situations, though, one well-studied variant in a particular gene can be enough to confirm a diagnosis.

Dr. Wallerstorfer Dr. Wallerstorfer

Are there things that can increase or change my risk?

With certain HLA-B types, the biggest risk change comes from specific triggers—especially certain medicines—rather than lifestyle. For example, abacavir, allopurinol, and carbamazepine can cause severe allergic-type reactions in people with certain HLA-B variants, so avoiding those drugs and using safer alternatives can prevent the reaction. For autoimmune conditions linked to HLA-B, there is not enough evidence to say lifestyle changes lower genetic risk.

Inheritance of HLA-B variants

HLA-B gene variants are inherited from both parents, and you typically carry two versions that are both expressed (called codominant inheritance). This explains how HLA-B gene variants are inherited within families: you inherit one HLA-B version on an HLA “haplotype” from each parent. Each child has a 50% chance to share one parental HLA haplotype with a sibling and a 25% chance to match both.

What does my HLA-B result mean for my family?

Seek medical advice if you or close relatives have had a severe allergic reaction to certain medicines, especially abacavir (an HIV medicine), because changes linked to the HLA-B gene can predict this risk. Get urgent care for trouble breathing, widespread rash, swelling, fever, or severe mouth or skin sores after starting a new drug. A clinician can use HLA-B results to help choose safer treatment options for you and, sometimes, for family members.


Genetic information


Genetic testing

How you find out about variants

Genetic testing for HLA-B variants can show whether you carry a specific HLA-B type, such as the HLA-B*57:01 genetic test used in some clinical settings. A lab analyzes DNA from a cheek swab, saliva, or blood sample and reports your HLA-B result in a written lab report.

When should I consider getting a genetic test?

Consider HLA-B genetic testing before starting abacavir (HIV medicine), carbamazepine (seizure medicine), or allopurinol (gout medicine), because some HLA-B types greatly raise the chance of a dangerous drug reaction. It may also help when you or a close relative needs an organ or stem-cell transplant, since matching HLA-B can affect acceptance.

A genetic result is only one part of your health story

Genetic test results can be very informative, but what they can tell you varies based on the condition and the specific type of variant found. Your health over time is also shaped by many factors, including lifestyle, environment, age, and your medical history. For some conditions, particularly those affected by many genes, genetic findings provide helpful background rather than a definite prediction and make the most sense when considered with the rest of your care. In other situations, a genetic result can be more straightforward and give a clear explanation. For topics like how you respond to certain medications, genetic information can help put your personal experiences into context.

Dr. Wallerstorfer Dr. Wallerstorfer

Pharmacogenetics

How variants shape your response to medicine

Certain changes in the HLA-B gene are well known to raise the chance of rare but severe immune reactions to specific medicines, such as abacavir and some seizure or gout treatments. HLA-B helps your immune system tell “self” from “foreign,” and some variants can make the immune system react to a drug as if it were a threat. This helps explain why the same medication may work well for one person but cause a widespread rash, fever, or other serious side effects in another. Pharmacogenetic information is common in medicine, and when it is available it can be used with your health history to guide safer medication choices.

What is Pharmacogenetics?

Pharmacogenetics focuses on how differences in your genes can affect the way you respond to medications. It examines connections between specific genes and drugs to explain why the same treatment may have different effects in different people. For many medicines, genetic factors can influence how powerfully a drug works or how your body breaks it down. This information can support more personalized, better informed treatment choices. More details on this topic are available in the LearnHub.


Drugs influenced by the HLA-B gene

There are 0 Drugs associated with HLA-B
Currently no available information

When should I seek medical advice?

Seek medical care right away for a widespread rash, blistering, mouth sores, facial swelling, or trouble breathing after starting a new medicine, because some HLA-B types raise the risk of severe reactions. Share any known HLA-B result with your clinician and pharmacist before medicines such as carbamazepine, allopurinol, or abacavir.

History

HLA-B became important in medicine as scientists worked to explain why some organ transplants succeeded while others were rejected. In the 1950s and 1960s, researchers identified the human leukocyte antigen (HLA) system and began mapping key markers, including HLA-B, that could be used to match donors and recipients. In the early 1970s, the strong link between HLA-B27 and ankylosing spondylitis helped bring HLA-B into everyday clinical genetics. Building on this early work, scientists uncovered that certain HLA-B types also shape how some people respond to infections. In the 2000s, HLA-B*57:01 testing became a landmark example of using genetics to reduce the chance of a severe reaction to the HIV medicine abacavir.

Literature

DISCLAIMER: The materials present on Genopedia.com, such as text, images, graphics, among other items (“Content”), are shared purely for informational reasons. This content should not replace professional health advice, medical diagnoses, or treatment procedures. Whenever you have health concerns or questions, it’s always recommended to engage with your doctor or another appropriate healthcare provider. If you read something on the Genopedia.com site, do not neglect professional medical counsel or delay in obtaining it. In case you believe you’re dealing with a medical crisis, get in touch with your medical professional or call emergency without delay. Genopedia.com doesn’t advocate for any particular medical tests, healthcare providers, products, methods, beliefs, or other data that could be discussed on the site. Please also note that the content, originally written in English and in part created with the help of artificial intelligence, is provided without any warranty, and any reliance on information offered by Genopedia.com, its staff, contributors invited by Genopedia.com, or site users is entirely at your own risk.
Genopedia © 2026 all rights reserved