subsetMaf: Subset MAF objects

Description Usage Arguments Value See Also Examples

View source: R/subsetMaf.R

Description

Subsets MAF based on given conditions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
subsetMaf(
  maf,
  tsb = NULL,
  genes = NULL,
  query = NULL,
  clinQuery = NULL,
  fields = NULL,
  mafObj = TRUE,
  includeSyn = TRUE,
  isTCGA = FALSE,
  dropLevels = TRUE,
  restrictTo = "all"
)

Arguments

maf

an MAF object generated by read.maf

tsb

subset by these samples (Tumor Sample Barcodes)

genes

subset by these genes

query

query string. e.g, "Variant_Classification == 'Missense_Mutation'" returns only Missense variants.

clinQuery

query by clinical variable.

fields

include only these fields along with necessary fields in the output

mafObj

returns output as MAF class MAF-class. Default TRUE

includeSyn

Default TRUE, only applicable when mafObj = FALSE. If mafObj = TRUE, synonymous variants will be stored in a seperate slot of MAF object.

isTCGA

Is input MAF file from TCGA source.

dropLevels

Default TRUE.

restrictTo

restrict subset operations to these. Can be 'all', 'cnv', or 'mutations'. Default 'all'. If 'cnv' or 'mutations', subset operations will only be applied on copy-number or mutation data respectively, while retaining other parts as is.

Value

subset table or an object of class MAF-class

See Also

getFields

Examples

1
2
3
4
5
6
7
8
9
laml.maf <- system.file("extdata", "tcga_laml.maf.gz", package = "maftools")
laml <- read.maf(maf = laml.maf)
##Select all Splice_Site mutations from DNMT3A and NPM1
subsetMaf(maf = laml, genes = c('DNMT3A', 'NPM1'),
query = "Variant_Classification == 'Splice_Site'")
##Select all variants with VAF above 30%
subsetMaf(maf = laml, query = "i_TumorVAF_WU > 30")
##Extract data for samples 'TCGA.AB.3009' and 'TCGA.AB.2933' but only include vaf filed.
subsetMaf(maf = laml, tsb = c('TCGA-AB-3009', 'TCGA-AB-2933'), fields = 'i_TumorVAF_WU')

thesushantpatil/maftools documentation built on May 18, 2020, 9:54 p.m.