fitSignatures {MesKit} | R Documentation

## fitSignatures

### Description

Find nonnegative linear combination of mutation signatures to reconstruct matrix and calculate cosine similarity based on somatic SNVs.

### Usage

    fitSignatures(
      tri_matrix = NULL,
      patient.id = NULL,
      signaturesRef = "cosmic_v2",
      associated = NULL,
      min.mut.count = 15,
      signature.cutoff = 0.1
    )

### Arguments

`tri_matrix` | A matrix or a list of matrix generated by `triMatrix` function.
`patient.id` | Select the specific patients. Default NULL, all patients are included
`signaturesRef` | Signature reference,Users can upload their own reference. Default "cosmic_v2". Option: "exome_cosmic_v3","nature2013".
`associated` | Associated Vector of associated signatures. If given, will narrow the signatures reference to only the ones listed. Default NULL.
`min.mut.count` | The threshold for the variants in a branch. Default 15.
`signature.cutoff` | Discard any signature relative contributions with a weight less than this amount. Default 0.1.

### Value

A list of data frames, each one contains treeMSOutput, containing information about each set/branch's mutational signature.

### 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')
    tri_matrix <- triMatrix(phyloTree)
    fitSignatures(tri_matrix)

[Package MesKit version 1.4.0 Index]