Which genetic marker is most closely associated with the pathogenesis of ankylosing spondylitis (AS)?