compareROC: Generate and compare two ROC curves of TMB performance in...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/compareROC.R

Description

This function takes in input two sets of TMB values for the same samples and a binary variable representing the clinical response to immunotherapy. It generates two ROC curves showing performance of the two TMB datasets to discriminate between responders and nonresponders, as well as the best TMB cutoff.

Usage

1
compareROC(dataset, TMB1, TMB2, method, paired, boot.n)

Arguments

dataset

a data.frame containing numeric vectors of TMB values and a factor with name 'ClinicalResponse' and levels 'responder' and 'nonresponder'

TMB1

character string indicating the data.frame column containing TMB values from the first approach

TMB2

character string indicating the data.frame column containing TMB values from the second approach

method

character string indicating the method to use: delong, bootstrap or venkatraman. See roc.test for more details.

paired

a logical indicating whether you want a paired roc.test. If NULL, the paired status will be auto-detected by are.paired. If TRUE but the paired status cannot be assessed by are.paired will produce an error. See roc.test for more details.

boot.n

for method="bootstrap" and method="venkatraman" only: the number of bootstrap replicates or permutations. Default: 2000. See roc.test for more details.

Value

Returns in standard output the result of the test used to compare the two ROC curves and a pdf file containg plots of the ROC curves and their respective AUC, sensitivity and specificity values and the best threshold for sample classification.

Author(s)

Laura Fancello

See Also

roc.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Compare the ROC curves representing the performance of panel-based and
## WES-based TMB to predict clinical response with the default delong method.

# Set the seed to create reproducible train and test sets in generateROC
set.seed(949)


# Read TMB values and response to immunotherapy
data(Hellman_SimulatedFM1Panel_WES)

# Compare ROCs
compareROC(dataset = Hellman_SimulatedFM1Panel_WES,
           TMB1 = "Panel.NumMuts",
           TMB2 = "WES.NumMuts",
           method = "d",
           paired = TRUE)

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