plotLogistic: Plot logistic model for sequins

Description Usage Arguments Details Value Author(s) Examples

View source: R/plotLogistic.R

Description

Create a scatter plot with input concentration on the x-axis, and measured proportion on the y-axis.

Usage

1
plotLogistic(seqs, x, y, title, xlab, ylab, showLOA, threshold)

Arguments

seqs

Sequin names

x

Expected input concentration on the x-axis

y

Measured proportion on the y-axis

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).

showLOA

Display limit-of-assembly. (Default to TRUE).

threshold

Threshold required for limit-of-assembly (LOA). (Default to 0.7).

Details

The plotLogistic function creates a scatter plot with input concentration on the x-axis, and measured proportion on the y-axis. Common measured statistics include p-value, percentage and sensitivity. The plot builds a logistic regression model between the two variables.

The function also estimates limit-of-assembly (LOA) breakpoint, and reports it on the plot if found. The LOA breakpoint is an empirical detection limit, and also the abundance whereby the fitted logistic curve exceeds a user-defined threshold.

Value

The function returns the limit of quantification.

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

#
# Data set generated by Cufflinks and Anaquin. described in Section 5.4.5.1 of
# the user guide.
#
data(UserGuideData_5.4.5.1)

title <- 'Assembly Plot'
xlab  <- 'Input Concentration (log2)'
ylab  <- 'Sensitivity'

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

# Input concentration
x <- log2(UserGuideData_5.4.5.1$Input)

# Measured sensitivity
y <- UserGuideData_5.4.5.1$Sn

plotLogistic(seqs, x, y, title=title, xlab=xlab, ylab=ylab, showLOA=TRUE)

Example output

Loading required package: ggplot2
$LOA
[1] 3.33

$fitted
  [1] 0.712744981 0.562390061 0.198532564 0.774875912 0.959123261 0.994113057
  [7] 0.971812844 0.946970022 0.323527951 0.869203744 0.998920011 0.997916949
 [13] 0.989879487 0.998413893 0.999779312 0.923971368 0.988695993 0.198532564
 [19] 0.774875912 0.989879487 0.862911715 0.978402509 0.480080541 0.927695845
 [25] 0.024210839 0.012687986 0.989286493 0.999221234 0.998920011 0.997916949
 [31] 0.765270958 0.959123261 0.994732434 0.994732434 0.151512263 0.084658388
 [37] 0.963288101 0.113711619 0.640645193 0.399627392 0.256373510 0.979519625
 [43] 0.998497524 0.999264749 0.999264749 0.256373510 0.151512263 0.995986023
 [49] 0.992279047 0.931461733 0.931461733 0.998539435 0.962241191 0.827303927
 [55] 0.712744981 0.004895792 0.116598669 0.963288101 0.963288101 0.875607635
 [61] 0.875607635 0.207847356 0.946970022 0.902430301 0.073988162 0.133646116
 [67] 0.229485962 0.875607635 0.875607635 0.931461733 0.207847356 0.997589551
 [73] 0.998750067 0.999352213 0.929573581 0.997183907 0.073988162 0.133646116
 [79] 0.229485962 0.784754500 0.784754500 0.039739173 0.073988162 0.133646116
 [85] 0.997264738 0.997264738 0.999264749 0.999264749 0.997916949 0.995986023
 [91] 0.207847356 0.827303927 0.712744981 0.311770633 0.765270958 0.997183907
 [97] 0.929573581 0.190041237 0.628062853 0.020984683 0.039739173 0.073988162
[103] 0.020984683 0.039739173 0.073988162 0.018533046 0.010979989 0.020984683
[109] 0.039739173 0.001442723 0.002781735 0.005356837 0.010291198 0.971812844
[115] 0.946970022 0.010979989 0.020984683 0.039739173 0.010291198 0.019680742
[121] 0.037314237 0.069624840 0.005717296 0.010979989 0.020984683 0.946970022
[127] 0.902430301 0.005717296 0.010979989 0.020984683 0.985199489 0.971812844
[133] 0.994577166 0.999796802 0.113711619 0.640645193 0.020984683 0.039739173
[139] 0.073988162 0.113711619 0.640645193 0.872391568 0.994577166 0.494455356
[145] 0.994577166 0.999796802 0.494455356 0.034197298 0.487156451 0.869203744
[151] 0.989286493 0.034197298 0.487156451 0.005356837 0.010291198 0.019680742
[157] 0.037314237 0.018009212 0.329759350 0.002969430 0.005717296 0.010979989
[163] 0.872391568 0.994577166

Warning messages:
1: Use of `data$x` is discouraged. Use `x` instead. 
2: Use of `data$y` is discouraged. Use `y` instead. 
3: Use of `data$x` is discouraged. Use `x` instead. 
4: Use of `data$y` is discouraged. Use `y` instead. 

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