Harry Potter and the Methods of Rationality, which is fan fiction where Harry Potter is a scientist and tries to scientifically figure out all the rules of magic, talks at a great deal of length on this. If I remember correctly, it is likely that the "magic gene", if such exists, is recessive...