S-adenosylmethionine-dependent methyltransferase activity