I think I had a decent hypothesis at some point. The magic gene allows the soul to control magic energy nearby it. Twisting it up in the right way turns it into a specific magic, and magic circles are used to prevent too much soul loss.