procPhotos.Rd
procPhotos
copies raw sample photos, renames them with the C-label,
and pastes them in data/processed/fulcrum/photos folder. The function also
makes thumbnails for use with interactive maps.
procPhotos(
dir,
data,
max_dim = 500,
overwrite = FALSE,
CeNDR = FALSE,
pub_url = "https://storage.googleapis.com/elegansvariation.org/photos/isolation/fulcrum/"
)
The full path to the fulcrum project directory, raw/fulcrum/photos must contain the raw sample photos.
a data frame output from the joinGenoFulc
function.
This value sets the maximum dimension of the resized images in pixels. The default value is 500, which makes nice thumbnails.
Logical, passed to fs::file_copy. If TRUE then existing files with similar names will be written over. Default is FALSE.
Logical, determines whether to write CeNDR criteria for qualifying photos to a subdirectory
A public url that holds sample images organized by project and named by C-label. For example, if the full url for C-5133 is https://storage.googleapis.com/elegansvariation.org/photos/isolation/fulcrum/2020JanuaryHawaii/sampling_thumbs/C-5133.jpg, the pub_url should be set to https://storage.googleapis.com/elegansvariation.org/photos/isolation/fulcrum/. The project name, "sampling_thumbs", C-label, and file extension will be filled by the function.
A new directory data/processed/fulcrum/photos. This directory
contains full size sample photos renamed with C-labels and a thumbnails
subfolder that contains resized images. A dataframe identical to input with
file names for all photos, which is also saved as an rds file in
data/processed/fulcrum directory. If CeNDR
is set to TRUE other
subfolders will be made with those images.