The function of TGS1 (trimethylguanosine synthase 1, Ensembl gene identifier ENSG00000137574) is as follows. Catalyzes the 2 serial methylation steps for the conversion of the 7-monomethylguanosine (m(7)G) caps of snRNAs and snoRNAs to a 2,2,7-trimethylguanosine (m(2,2,7)G) cap structure. The enzyme is specific for guanine, and N7 methylation must precede N2 methylation. Hypermethylation of the m7G cap of U snRNAs leads to their concentration in nuclear foci, their colocalization with coilin and the formation of canonical Cajal bodies (CBs). Plays a role in transcriptional regulation. {ECO:0000269|PubMed:11517327, ECO:0000269|PubMed:11912212, ECO:0000269|PubMed:16687569, ECO:0000269|PubMed:18775984}.