SPRproject: Workflow Project Initiation

View source: R/sysargslist_utilities.R

SPRprojectR Documentation

Workflow Project Initiation

Description

Function to construct SYSargsList workflow control environment (S4 object). This function creates and checks the directory structure. If the expected directories are not available, it is possible to create those. The project directory default structure expected is:

  • SPRproject/

    • data/

    • param/

    • results/

The project working directory names can be modified, but users need to edit the code accordingly.

Usage

SPRproject(projPath = getwd(), data = "data", param = "param", results = "results",
                      logs.dir= ".SPRproject", sys.file="SYSargsList.yml", 
                      envir = new.env(), 
                      restart = FALSE, resume=FALSE, 
                      load.envir = FALSE,
                      overwrite = FALSE, silent = FALSE)

Arguments

projPath

a character vector of a full project path name. Default is the current path.

data

a character vector of a data directory name. Default is data. This subdirectory in the project stores all the raw data, reference, and annotation files.

param

a character vector of a param directory name. Default is param. This subdirectory in the project stores all the parameter and configuration files.

results

a character vector of a results directory name. Default is results. This subdirectory in the project stores all the analysis results, including but not limited: alignment, variant, and peak files (BAM, VCF, BED); tabular result files; and image/plot files.

logs.dir

a character vector of a logs directory name. Default is .SPRproject.

sys.file

a character vector of SYSargsList file name which will store all the project configuration information. Default is SYSargsList.yml and it will be save in the logs.dir folder.

envir

the environment in which workflow will be evaluated. Default will create a new.env().

restart

if set to TRUE, existing SYSargsList object saved in the logs.dir directory will be used to restart the workflow. This option will delete all the log files.

resume

if set to TRUE, existing SYSargsList object saved in the logs.dir directory will be used to resume the workflow.

load.envir

This argument allows to load the environment and recover all the objects saved during the workflow execution (please check runWF function for more details). This argument can be set as TRUE when restart = TRUE or resume = TRUE are used.

overwrite

if set to TRUE, existing logs.dir directory and all the content, as logs files and SYSargsList file will be removed, and a new and empty SYSargsList object will be created. This option should be used with caution!

silent

if set to TRUE, all messages returned by the function will be suppressed.

Details

If an SYSargsList instance was created before or independent of the project initialization, it is possible to append this instance after the project is created. Please see check appendStep<- function.

Value

SPRproject will return a SYSargsList object.

Author(s)

Daniela Cassol

See Also

See also as SYSargsList-class.

Examples

sal <- SPRproject(projPath = tempdir())
sal

tgirke/systemPipeR documentation built on March 27, 2024, 11:31 p.m.