Effects of selection and mutation on epidemiology of X-linked genetic diseases