Genetic testing can be done in some women to determine if they carry genes that can put them at increased risk for developing breast or ovarian cancers. If such genes are found, some women decide to have their breasts and ovaries surgically removed to prevent the development of cancer.