maf2variants: maf2variants

View source: R/maf2variants.R

maf2variantsR Documentation

maf2variants

Description

Change the maf object into variants data frame for the subclonal structures analysis.

Usage

maf2variants(maf, patient.id = NULL, ccf.cutoff = 0.1, extract.VAF = FALSE)

Arguments

maf

Maf or MafList object generated by readMaf() function

patient.id

Select the specific patients. Default NULL, all patients are included.

ccf.cutoff

Removing low-CCF mutations (default: 0.1).

extract.VAF

Whether extract the VAF information. Default FALSE: extract CCF rather than VAF.

Details

This function extracts the Cluster information from the CCF data. Therefore, the Cluster column is required in the ccfFile.

For the output variants, the first five columns are Mutid, Hugo_Symbol, Variant_Classification, Patient_ID, Cluster. The remaining columns indicate variant cellular prevalence for each sample.

Examples

#' data.type <- "split1"

maf1 <- readMaf(
  mafFile = system.file(package = "MPTevol", "extdata", sprintf("meskit.%s.mutation.txt", data.type)),
  ccfFile = system.file(package = "MPTevol", "extdata", sprintf("meskit.%s.CCF.txt", data.type)),
  clinicalFile = system.file(package = "MPTevol", "extdata", sprintf("meskit.%s.clinical.txt", data.type)),
  refBuild = "hg19",
  ccf.conf.level = 0.95
)

ccfs = maf2variants(maf1, patient.id = "Met1")

#extract VAF rather than CCF.
vafs = maf2variants(maf1, patient.id = "Met1", extract.VAF = T)


qingjian1991/MPTevol documentation built on Jan. 30, 2023, 10:16 p.m.