It can but that does not necessarily mean that there is a genetic link.  It could just be that members of the same family share the same colonic bacteria, eat the same diet, have the same stresses and identify with each other’s symptoms.