triMatrix {MesKit} | R Documentation

## triMatrix

### Description

Calculate the frequency of 96 trinucleotide mutation based on somatic SNVs.

### Usage

    triMatrix(phyloTree, patient.id = NULL, level = 2)

### Arguments

`phyloTree` | phyloTree or phyloTreeList object generated by `getPhyloTree` function.
`patient.id` | Select the specific patients. Default NULL, all patients are included
`level` | Calculate the frequency of 96 trinucleotide mutatio on different levels. 1: patient-level, 2: tumor-level, 3: sample-level, 4: branch-level, 5: shared pattern (public/shared/private) of each tumor. 6: trunk/branch-level. Default 2.

### Value

The frequency of 96 trinucleotide mutation.

### Examples

    maf.File <- system.file("extdata/", "CRC_HZ.maf", package = "MesKit")
    clin.File <- system.file("extdata/", "CRC_HZ.clin.txt", package = "MesKit")
    ccf.File <- system.file("extdata/", "CRC_HZ.ccf.tsv", package = "MesKit")
    maf <- readMaf(mafFile=maf.File, clinicalFile = clin.File, ccfFile=ccf.File, refBuild="hg19")

    ## Load a reference genome.
    library(BSgenome.Hsapiens.UCSC.hg19)

    phyloTree <- getPhyloTree(maf, patient.id = 'V402')
    triMatrix(phyloTree)

[Package MesKit version 1.4.0 Index]