Catalyzes the initial reaction in O-linked oligosaccharide biosynthesis, the transfer of an N-acetyl-D-galactosamine residue to a serine or threonine residue on the protein receptor (PubMed:12829714). It can both act as a peptide transferase that transfers GalNAc onto unmodified peptide substrates, and as a glycopeptide transferase that requires the prior addition of a GalNAc on a peptide before adding additional GalNAc moieties. Prefers the monoglycosylated Muc5AC-3 as substrate (PubMed:12829714). L-seryl-[protein] + UDP-N-acetyl-alpha-D-galactosamine = 3-O-[N-acetyl-alpha-D-galactosaminyl]-L-seryl-[protein] + H(+) + UDP L-threonyl-[protein] + UDP-N-acetyl-alpha-D-galactosamine = 3-O-[N-acetyl-alpha-D-galactosaminyl]-L-threonyl-[protein] + H(+) + UDP Protein modification; protein glycosylation. Expressed in developing oocytes and egg chambers. No expression observed during embryonic stages 9-11. During embryonic stages 12-13, specific expression is observed in the developing tracheal branches and brain. During embryonic stages 14-17, expression is restricted to the dorsal longitudinal trachea. In third instar larvae imaginal wing disk, expressed in clusters of cells in the presumptive pleura and notum. In eye-antennal imaginal disk, shows a very distinct band of expression at the morphogenetic furrow and weaker expression in the presumptive eye posterior to the furrow, no expression is detected in the presumptive antennal or head region anterior to the furrow. No expression observed in leg or haltere imaginal disks. Expressed both maternally and zygotically. Expressed throughout embryonic, larval, pupal and adult stages, with increasing levels during larval development. There are two conserved domains in the glycosyltransferase region: the N-terminal domain (domain A, also called GT1 motif), which is probably involved in manganese coordination and substrate binding and the C-terminal domain (domain B, also called Gal/GalNAc-T motif), which is probably involved in catalytic reaction and UDP-Gal binding. The ricin B-type lectin domain binds to GalNAc and contributes to the glycopeptide specificity. Belongs to the glycosyltransferase 2 family. GalNAc-T subfamily.