Computing categ values for MutSigCV input mutation tables

I have questions about how to compute the MutSigCV mutation table's categ values:

1. The documentation mentions that if this field is not specified in the existing maf, it can be computed using the pre-processing function of MutSigCV. However, no information is provided on how to execute this pre-processing function, or even what it requires as input. Could you please direct me to some documentation on the pre-processing step, ideally with an example?

2. In some cases, I have maf files that include sequence information on sites flanking the somatic mutations. In these instances, I can compute the categ values myself, but to do so, I need to be consistent in what is defined as a CpG transition/transversion. According to the conventions for the categ field, does a CpG mutation (whether transition or transversion) only refer to mutations in the 5' cytosine, or in either the 5' cytosine or the 3' guanine?

Thank you.