Code for Y chromosome paper