Description Usage Arguments Details See Also Examples
Plot feature discovery curves
1 2 | hanabiPlot(RAR, S, GROUP = NULL, legend.pos = "topleft", pch = 1,
col = "black", ...)
|
RAR |
A rarefaction table, or a hanabi object. |
S |
A vector of subsample sizes. |
GROUP |
A vector grouping the samples. Coerced to factor. |
legend.pos |
Position of the legend, passed as "x" parameter to the "legend" function. |
pch |
Plot character at the tip of the lines. |
col |
A vector of colors |
... |
Further arguments to be passed to the first plot function, that plots the empty frame. |
Plots the number of features (genes, transcripts, ...) detected for a given number of counts (reads, unique molecules, ...). Each library is sub-sampled by rarefaction at various sample sizes, picked to provide enough points so that the curves look smooth. The final point is plotted as an open circle, hence the name "hanabi", which means fireworks in Japanese.
The rarefactions take time to do, so this step is done by a separate function, so that the result is easily cached.
vegan, plot.hanabi, hanabi
Other Hanabi functions: hanabi
,
plot.hanabi
, points.hanabi
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
hanabi(genes, npoints = 20, step = 0.8, from = 0) %>% hanabiPlot
hanabi(genes, npoints = 20, step = 0.9) %>% hanabiPlot
## End(Not run)
bedFiles <- system.file(package = "smallCAGEqc", "extdata") %>%
list.files("*BED", full.names = TRUE)
bed <- loadBED12(bedFiles)
rar <- tapply(bed$score, bed$library, hanabi, from = 0) %>%
structure(class = "hanabi") # tapply discards the class !
hanabiPlot(rar, GROUP = levels(bed$library))
hanabiPlot(rar, GROUP = levels(bed$library), col=c("red", "green", "blue"))
hanabiPlot(rar, col="purple")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.