hs_coll_curve: Collection curves for phenotypic heterogeneity measurements

Description Usage Arguments Examples

View source: R/hs_coll_curve.R

Description

Calculates collection curves that describe the sensitivity of the diversity metrics to sample size. This can be used to check whether the Raman spectra in their totality cover the phenotypic heterogeneity of the sample.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
hs_coll_curve(
  hs.x,
  intervals = 10,
  nboot = 10,
  peak_detection = FALSE,
  peak_window = 20,
  peak_method = c("MAD"),
  plot_fig = TRUE,
  replace = TRUE
)

Arguments

hs.x

HyperSpec object

intervals

Decide in which sample size intervals you want to inspect the curves. Defaults to 10 cells.

nboot

Number of bootstraps to condut for each sample size. Defaults to 10.

peak_detection

Should peak detection be used instead of raw spectra for Hill calculations? Defaults to FALSE

peak_window

Peak windows size for a peak to be considered a signal. Defaults to 20.

peak_method

Which peak detection method should be used (requires peak_detection == TRUE). Options are "MAD" and "SuperSmoother"

plot_fig

Should figures of collectors curves be shown? Defaults to TRUE.

replace

Define whether replacement should be used during spectral resampling. Defaults to TRUE.

Examples

1
2
3
4
5
6
7
8
# Short example
data("hs_example")

# Preprocess
hs_example <- hs_preprocess(hs_example)

# Calculate metrics
hs_coll_curve(hs_example, intervals = 3, nboot = 10, plot_fig = FALSE, replace = TRUE)

CMET-UGent/MicroRaman documentation built on July 25, 2020, 6:20 p.m.