sync_irods: Synchronize Project Input and Output Data

Description Usage Arguments Details Value

View source: R/sync_iRODS.R

Description

Synchronize project data of a from/to an irods zone with an R/Rstudio environment on Ubuntu. E.g. the Research Cloud of SURFsara. This function is a wrapper around 'irsync' form 'icommands'

Usage

1
sync_irods(project = NULL, stage = c("data", "output"), delete = FALSE, ...)

Arguments

project

Name (character string) of the project

stage

Which files to stage? If stage = 'data' then files will be synced from irods to RC; if 'output' vice versa.

delete

What to do with files in target directory that are not in source collection anymore. See details.

...

Path to a (sub)collection as a comma separated series of unnamed parameter values (strings). See details.

Details

On the irods side we expect the project folder in the home directory as defined in current irods_environment.json file. On the R side the project folder lives in the working directory. On both sides the project folders must have the same name.

The data/output convention is followed. If stage = 'data' then (input) data from irods will be transfered to the R/RStudio environment. Irods is then the source and RStudio the target. In both project folders there must be a directory named 'data' If stage = 'output' (meaning output data), then the transfer is from RStudio to irods.

The applied sync of icommands is one way from source to target. This means that files in the target which aren't in the source (anymore). The question is what to do with those files? If delete = FALSE (the default), then these files aren't removed, but only a list of filenames is returned to the calling function. If delete = TRUE the files are also removed, but, currently, the empty folders are not remnoved. We strongly advise to only produce a list of files and do clean-up afterwards.

If input or output data are organized in collections and subcollections, the user can add a series of unnamed, comma separated string parameters (...) to specify the path to the (sub) collection. For instance 'collect_A', 'sub_B', 'sub_sub_C' for irods_home/project_name/data/collect_A/sub_B/sub_sub_C.

This function doesn't perform an 'iinit', but it checks if there is a running irods session.

Value

If delete is FALSE, a list of files in target that aren't in source collection anymore. If TRUE list of removed files.


UtrechtUniversity/RCrstudio documentation built on March 16, 2021, 4:16 a.m.