Hereditary illness and kamma Many physical and mental illnesses are genetic or hereditary, whether partially or completely, the contributing factor is genetic, nevertheless.

For example, you are born into a family that has genetic illness e.g. anxiety disorder, compulsive disorder, cancer, diabetes, to name a few. 

The question is, since genetic or hereditary illness will then pass down to your children.
If you get married and have children, as parents, are you doing bad kamma?
Hereditary illness or not...the offspring you will produce will become old, fall ill and die. The dukkha is inevitable. We may as well say that dukkha is hereditary to all humans so  should we have kids?

If your intention in having a child is good, if the child is born out of love and not lust, if child is born not out of any form of sexual misconduct...then you will be fine...there will be no bad kamma.