hanabiPlot: hanabiPlot

Description Usage Arguments Details See Also Examples

Description

Plot feature discovery curves

Usage

1
2
hanabiPlot(RAR, S, GROUP = NULL, legend.pos = "topleft", pch = 1,
  col = "black", ...)

Arguments

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.

Details

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.

See Also

vegan, plot.hanabi, hanabi

Other Hanabi functions: hanabi, plot.hanabi, points.hanabi

Examples

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

charles-plessy/smallCAGEqc documentation built on May 13, 2019, 3:31 p.m.