View source: R/ifcb_merge_manual.R
ifcb_merge_manual | R Documentation |
This function merges two sets of manual classification data by combining
and aligning class labels from a base set and an additional set of classifications.
The merged .mat
data can be used with the code in the ifcb-analysis
repository (Sosik and Olson 2007).
ifcb_merge_manual(
class2use_file_base,
class2use_file_additions,
class2use_file_output = NULL,
manual_folder_base,
manual_folder_additions,
manual_folder_output,
do_compression = TRUE,
temp_index_offset = 50000,
skip_class = NULL,
quiet = FALSE
)
class2use_file_base |
Character. Path to the |
class2use_file_additions |
Character. Path to the |
class2use_file_output |
Character. Path where the merged |
manual_folder_base |
Character. Path to the folder containing the base set of manual classification |
manual_folder_additions |
Character. Path to the folder containing the additions set of manual classification |
manual_folder_output |
Character. Path to the output folder where the merged classification files will be stored. |
do_compression |
A logical value indicating whether to compress the |
temp_index_offset |
Numeric. A large integer used to generate temporary indices during the merge process. Default is 50000. |
skip_class |
Character. A vector of class names to skip from the |
quiet |
Logical. If |
Python must be installed to use this function. The required python packages can be installed in a virtual environment using ifcb_py_install()
.
The base set consists of the original classifications that are used as a reference for the merging process. The additions set contains the additional classifications that need to be merged with the base set. When merging, unique class names from the additions set that are not present in the base set are appended.
The function works by aligning the class labels from the additions set with those in the base set,
handling conflicts by using a temporary index system. It copies .mat
files from both the base and
additions folders into the output folder, while adjusting indices and and class names for the additions.
Note that the maximum limit for uint16
is 65,535, so ensure that temp_index_offset
remains below this value.
No return value. Outputs the combined class2use
file in the same folder as class2use_file_base
is located or at a user-specified location,
and merged .mat
files into the output folder.
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.
ifcb_py_install
https://github.com/hsosik/ifcb-analysis
## Not run:
ifcb_merge_manual("path/to/class2use_base.mat", "path/to/class2use_additions.mat",
"path/to/class2use_combined.mat", "path/to/manual/base_folder",
"path/to/manual/additions_folder", "path/to/manual/output_folder",
do_compression = TRUE, temp_index_offset = 50000, quiet = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.