This function calculates aggregated biovolumes and carbon content from Imaging FlowCytobot (IFCB) samples based on feature and MATLAB classification result files, generated by the code in `ifcb-analysis` repository (Sosik and Olson 2007). Biovolumes are converted to carbon according to Menden-Deuer and Lessard 2000 for individual regions of interest (ROI), where different conversion factors are applied to diatoms and non-diatom protist. If provided, it also incorporates sample volume data from HDR files to compute biovolume and carbon content per liter of sample.

ifcb_summarize_biovolumes(
  feature_folder,
  class_folder,
  hdr_folder = NULL,
  micron_factor = 1/3.4,
  diatom_class = "Bacillariophyceae",
  threshold = "opt"
)

Arguments

feature_folder

Path to the folder containing feature files (e.g., CSV format).

class_folder

Path to the folder containing class files (e.g., MATLAB MAT format).

hdr_folder

Path to the folder containing HDR files (optional).

micron_factor

Conversion factor from microns per pixel (default: 1/3.4).

diatom_class

A string vector of diatom class names in the World Register of Marine Species (WoRMS). Default is "Bacillariophyceae".

threshold

Threshold for classification (default: "opt").

Value

A data frame summarizing aggregated biovolume and carbon content per class per sample. Columns include 'sample', 'class', 'biovolume_mm3', 'carbon_ug', 'ml_analyzed', 'biovolume_mm3_per_liter', and 'carbon_ug_per_liter'.

Details

This function performs the following steps: 1. Extracts biovolumes and carbon content from feature and class files using `ifcb_extract_biovolumes`. 2. Optionally incorporates volume data from HDR files to calculate volume analyzed per sample. 3. Computes biovolume and carbon content per liter of sample analyzed.

References

Menden-Deuer Susanne, Lessard Evelyn J., (2000), Carbon to volume relationships for dinoflagellates, diatoms, and other protist plankton, Limnology and Oceanography, 3, doi: 10.4319/lo.2000.45.3.0569.

Sosik, H. M. and Olson, R. J. (2007), Automated taxonomic classification of phytoplankton sampled with imaging-in-flow cytometry. Limnol. Oceanogr: Methods 5, 204–216.

Examples

if (FALSE) {
# Example usage:
ifcb_summarize_biovolumes("path/to/features", "path/to/class", hdr_folder = "path/to/hdr")
}