There are four known genes encoded by the genome, called C, X, P, and S. The core protein is coded for by gene C (HBcAg), and its start codon is preceded by an upstream in-frame AUG start codon from which the pre-core protein is produced. HBeAg is produced by proteolytic processing of the pre-core protein. In some rare strains of the virus known as Hepatitis B virus precore mutants, no HBeAg is present. The DNA polymerase is encoded by gene P. Gene S is the gene that codes for the surface antigen (HBsAg). The HBsAg gene is one long open reading frame but contains three in frame "start" (ATG) codons that divide the gene into three sections, pre-S1, pre-S2, and S. Because of the multiple start codons, polypeptides of three different sizes called large (the order from surface to the inside: pre-S1, pre-S2, and S ), middle (pre-S2, S), and small (S) are produced. There is a myristyl group, which plays an important role in infection, on the amino-terminal end of the preS1 part of the large (L) protein. In addition to that, N terminus of the L protein have virus attachment and capsid binding sites. Because of that, the N termini of half of the L protein molecules are positioned outside the membrane and the other half positioned inside the membrane.The function of the protein coded for by gene X is not fully understood but it is associated with the development of liver cancer.
Other risk factors include working in healthcare, blood transfusions, dialysis, living with an infected person, travel in countries with high infection rates, and living in an institution. Tattooing and acupuncture led to a significant number of cases in the 1980s; however, this has become less common with improved sterilization. The hepatitis B viruses cannot be spread by holding hands, sharing eating utensils, kissing, hugging, coughing, sneezing, or breastfeeding. The infection can be diagnosed 30 to 60 days after exposure. The diagnosis is usually confirmed by testing the blood for parts of the virus and for antibodies against the virus. It is one of five main hepatitis viruses: A, B, C, D, and E. During an initial infection, care is based on a persons symptoms. In those who develop chronic disease, antiviral medication such as tenofovir or interferon may be useful; however, these drugs are expensive. Liver transplantation is sometimes recommended for cases of cirrhosis or hepatocellular carcinoma.Hepatitis B infection has been preventable by vaccination since 1982. As of 2022, the hepatitis B vaccine is between 98% and 100% effective in preventing infection. The vaccine is administered in several doses; after an initial dose, two or three more vaccine doses are required at a later time for full effect. The World Health Organization (WHO) recommends infants receive the vaccine within 24 hours after birth when possible. National programs have made the hepatitis B vaccine available for infants in 190 countries as of the end of 2021.