bootstrapAUC: Bootstrap the AUC and conduct T-Tests for a collection of...

Description Usage Arguments Value Examples

View source: R/bootstrap.R

Description

Run bootstrapping of the AUC and derive the p-value for a 2-sample t-test for all signatures tested on a given dataset.

Usage

1
2
3
4
5
6
7
bootstrapAUC(
  SE_scored,
  annotationColName,
  signatureColNames,
  num.boot = 100,
  pb.show = TRUE
)

Arguments

SE_scored

a SummarizedExperiment object with genes as the row features and signature scores in the colData. There should also be a column of annotation data. Required.

annotationColName

a character string giving the column name in colData that contains the annotation data. Required.

signatureColNames

a vector of column names in the colData that contain the signature score data. Required.

num.boot

integer. The number of times to bootstrap the data. The default is 100.

pb.show

logical for whether to show a progress bar while running code. The default is TRUE.

Value

A list of length 3 returning a vector of p-values for a 2-sample t-test, bootstrapped AUC values, and an AUC value for using all scored values for all signatures specified in signatureColNames.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 # Run signature profiling
 choose_sigs <- TBsignatures[1]
 prof_indian <- runTBsigProfiler(TB_indian, useAssay = "logcounts",
                                 algorithm = "ssGSEA",
                                 combineSigAndAlgorithm = TRUE,
                                 signatures = choose_sigs,
                                 parallel.sz = 1)
 # Bootstrapping
 booted <- bootstrapAUC(SE_scored = prof_indian, annotationColName = "label",
                        signatureColNames = names(choose_sigs), num.boot = 5)
 booted

TBSignatureProfiler documentation built on Nov. 8, 2020, 6:56 p.m.