This function reads a MATLAB .mat file containing aggregated and classified IFCB (Imaging FlowCytobot) data generated by the `countcells_allTBnew_user_training` function from the `ifcb-analysis` repository (Sosik and Olson 2007), or a list of classified data generated by `ifcb_summarize_class_counts`. It returns a data frame with species counts and optionally biovolume information based on specified thresholds.

ifcb_read_summary(
  summary,
  hdr_directory = NULL,
  biovolume = FALSE,
  threshold = "opt"
)

Arguments

summary

A character string specifying the path to the .mat summary file or a list generated by `ifcb_summarize_class_counts`.

hdr_directory

A character string specifying the path to the directory containing header (.hdr) files. Default is NULL.

biovolume

A logical indicating whether the file contains biovolume data. Default is FALSE.

threshold

A character string specifying the threshold type for counts and biovolume. Options are "opt" (default), "adhoc", and "none".

Value

A data frame containing the summary information including file list, volume analyzed, species counts, optionally biovolume, and other metadata.

References

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) {
summary_data <- ifcb_read_summary("path/to/summary_file.mat", biovolume = TRUE, threshold = "opt")
print(summary_data)
}