plotLOD: Create Limit-of-Detection Ratio (LOD) plot

Description Usage Arguments Details Value Author(s) Examples

View source: R/plotLOD.R

Description

Create Limit-of-Detection Ratio (LOD) plot between measured abundance (x-axis) and p-value probability (y-axis).

Usage

1
plotLOD(measured, pval, ratio, qval, FDR, title, xlab, ylab, legTitle, showConf)

Arguments

measured

Measured abundance

pval

P-value probability

ratio

How to group ROC points

qval

Q-value probability. (Default to NULL).

FDR

Chosen false-discovery-rate. Default to NULL).

title

Title of the plot. (Default to NULL).

xlab

Label for the x-axis. (Default to NULL).

ylab

Label for the y-axis. (Default to NULL).

legTitle

Title for the legend. (Default to 'Ratio').

showConf

Display confidence interval. (Default to FALSE).

Details

Create a Limit-of-Detection Ratio (LOD) plot between measured abundance (x-axis) and p-value probability (y-axis).

The LOD plot indicates the confidence in measurement relative to the magnitude of the measurement. For example, p-value should converge to zero as the sequencing depth increases.

The function also fits non-parametric curves for each sequin ratio group. The curves are modelled with local regression analysis, and are colored by the sequin group.

plotLODR is a simplification from the ERCC dashboard R-package. Further details on the statistical algorithm is available in the ERCC documentation at https://bioconductor.org/packages/release/bioc/html/erccdashboard.html.

Value

The function prints a LODR plot and return associated statistics.

Author(s)

Ted Wong t.wong@garvan.org.au

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
26
27
28
library(Anaquin)

#
# Data set generated by DESeq2 and Anaquin. described in Section 5.6.3.3 of
# the user guide.
#
data(UserGuideData_5.6.3)

xlab  <- 'Average Counts'
ylab  <- 'P-value'
title <- 'LOD Curves'

# Sequin names
seqs <- row.names(UserGuideData_5.6.3)

# Expected log-fold
group <- UserGuideData_5.6.3$ExpLFC

# Measured average abundance
measured <- UserGuideData_5.6.3$Mean

# P-value
pval <- UserGuideData_5.6.3$Pval

# Q-value
qval <- UserGuideData_5.6.3$Qval

plotLOD(measured, pval, group, qval, xlab=xlab, ylab=ylab, title=title, FDR=0.1)

Example output

Loading required package: ggplot2
[1] "Threshold: 0.0330366"


|   | Ratio|     LODR|
|:--|-----:|--------:|
|2  |     1| 3.617511|
|3  |     2| 5.673070|
|4  |     3| 2.584553|
|5  |     4| 3.896317|
  Ratio     LODR
1     0      Inf
2     1 3.617511
3     2 5.673070
4     3 2.584553
5     4 3.896317
Warning messages:
1: Use of `limit$Ratio` is discouraged. Use `Ratio` instead. 
2: Transformation introduced infinite values in continuous y-axis 
3: Use of `limit$Ratio` is discouraged. Use `Ratio` instead. 
4: Transformation introduced infinite values in continuous y-axis 

Anaquin documentation built on Nov. 8, 2020, 5:23 p.m.