Your genes are passed down to you from your parents. At the moment of conception, you inherit half of your genes from your mother and the other half from your father.

You inherit genes that determine your hair, eye, and skin color, but you can also inherit genes that lead to health problems. In some cases, parents pass down genes for diseases, such as breast cancer.

Although inherited genes can cause breast cancer, they aren’t always the cause. In fact, only 5 to 10 percent of breast cancers are related to inherited genes. Breast cancer can also be caused by gene mutations that are not inherited.

Human epidermal growth factor receptor 2 (HER2) is a gene that creates HER2 proteins. HER2 proteins are found on the surface of breast cells and promote breast cell growth.

In a healthy breast cell, HER2 is responsible for repairing the cell and growing more cells. If the HER2 gene is mutated, it causes an abnormal increase the amount of HER2 proteins on the surface of the cells.

This causes cells to grow and divide out of control, which may lead to cancer. About 20 percent of breast cancers are HER2-positive, meaning the HER2 gene doesn’t function correctly.

HER2-positive breast cancer is not inherited. Instead, it’s considered a somatic genetic mutation. This type of mutation occurs after conception. Having a close relative with HER2-positive breast cancer does not increase your risk for breast cancer or HER2-positive breast cancer.

HER2-positive breast cancers are sometimes more aggressive than other types of breast cancer. If you’ve been diagnosed with breast cancer, your doctor may conduct a test to determine if your breast cancer is HER2-positive. If so, this will affect your treatment course.

Two types of tests can determine your HER2 status: the immunohistochemistry assay (IHC) and the in situ hybridization test (ISH). These tests are performed on a sample of the tumor.

HER2 tests are sometimes inaccurate, however. Talk with your doctor about their confidence in your test results. If you’re concerned, or if your results are inconclusive, ask for a second HER2 test. If your cancer is HER2-positive, specific and targeted therapies are available to treat it.

Some inherited breast cancer cases can be traced to what are called breast cancer gene one (BRCA1) or breast cancer gene two (BRCA2).

Everyone has both BRCA1 and BRCA2 genes. Like the HER2 gene, they’re designed to repair cell damage and help restore normal, healthy breast cells. In some people, however, these genes stop performing properly. This increases the risk for breast cancer.

These abnormal gene mutations can be passed from generation to generation. If you’ve had a mother, grandmother, sister, or aunt with breast cancer or ovarian cancer before age 50, you may be more likely to have the mutated gene.

During their lifetime, women with a mutation in the BRCA1 or BRCA2 gene can have up to a 72 percent risk of being diagnosed with breast cancer. However, having the mutated gene doesn’t guarantee you’ll develop breast cancer.

Many other genes have been found to be related to an increased risk of breast cancer, including TP53, ATM, PALB2, PTEN and CHEK2.

A genetic test can tell you if you have any mutations in genes that are related to an increased risk of breast cancer. It’s important to know that genetic testing is most helpful when you have a strong family history of either breast or ovarian cancer or a personal history of breast cancer.

If you’d like to be tested, contact your doctor or your hospital’s education office. Ask for a recommendation for a genetic counselor. Make an appointment and discuss the risks of undergoing genetic testing.

Your genes may affect your risk for breast cancer, but your lifestyle can have an impact as well. Whether or not you have a genetic mutation, it’s important to lower your risk whenever you can.

The following preventive measures may help you avoid a breast cancer diagnosis.

Maintain a healthy weight

Women who are overweight or obese may have a higher risk for developing breast cancer and other cancers.

Eat well

A balanced diet can help you maintain a healthy weight, and it also provides your body with plenty of vitamins, minerals, and nutrients it needs to stay well.

Exercise regularly

Being physically active can help you achieve and maintain a healthy weight. Exercise also reduces your risk for certain diseases, including cancer, heart disease, and depression.

Stop smoking

People who smoke are more likely to develop breast cancer.

Reduce your alcohol consumption

Drinking alcohol, including wine, beer, and spirits, may increase your risk for breast cancer.

HER2-positive breast cancer is not hereditary, but some other types of gene mutations related to breast cancer are inherited. Genetic testing can tell you if you have any of the mutations currently known to increase risk for breast cancer or other cancers.