Create an array of ROC plots with confidence interval bands to compare signatures.
Source:R/bootstrap.R
signatureROCplot_CI.Rd
Create an array of ROC plots with confidence interval bands to compare signatures.
Usage
signatureROCplot_CI(
inputData,
annotationData,
signatureColNames,
annotationColName,
scale = FALSE,
choose_colors = c("cornflowerblue", "gray50", "gray79"),
name = NULL,
nrow = NULL,
ncol = NULL,
ci.lev = 0.95,
pb.show = TRUE
)
Arguments
- inputData
an input data object. It should either be of the class
SummarizedExperiment
and contain the profiled signature data and annotation data as columns in thecolData
, or alternatively be of the classesdata.frame
ormatrix
and contain only the gene expression data. Required.- annotationData
a
data.frame
ormatrix
of annotation data, with one column. Only required ifinputData
is adata.frame
ormatrix
of signature data.- signatureColNames
a
vector
of the column names ofinputData
that contain the signature data. IfinputData
is aSummarizedExperiment
object, these are the column names of the objectcolData
.- annotationColName
a character string naming the column name in the
colData
that contains the annotation data to be used in making the boxplot. Only required if inputData is aSummarizedExperiment
object.- scale
logical. Setting
scale = TRUE
scales the signature data. The default isFALSE
.- choose_colors
a vector of length 3 defining the colors to be used in the ROC plots. The default is
c("cornflowerblue", "gray50", "gray79")
.- name
a character string giving the title of the ROC plot. If
NULL
, the plot title will be"ROC Plots for Gene Signatures, <ci.lev>% Confidence"
. The default isNULL
.- nrow
integer giving the number of rows in the resulting array.
- ncol
integer giving the number of columns in the resulting array.
- ci.lev
a number between 0 and 1 giving the desired level of confidence for computing ROC curve estimations.
- pb.show
logical for whether to show a progress bar while running code. The default is
TRUE
.
Examples
# Run signature profiling
choose_sigs <- TBsignatures[c(1, 2)]
prof_indian <- runTBsigProfiler(TB_indian, useAssay = "logcounts",
algorithm = "Zscore",
signatures = choose_sigs,
parallel.sz = 1)
#> Parameter update_genes is TRUE. Gene names will be updated.
#> Running Zscore
#> Warning: 1 genes with constant expression values throuhgout the samples.
#> Warning: Since argument method!="ssgsea", genes with constant expression values are discarded.
#> Estimating combined z-scores for 2 gene sets.
#>
|
| | 0%
|
|== | 2%
|
|=== | 5%
|
|===== | 7%
|
|====== | 9%
|
|======== | 11%
|
|========== | 14%
|
|=========== | 16%
|
|============= | 18%
|
|============== | 20%
|
|================ | 23%
|
|================== | 25%
|
|=================== | 27%
|
|===================== | 30%
|
|====================== | 32%
|
|======================== | 34%
|
|========================= | 36%
|
|=========================== | 39%
|
|============================= | 41%
|
|============================== | 43%
|
|================================ | 45%
|
|================================= | 48%
|
|=================================== | 50%
|
|===================================== | 52%
|
|====================================== | 55%
|
|======================================== | 57%
|
|========================================= | 59%
|
|=========================================== | 61%
|
|============================================= | 64%
|
|============================================== | 66%
|
|================================================ | 68%
|
|================================================= | 70%
|
|=================================================== | 73%
|
|==================================================== | 75%
|
|====================================================== | 77%
|
|======================================================== | 80%
|
|========================================================= | 82%
|
|=========================================================== | 84%
|
|============================================================ | 86%
|
|============================================================== | 89%
|
|================================================================ | 91%
|
|================================================================= | 93%
|
|=================================================================== | 95%
|
|==================================================================== | 98%
|
|======================================================================| 100%
#>
# Create ROC plots with confidence intervals
signatureROCplot_CI(prof_indian, signatureColNames = names(choose_sigs),
annotationColName = "label")
#>
|
| | 0%
|
|=================================== | 50%
|
|======================================================================| 100%