Description Usage Arguments Value Examples
Generates a collection of Nonpareil curves (a Nonpareil.Set
object)
and (optionally) plots all of them in a single canvas.
1 2 |
files |
Vector with the paths to the .npo files. |
col |
Color of the curves (vector). If not passed, values are randomly assigned. Values are recycled. |
labels |
Labels of the curves (vector). If not passed, values are determined by the filename. Values are recycled. |
plot |
If TRUE, it generates the Nonpareil curve plots. |
plot.opts |
Any parameters accepted by |
... |
Any additional parameters accepted by |
Returns invisibly a Nonpareil.Set
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Generate a Nonpareil plot with multiple curves
files <- system.file("extdata",
c("HumanGut.npo","LakeLanier.npo","IowaSoil.npo"),
package="Nonpareil")
col <- c("orange","darkcyan","firebrick4")
nps <- Nonpareil.set(files, col=col,
plot.opts=list(plot.observed=FALSE, model.lwd=2))
# Show the estimated values
print(nps)
# Show current coverage (as %)
summary(nps)[,"C"]*100
# Extract Nd diversity index
summary(nps)[,"diversity"]
# Extract sequencing effort for nearly complete coverage (in Gbp)
summary(nps)[,"LRstar"]/1e9
# Predict coverage for a sequencing effort of 10Gbp
sapply(nps$np.curves, predict, 10e9)
|
===[ Nonpareil.Set ]===================================
Collection of 3 Nonpareil curves.
kappa C LR modelR LRstar diversity
HumanGut 0.79021 0.8063516 323066770 0.9986240 2622136382 17.26038
LakeLanier 0.65906 0.6830866 1167543428 0.9986215 20529561329 19.21348
IowaSoil 0.52751 0.5572956 14558899784 0.9996735 662396292322 22.79596
-------------------------------------------------------
call: Nonpareil.set files col list(plot.observed = FALSE, model.lwd = 2)
-------------------------------------------------------
HumanGut LakeLanier IowaSoil
80.63516 68.30866 55.72956
HumanGut LakeLanier IowaSoil
17.26038 19.21348 22.79596
HumanGut LakeLanier IowaSoil
2.622136 20.529561 662.396292
[1] 0.9831304 0.9171014 0.5093043
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.