mut.to.sigs.input: Converts mutation list to correct input format

Description Usage Arguments Details Value Examples

View source: R/mut.to.sigs.input.R

Description

Given a mutation list, outputs a data frame with counts of how frequently a mutation is found within each trinucleotide context per sample ID. Output can be used as input into getTriContextFraction.

Usage

1
2
3
mut.to.sigs.input(mut.ref, sample.id = "Sample", chr = "chr",
  pos = "pos", ref = "ref", alt = "alt", bsg = NULL,
  sig.type = "SBS", dbs_table = dbs_possible)

Arguments

mut.ref

Location of the mutation file that is to be converted or name of data frame in environment

sample.id

Column name in the mutation file corresponding to the Sample ID

chr

Column name in the mutation file corresponding to the chromosome

pos

Column name in the mutation file corresponding to the mutation position

ref

Column name in the mutation file corresponding to the reference base

alt

Column name in the mutation file corresponding to the alternate base

bsg

Only set if another genome build is required. Must be a BSgenome object.

sig.type

Are SBS or DBS signatures being used?

dbs_table

Possible DBS changes and their reverse complements

Details

The context sequence is taken from the BSgenome.Hsapiens.UCSC.hgX::Hsapiens object. Therefore the coordinates must correspond to the human hgX assembly. Default is set to the UCSC hg19 assembly, which corresponds to the GRCh37 assembly. If another assembly is required, it must already be present in the R workspace and fed as a parameter. This method will translate chromosome names from other versions of the assembly like NCBI or Ensembl. For instance, the following transformation will be done: "1" -> "chr1"; "MT" -> "chrM"; "GL000245.1" -> "chrUn_gl000245"; etc.

Value

A data frame that contains sample IDs for the rows and trinucleotide contexts for the columns. Each entry is the count of how many times a mutation with that trinucleotide context is seen in the sample.

Examples

1
2
3
4
5
6
## Not run: 
sigs.input = mut.to.sigs.input(mut.ref = sample.mut.ref, sample.id = "Sample",
chr = "chr", pos = "pos", ref = "ref", alt = "alt", bsg = 
BSgenome.Hsapiens.UCSC.hg19, sig.type = 'SBS', dbs_table = dbs_possible)

## End(Not run)

raerose01/deconstructSigs documentation built on Aug. 20, 2020, 11:44 a.m.