I think the best solution to do this is to DON'T.

The entire idea of having a sex-based magic system where a certain chromosome weakens or disables one's magical ability is a can of worms on its own, and when poorly done becomes a sexist display at worst and a pointless piece of fluff at best. Unless you have players who actively and specifically want to explore the ideas of transsexualism in your campaign, it merely introduces a whole new factor that can distract your players if they don't see it as you inviting them into your "magical realm" (It doesn't really matter if the game would be good or not from that point on-- as a DM, your job is to lead your players down an interesting story, and if they aren't interested in your story, that failure is on you). Most people play role-playing games to escape from the every day, and introducing something that is a strong point of contention in the modern day can easily drag them out of the experience or start arguments between players.