A permutation-based method for ascertaining genes with a somatic mutation distribution showing evidence of positive selection for non-silent mutations. The method was developed for use in cancer genomics studies, with particular relevance to high mutation rate cancers. Mutations are permuted on a per-patient, per-trinucleotide-context basis across the covered exon, intron and UTR base pairs of a gene, generating a null model of the distribution of mutations to which the observed distribution can be compared to determine statistical significance. Significant genes are of interest, as their somatic mutation is likely to be important in the formation of the cancer being studied. The method can operate on whole exome as well as whole genome sequencing data.