Description Usage Arguments Details Value Author(s) Examples

View source: R/plotLODR.R View source: R/plotLODR.R

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

1 |

`data` |
Anaquin dataset created by |

`FDR` |
Chosen false-discovery-rate. Default to |

`title` |
Label of the plot. Default to |

`xlab` |
Label for the x-axis. Default to |

`ylab` |
Label for the y-axis. Default to |

`legTitle` |
Title for the legend. Default to |

`showConf` |
Show confidence interval? Default to |

`...` |
Reserved for internal testing |

`plotLODR`

requires the following data inputs from `AnaquinData`

.

`seqs` | List of sequin identifiers (eg. R2_11_2). | |

`measured` | Measured abundance (eg: average counts, DP field in a VCF file etc) | |

`ratio` | Expected ratio; eg: expected log-fold ratio or expected allele frequency etc | |

`pval` | P-value probability | |

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

The LODR 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 an amendment from the LODR code in 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.

The functions does not return anything but it prints a LODR plot.

Ted Wong t.wong@garvan.org.au

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 29 30 31 32 33 34 35 | ```
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 <- 'LODR Curves'
# Sequin names
seqs <- row.names(UserGuideData_5.6.3)
# Expected log-fold
ratio <- 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
anaquin <- AnaquinData(analysis='PlotLODR',
seqs=seqs,
measured=measured,
ratio=ratio,
pval=pval,
qval=qval)
plotLODR(anaquin, xlab=xlab, ylab=ylab, title=title, FDR=0.1)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.