Description Usage Arguments Value Author(s) Examples
View source: R/correlateTMBvalues.R
This function takes in input TMB values quantified for the same samples from
gene panels and from whole exome sequencing datasets and performs correlation
analysis. Panel-based TMB values may come from real gene panel sequencing or
from a simulated gene panel, generated using the simulatePanel
function.
1 | correlateTMBvalues(panel.TMB, WES.TMB, corr.coeff, title.plot)
|
panel.TMB |
a |
WES.TMB |
a |
corr.coeff |
type of correlation coefficient: "pearson", "kendall" or "spearman" |
title.plot |
a |
Returns a pdf file with correlation plot, the Spearman's correlation coefficient with 95 number of samples.
Laura Fancello
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # Read vcf files containing somatic mutations identified by WES -------------
data(ExampleWESvcfs)
# Read files with WES and gene panel design ---------------------------------
data(ExampleWESdesign)
data(ExamplePaneldesign)
# Filter for gene panel simulation ------------------------------------------
# Remove known cancer mutations
vcfs_NoCancer_ForPanel <- applyFilters(vcfs = ExampleWESvcfs,
assembly = "hg19",
design = ExamplePaneldesign,
remove.cancer = TRUE,
tsList = NULL,
variantType = NULL)
# Filter for original WES ---------------------------------------------------
# Filter out synonymous mutations
vcfs_NoSynonymous_WES <- applyFilters(vcfs = ExampleWESvcfs,
assembly = "hg19",
design = ExampleWESdesign,
remove.cancer = FALSE,
tsList = NULL,
variantType = c("synonymous"))
# Subset the WES dataset so that it will only contain variants in the regions
# targeted by the panel you want to simulate
SimulatedPanel_NoCancer <- applySimulatePanel(WES = vcfs_NoCancer_ForPanel,
WES.design = ExampleWESdesign,
panel.design = ExamplePaneldesign,
assembly = "hg19")
# TMB quantification --------------------------------------------------------
# Perform TMB quantification on the simulated panel
TMBs_SimulatedPanel <- applyTMB(inputForTMB = SimulatedPanel_NoCancer, assembly = "hg19")
# Perform TMB quantification on the original Whole Exome sequencing
TMBs_WES <- applyTMB(inputForTMB = vcfs_NoSynonymous_WES, assembly = "hg19")
# Correlate WES-based and simulated panel-based TMB values ------------------
cor_plot <- correlateTMBvalues(panel.TMB = TMBs_SimulatedPanel$Tot_Number_Mutations,
WES.TMB = TMBs_WES$Tot_Number_Mutations,
corr.coeff = "spearman",
title.plot="Correlation panel-based and WES-based TMB")
# Visualize plot of Spearman correlations
print(cor_plot)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.