filterMaf: Filter MAF objects

Description Usage Arguments Value See Also Examples

View source: R/filterMaf.R

Description

Filter MAF by genes or samples

Usage

1
filterMaf(maf, genes = NULL, tsb = NULL, isTCGA = FALSE)

Arguments

maf

an MAF object generated by read.maf

genes

remove these genes

tsb

remove these samples (Tumor Sample Barcodes)

isTCGA

FALSE

Value

Filtered object of class MAF-class

See Also

subsetMaf

Examples

1
2
3
4
5
6
laml.maf <- system.file("extdata", "tcga_laml.maf.gz", package = "maftools")
laml <- read.maf(maf = laml.maf)
#get rid of samples of interest
filterMaf(maf = laml, tsb = c("TCGA-AB-2830", "TCGA-AB-2804"))
#remove genes of intrest
filterMaf(maf = laml, genes =c("TTN", "AHNAK2"))

Example output

-Reading
-Validating
-Silent variants: 475 
-Summarizing
-Processing clinical data
--Missing clinical data
-Finished in 0.733s elapsed (0.486s cpu) 
Removed 24 variants from 2 samples
An object of class  MAF 
                   ID          summary  Mean Median
 1:        NCBI_Build               37    NA     NA
 2:            Center genome.wustl.edu    NA     NA
 3:           Samples              190    NA     NA
 4:            nGenes             1227    NA     NA
 5:   Frame_Shift_Del               51 0.268      0
 6:   Frame_Shift_Ins               90 0.474      0
 7:      In_Frame_Del               10 0.053      0
 8:      In_Frame_Ins               41 0.216      0
 9: Missense_Mutation             1327 6.984      7
10: Nonsense_Mutation              102 0.537      0
11:       Splice_Site               92 0.484      0
12:             total             1713 9.016      9
Removed 8 variants from 2 genes
An object of class  MAF 
                   ID          summary  Mean Median
 1:        NCBI_Build               37    NA     NA
 2:            Center genome.wustl.edu    NA     NA
 3:           Samples              192    NA     NA
 4:            nGenes             1240    NA     NA
 5:   Frame_Shift_Del               52 0.271      0
 6:   Frame_Shift_Ins               91 0.474      0
 7:      In_Frame_Del               10 0.052      0
 8:      In_Frame_Ins               41 0.214      0
 9: Missense_Mutation             1337 6.964      7
10: Nonsense_Mutation              103 0.536      0
11:       Splice_Site               92 0.479      0
12:             total             1726 8.990      9

maftools documentation built on Feb. 6, 2021, 2 a.m.