plot_alpha_rcurve: Rarefaction curves for alpha diversity indices

View source: R/plot_alpha_rcurve.R

plot_alpha_rcurveR Documentation

Rarefaction curves for alpha diversity indices

Description

Calculates alpha diversity idenx at varying sampling units (sequencing depth).

Usage

plot_alpha_rcurve(
  x,
  index = "observed",
  subsamples = c(100, 1000, 2000, 3000, 4000, 5000),
  lower.conf = 0.025,
  upper.conf = 0.975,
  group = NULL,
  linetype.main = 1,
  line.opacity.main = 0.5,
  linetype.type = 2,
  line.opacity.type = 0.25,
  type = "CI",
  label.min = TRUE,
  label.size = 3,
  label.color = "grey70"
)

Arguments

x

phyloseq-class object

index

Default:: "observed",

subsamples

Default: c(100,1000, 2000, 3000, 4000, 5000)

lower.conf

Default: 0.025. If type=CI

upper.conf

Default: 0.975.

group

Default: NULL

linetype.main

For ggplot line type for line by group. Default: 1

line.opacity.main

For ggplot alpha to determine opacity for line by group. Default: 0.5

linetype.type

For ggplot line type for line CI or SD. Default: 2

line.opacity.type

For ggplot line type to determine opacity for line CI or SD. Default: 0.25

type

Either CI (confidence interval) or SD (Standard deviation) Default: CI

label.min

TRUE or FALSE. Default: TRUE

label.size

Label min size

label.color

Label min color

Examples

## Not run: 
library(microbiomeutilities)
data("zackular2014")
p0 <- zackular2014
# e.g. to make range of 
# subsamples <- seq(0, 5000, by=100)[-1]
p <- plot_alpha_rcurve(p0, index="observed", 
lower.conf = 0.025, upper.conf = 0.975, 
group="DiseaseState") + 
scale_color_brewer(palette = "Paired") + 
scale_fill_brewer(palette = "Paired")
print(p )

## End(Not run)

microsud/microbiomeutilities documentation built on Nov. 29, 2022, 12:18 a.m.