procPhotos2 | R Documentation |
procPhotos2
copies raw sample photos, renames them with the C-label
and strain name if CaeNDR
is set to TRUE, and saves them in
data/processed/fulcrum/photos folder. The function also makes thumbnails for
use with interactive maps and calculates md5 checksums for images.
procPhotos2(
dir,
data,
max_dim = 500,
overwrite = FALSE,
CeaNDR = FALSE,
pub_url =
"https://storage.googleapis.com/elegansvariation.org/photos/isolation/fulcrum/"
)
dir |
The path to the base fulcrum directory, raw/fulcrum/photos. This directory must contain the raw sample photos exported from Fulcrum. |
data |
a data frame output from the |
max_dim |
This value sets the maximum dimension of the resized images in pixels. The default value is 500. |
overwrite |
Logical, passed to fs::file_copy. If TRUE then existing files with similar names will be written over. Default is FALSE. |
CeaNDR |
Logical, determines whether to also rename photos to strain
names for Caenorhabditis briggsae, Caenorhabditis elegans, Caenorhabditis
tropicalis positive collections and add those images to the
|
pub_url |
A public url that holds sample images organized by |
A folder named photos
in the data/processed/fulcrum
directory. The folder contains sample photos renamed with C-labels. If
CaeNDR
is set to TRUE sample photos will be renamed with strain names
as well organized by species. Multiple sample photos for a single C-label
are given a numeric suffix after the strain name strain_name_#
.
The isolation photos have the highest suffix. The function uses a single isolation
photo even if multiple exist. A dataframe identical to input data
with old
and new image file names, md5 photo hash values, and a public url to find
images. The function also saves a .rds file to the
data/processed/fulcrum
directory.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.