Summarize Biovolumes and Carbon Content from IFCB Data
Source:R/ifcb_summarize_biovolumes.R
ifcb_summarize_biovolumes.Rd
This function calculates aggregated biovolumes and carbon content from Imaging FlowCytobot (IFCB)
samples based on biovolume information from feature files. Images are grouped in classes either
based on MATLAB classification or manually annotation 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.
Usage
ifcb_summarize_biovolumes(
feature_folder,
mat_folder,
class2use_file = NULL,
hdr_folder = NULL,
micron_factor = 1/3.4,
diatom_class = "Bacillariophyceae",
marine_only = FALSE,
threshold = "opt",
feature_recursive = TRUE,
mat_recursive = TRUE,
hdr_recursive = TRUE,
verbose = TRUE
)
Arguments
- feature_folder
Path to the folder containing feature files (e.g., CSV format).
- mat_folder
Path to the folder containing class or manual MATLAB files.
- class2use_file
A character string specifying the path to the file containing the class2use variable (default NULL). Only needed when summarizing manual results.
- 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".
- marine_only
Logical. If TRUE, restricts the WoRMS search to marine taxa only. Default is FALSE.
- threshold
Threshold for classification (default: "opt").
- feature_recursive
Logical. If TRUE, the function will search for feature files recursively within the
feature_folder
. Default is TRUE.- mat_recursive
Logical. If TRUE, the function will search for MATLAB files recursively within the
mat_folder
. Default is TRUE.- hdr_recursive
Logical. If TRUE, the function will search for HDR files recursively within the
hdr_folder
(if provided). Default is TRUE.- verbose
A logical indicating whether to print progress messages. Default is TRUE.
Value
A data frame summarizing aggregated biovolume and carbon content per class per sample. Columns include 'sample', 'classifier', 'class', 'biovolume_mm3', 'carbon_ug', 'ml_analyzed', 'biovolume_mm3_per_liter', and 'carbon_ug_per_liter'.
Details
This function performs the following steps:
Extracts biovolumes and carbon content from feature and MATLAB files using
ifcb_extract_biovolumes
.Optionally incorporates volume data from HDR files to calculate volume analyzed per sample.
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.