Description Usage Arguments Details Value See Also Examples
Rarefy data at multiple sample sizes, in preparation for plotting.
1 |
expr_data |
An expression table where columns are samples and rows are features such as genes, TSS, etc, or a vector of counts. |
npoints |
The maximum number of rarefactions per sample. |
step |
Subsample sizes are calculated by taking the largest sample and multiplying it by the step "npoints" times. |
from |
Add one sample size (typically "0") in order to extend the plot on the left-hand side. |
The computation can be long, so the steps of rarefaction and plotting are kept separate.
The input must be a data frame, or a vector or a matrix, which will be coerced into a matrix. The data must be counts (tag counts, molecule counts, ...).
A list-based object of class "hanabi".
'[.hanabi', as.list.hanabi, and vegan::rarecurve.
Other Hanabi functions: hanabiPlot
,
plot.hanabi
, points.hanabi
1 2 3 4 5 6 | 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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.