Catalyzes the transfer of glucose from uridine diphosphoglucose to 5-hydroxymethyl cytosine of T4 DNA to yield glucosyl 5-hydroxymethyl cytosine (glc-HMC) (PubMed:15381072). This DNA process seems to occur immediately after DNA synthesis since the DNA alpha-glucosyltransferase interacts with the clamp protein gp45 (PubMed:15381072). The glc-HMC modification protects the phage genome against its own nucleases and the host restriction endonuclease system (PubMed:15381072). The glc-HMC modification also protects against the host CRISPR-Cas9 defense system (PubMed:26081634). Transfers an alpha-D-glucosyl residue from UDP-glucose to a hydroxymethylcytosine residue in DNA. Genetic information processing; DNA modification. Interacts with clamp protein gp45.