Impact of sex on inheritance of ankylosing spondylitis: a cohort study