View source: R/V_matrix_Generation.R
| GenerateVMatrix | R Documentation |
Generate an SBS96 or DBS78 mutation count matrix from a MAF-like mutation record table.
GenerateVMatrix(mutation_record, Class = c("SBS", "DBS"),
ref.genome = "hg19", mutation_order = NULL)
mutation_record |
A MAF-like data frame containing mutation records. |
Class |
A character string specifying the mutation class. Must be either
|
ref.genome |
The reference genome, either |
mutation_order |
Optional character vector specifying the row order of
the returned mutation count matrix. If |
The mutation_record data frame must contain the columns
Chromosome, Start_Position, End_Position,
Variant_Type, Reference_Allele, Tumor_Seq_Allele2 and
Tumor_Sample_Barcode. SBS analyses use records with
Variant_Type == "SNP" and generate COSMIC-style 96-channel mutation
contexts. DBS analyses use records with Variant_Type == "DNP" and
generate 78 double-base substitution contexts.
This function is intended for MAF-like tabular mutation records. Simple
single-sample VCF files can first be converted into this tabular format with
ReadVCFAsMutationRecord.
A numeric matrix with mutation contexts in rows and tumor samples in columns.
Donghyuk Lee <dhyuklee@pusan.ac.kr> and Bin Zhu <bin.zhu@nih.gov>
GenerateLMatrix, GeneratePanelSize,
ReadVCFAsMutationRecord
dir <- system.file("extdata", "refitting_examples", package = "SATS")
sbs_file <- file.path(dir, "SBS_MAF_two_samples.txt")
sbs_mut <- read.table(sbs_file, header = TRUE, sep = "\t", quote = "",
stringsAsFactors = FALSE)
V_sbs <- GenerateVMatrix(sbs_mut, Class = "SBS", ref.genome = "hg19")
dim(V_sbs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.