ifcb_zip_matlab {iRfcb} | R Documentation |
Create a Zip Archive of Manual MATLAB Files
Description
This function creates a zip archive containing specified files and directories for manually
annotated IFCB images, organized into a structured format suitable for distribution or storage.
The MATLAB files are generated by the ifcb-analysis
repository (Sosik and Olson 2007).
The zip archive can be used to submit IFCB data to repositories like in the SMHI IFCB Plankton Image Reference Library (Torstensson et al., 2024).
Usage
ifcb_zip_matlab(
manual_folder,
features_folder,
class2use_file,
zip_filename,
data_folder = NULL,
readme_file = NULL,
matlab_readme_file = NULL,
email_address = "",
version = "",
print_progress = TRUE,
feature_recursive = TRUE,
manual_recursive = FALSE,
data_recursive = TRUE,
quiet = FALSE
)
Arguments
manual_folder |
The directory containing |
features_folder |
The directory containing |
class2use_file |
The path to the file (class2use_file) that will be renamed and included in the 'config' directory of the zip archive. |
zip_filename |
The filename for the zip archive to be created. |
data_folder |
Optionally, the directory containing additional data files ( |
readme_file |
Optionally, the path to a README file that will be updated with metadata and included in the zip archive. |
matlab_readme_file |
Optionally, the path to a MATLAB README file whose content will be appended to the end of the README file in the zip archive. |
email_address |
The email address to be included in the README file for contact information. |
version |
Optionally, the version number to be included in the README file. |
print_progress |
A logical value indicating whether to print progress bar. Default is TRUE. |
feature_recursive |
Logical. If TRUE, the function will search for feature files recursively within the |
manual_recursive |
Logical. If TRUE, the function will search for MATLAB files recursively within the |
data_recursive |
Logical. If TRUE, the function will search for data files recursively within the |
quiet |
Logical. If TRUE, suppresses messages about the progress and completion of the zip process. Default is FALSE. |
Details
This function performs the following operations:
Lists
.mat
files frommanual_folder
.Lists
.csv
files fromfeatures_folder
(including subfolders).Lists
.roi
,.adc
,.hdr
files fromdata_folder
if provided.Copies listed files to temporary directories (
manual_dir
,features_dir
,data_dir
,config_dir
).Renames and copies
class2use_file
toconfig_dir
asclass2use.mat
.Updates
readme_file
with metadata (if provided) and appends PNG image statistics and MATLAB README content.Creates a manifest file (
MANIFEST.txt
) listing all files in the zip archive.Creates a zip archive (
zip_filename
) containing all copied and updated files.Cleans up temporary directories after creating the zip archive.
Value
No return value. This function creates a zip archive containing the specified files and directories.
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. Torstensson, Anders; Skjevik, Ann-Turi; Mohlin, Malin; Karlberg, Maria; Karlson, Bengt (2024). SMHI IFCB Plankton Image Reference Library. SciLifeLab. Dataset. doi:10.17044/scilifelab.25883455
See Also
ifcb_zip_pngs
https://github.com/hsosik/ifcb-analysis
Examples
## Not run:
ifcb_zip_matlab("path/to/manual_files", "path/to/feature_files",
"path/to/class2use.mat", "output_zip_archive.zip",
data_folder = "path/to/data_files",
readme_file = system.file("exdata/README-template.md", package = "iRfcb"),
matlab_readme_file = system.file("inst/exdata/MATLAB-template.md",
package = "iRfcb"),
email_address = "example@email.com",
version = "1.0")
## End(Not run)