applyTMB: Provide text and graphical output for Tumor Mutational Burden...

Description Usage Arguments Value Author(s) Examples

View source: R/applyTMB.R

Description

This function reads in input a list (or a list of lists), with sample name, filter description, sn object containing sequencing design and an object containing variants. It quantifies TMB based on these variants and generates in output a text file containing TMB values and a pdf file with a barplot visualization.

Usage

1
applyTMB(inputForTMB, assembly)

Arguments

inputForTMB

a list of lists with the following elements: sample name, filter description, design and a CollapsedVCF or data.frame object containing somatic variants

assembly

human genome assembly: hg19 or hg38

Value

Returns a data.frame with sample, filter, sequencing size, total number of mutations and number of mutations per megabase.

Author(s)

Laura Fancello

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Read vcf
vcf_files <- list(Horizon5="Horizon5_ExamplePanel.vcf", 
                  HorizonFFPEmild="HorizonFFPEmild_ExamplePanel.vcf")
vcf_files <- lapply(vcf_files
                    , function(x) system.file("extdata", x, package = "TMBleR", mustWork = TRUE))
vcfs <- readVcfFiles(vcfFiles = vcf_files , assembly = "hg19")

## Read design
design <- readDesign(system.file("extdata"
, "ExamplePanel_GeneIDs.txt"
, package = "TMBleR"
, mustWork = TRUE)
, assembly = "hg19"
, ids = "entrezgene_id")

## Prepare data for TMB quantification, formatting it as required by the 
## applyTMB() function. While this is done automatically within the 
## applyFilters() function, on a non filtered vcf we need to use the function
## here described to get the correct format
vcfs_nonfiltered <- applyFilters(vcfs = vcfs, 
                                design = design,
                                assembly = "hg19")
                                    
## Perform TMB quantification
TMB_res=applyTMB(inputForTMB = vcfs_nonfiltered, assembly = "hg19")

acc-bioinfo/TMBleR documentation built on Dec. 18, 2021, 10:21 p.m.