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 (By similarity). a 5'-end (N(7)-methyl 5'-triphosphoguanosine)-ribonucleoside in mRNA + S-adenosyl-L-methionine = a 5'-end (N(2),N(7)-dimethyl 5'-triphosphoguanosine)-ribonucleoside in mRNA + H(+) + S-adenosyl-L-homocysteine a 5'-end (N(2),N(7)-dimethyl 5'-triphosphoguanosine)-ribonucleoside in mRNA + S-adenosyl-L-methionine = a 5'-end (N(2),N(2),N(7)-trimethyl 5'-triphosphoguanosine)-(ribonucleoside) in mRNA + H(+) + S-adenosyl-L-homocysteine May form homooligomers. Interacts with CREBBP/CBP, EED/WAIT1, EP300/P300, NCOA6/PRIP, PPARBP/PBP and SMN (By similarity). A 55 kDa isoform is widely expressed while a 90 kDa isoform is detected exclusively in brain and testis (at protein level). Belongs to the methyltransferase superfamily. Trimethylguanosine synthase family.