An incredibly detailed scientific explanation of Harry Potter's "wizarding gene"

Wizards don't necessarily beget wizards in the world of Harry Potter. Although two magical parents or one magical parent and one non-magical parent usually results in a magic-wielding offspring, you frequently get characters like Hermione, who have two non-magical parents, and sometimes squibs like Mr. Filch, people who can't wield magic despite being born to a witch and a wizard. So how is the wizarding gene passed down?

JK Rowling has claimed that the magic gene is dominant, but that's left many fans unsatisfied. If it's dominant, how come neither of Hermione's parents possessed magical abilities? Potter fan Andrea Klenotiz decided to try applying her knowledge of genetics to Rowling's world, and claims she has come up with a scenario for a dominant magic gene that accounts for squibs and Muggle-borns that goes beyond Punnett squares. She starts:

I read your statement that the wizarding gene is dominant. I have heard criticism that this does not explain muggle-borns, squibs, or the steady inheritance pattern of magical abilities; but I got your back. Magical ability could be explained by a single autosomal dominant gene if it is caused by an expansion of trinucleotide repeats with non-Mendelian ratios of inheritance.

As we all know, DNA is made up of the nucleotide bases guanine, cytosine, adenine, and thymine. The sequences of these bases determine what products are transcribed. Trinucleotide repeats are one such possible sequence. Huntington's disease is a well-known genetic condition. The Huntington's Disease Collaborative Research Group (1993) proved that the disease was caused by CAG (cytosine-adenine-guanine) trinucleotide repeats. The Huntington gene is dominant and autosomal (not linked to sex chromosomes). Normally, a person has 11 to 34 CAG repeats in the gene of interest, which causes the transcription of the normal huntingtin protein. Unfortunately, when an individual has 42 to over 66 CAG repeats, the abnormal huntingtin protein transcribed causes serious symptoms later in life. The huntingtin gene with an abnormal number of repeats shows dominant patterns of inheritance over the huntingtin gene containing a normal number of repeats. Let us postulate that the gene determining magical ability contains trinucleotide repeats.

She continues to present her argument for a dominant magic gene, but then shifts gears into other possibilities. Her preferred scenario for magical genetics? That all magical ability stems from mutations to Muggle DNA. This leads into some interesting theories about so-called "pure-blood" families, whose blood might not be as Muggle-free as they suspected. Klenotiz also includes numerous resources to back up her theories, so that others may debate the finer points of the wizard genome.

I sent this paper to JK Rowling explaining how the wizarding gene could be singular, autosomal, and dominant... [Fus Ro Dah via It's Okay to be Smart]