This function replaces a target class ID with a new ID in MATLAB classlist files,
generated by the code in the ifcb-analysis
repository (Sosik and Olson 2007).
Usage
ifcb_replace_mat_values(
manual_folder,
out_folder,
target_id,
new_id,
column_index = 1,
do_compression = TRUE
)
Arguments
- manual_folder
A character string specifying the path to the folder containing MAT classlist files to be updated.
- out_folder
A character string specifying the path to the folder where updated MAT classlist files will be saved.
- target_id
The target class ID to be replaced.
- new_id
The new class ID to replace the target ID.
- column_index
An integer value specifying which classlist column to edit. Default is 1 (manual).
- do_compression
A logical value indicating whether to compress the .mat file. Default is TRUE.
Value
This function does not return any value; it updates the classlist files in the specified directory.
Details
This function requires a python interpreter to be installed. The required python packages can be installed in a virtual environment using ifcb_py_install
.
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) { # \dontrun{
# Initialize a python session if not already set up
ifcb_py_install()
# Replace class ID 99 with 1 in .mat classlist files
ifcb_replace_mat_values("output/manual", "output/manual", 99, 1, column_index = 1)
} # }