The present application provides methods and uses of O-oligosaccharyltransferase (O-OTases) for generating vaccines. In particular, the present application provides a method of synthesizing a glycoprotein comprising glycosylation of pilin-like protein ComP using a Pg1L